#ifndef __TQIteratorT__ #define __TQIteratorT__ #include "TObject.h" #include "TCollection.h" #include "TIterator.h" template class TQIteratorT : public TObject { protected: Bool_t fOwnsCollection; Bool_t fOwnsIterator; TCollection * fCollection; TIterator * fIterator; T * fNext; TString fFilter; Int_t fCounter; Int_t fPreviousCounter; Int_t fGlobalCounter; Int_t fPreviousGlobalCounter; Int_t fNCycles; Int_t fCycle; Int_t fPreviousCycle; Int_t fCurrentIndex; Int_t fLastIndex; Bool_t gotoNext(Bool_t switchCycle=true); public: TQIteratorT(); TQIteratorT(TIterator * itr, Bool_t ownIterator = false); TQIteratorT(TIterator * itr, const TString& filter, Bool_t ownIterator = false); TQIteratorT(TCollection * c, Bool_t ownCollection = false); TQIteratorT(TCollection * c, const TString& filter, Bool_t ownCollection = false); Bool_t hasNext(); T * getNext(); T * readNext(); bool isValid() const; Bool_t reset(); Bool_t resetCycle(); Int_t flush(); Bool_t sort(); Int_t scan(Bool_t doPrintCounter = false); void printCounterHeadline(TString prefix = ""); void printCounter(Bool_t printHeadline = true); Bool_t gotoElement(TObject * obj); Bool_t gotoElement(TString name); void setNCycles(Int_t nCycles); Int_t getNCycles(); Int_t getCycle(); Int_t getPreviousCycle(); Int_t getCounter(); Int_t getPreviousCounter(); Int_t getGlobalCounter(); Int_t getPreviousGlobalCounter(); Int_t getLastIndex(); virtual ~TQIteratorT(); ClassDefT(TQIteratorT,1) }; templateClassImp(TQIteratorT) ClassDefT2(TQIteratorT,T) #ifndef __CINT__ #ifndef DICT #include "TQIteratorT.tpp" #endif #endif #endif