/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootEvtIterator.h

Go to the documentation of this file.
00001 #ifndef GLASTCNV_GLASTEVENTSELECTORITERATOR_H
00002 #define GLASTCNV_GLASTEVENTSELECTORITERATOR_H 1
00003 
00004 #include "GaudiKernel/IEvtSelector.h"
00005 #include "GaudiKernel/ISvcLocator.h"
00006 #include "GaudiKernel/Service.h"
00007 
00008 #include <list>
00009 #include <string>
00010 #include <stdio.h>
00011 
00017 class RootEvtIterator: public IEvtSelector::Iterator {
00018  public:
00019   friend class RootEvtSelector;
00020   RootEvtIterator() {}
00021   RootEvtIterator( const IEvtSelector* glastEvtSel): m_glastEvtSel(glastEvtSel),
00022     m_recId(0) { }
00023   RootEvtIterator( const IEvtSelector* glastEvtSel, int recId)
00024     : m_glastEvtSel(glastEvtSel){
00025     m_recId = recId;
00026   }
00027   virtual ~RootEvtIterator() { }
00028   virtual IOpaqueAddress* operator*() const  {return m_glastEvtSel->reference(*this);}
00029   virtual IOpaqueAddress* operator->() const { return m_glastEvtSel->reference(*this);}
00030   virtual IEvtSelector::Iterator& operator++()    { return m_glastEvtSel->next(*this);}
00031   virtual IEvtSelector::Iterator& operator--()    { return m_glastEvtSel->previous(*this);}
00032   virtual IEvtSelector::Iterator& operator++(int) { return m_glastEvtSel->next(*this);}
00033   virtual IEvtSelector::Iterator& operator--(int) { return m_glastEvtSel->previous(*this);}
00034   virtual bool operator==(const IEvtSelector::Iterator& it) const {
00035     const RootEvtIterator* glastIt = dynamic_cast<const RootEvtIterator*>(&it);
00036     return((m_recId == glastIt->m_recId));
00037   }
00038   virtual bool operator!=(const IEvtSelector::Iterator& it) const {
00039     const RootEvtIterator* glastIt = dynamic_cast<const RootEvtIterator*>(&it);
00040     return((m_recId != glastIt->m_recId));
00041   }
00042 
00043  private:
00045   const IEvtSelector*   m_glastEvtSel;
00047   int                   m_recId;
00048 
00049 };
00050 
00051 #endif  // GLASTEvtIterator_H
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 

Generated on Tue Nov 29 22:58:37 2016 for BOSS_7.0.2 by  doxygen 1.4.7