00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * File: $Id: RooDataHistSliceIter.h 24269 2008-06-13 15:37:03Z wouter $ 00005 * Authors: * 00006 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * 00007 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * 00008 * * 00009 * Copyright (c) 2000-2005, Regents of the University of California * 00010 * and Stanford University. All rights reserved. * 00011 * * 00012 * Redistribution and use in source and binary forms, * 00013 * with or without modification, are permitted according to the terms * 00014 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 00015 *****************************************************************************/ 00016 #ifndef ROO_DATA_HIST_SLICE_ITER 00017 #define ROO_DATA_HIST_SLICE_ITER 00018 00019 #include "Riosfwd.h" 00020 #include "TIterator.h" 00021 #include "RooArgSet.h" 00022 #include "TObjString.h" 00023 class RooDataHist ; 00024 00025 typedef TIterator* pTIterator ; 00026 00027 class RooDataHistSliceIter : public TIterator { 00028 public: 00029 // Constructors, assignment etc. 00030 RooDataHistSliceIter(const RooDataHistSliceIter& other) ; 00031 virtual ~RooDataHistSliceIter() ; 00032 00033 // Iterator implementation 00034 virtual const TCollection* GetCollection() const ; 00035 virtual TObject* Next() ; 00036 virtual void Reset() ; 00037 virtual bool operator!=(const TIterator &aIter) const ; 00038 virtual TObject *operator*() const ; 00039 protected: 00040 00041 friend class RooDataHist ; 00042 RooDataHistSliceIter(RooDataHist& hist, RooAbsArg& sliceArg) ; 00043 00044 RooDataHist* _hist ; 00045 RooAbsArg* _sliceArg ; 00046 Int_t _baseIndex ; 00047 Int_t _stepSize ; 00048 Int_t _nStep ; 00049 Int_t _curStep ; 00050 00051 TIterator& operator=(const TIterator&) { 00052 // Prohibit iterator assignment 00053 return *this ; 00054 } 00055 00056 ClassDef(RooDataHistSliceIter,0) // Iterator over a one-dimensional slice of a RooDataHist 00057 }; 00058 00059 #endif