BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
RootEvtIterator.h
Go to the documentation of this file.
1#ifndef GLASTCNV_GLASTEVENTSELECTORITERATOR_H
2#define GLASTCNV_GLASTEVENTSELECTORITERATOR_H 1
3
4#include "GaudiKernel/IEvtSelector.h"
5#include "GaudiKernel/ISvcLocator.h"
6#include "GaudiKernel/Service.h"
7
8#include <list>
9#include <string>
10#include <stdio.h>
11
12/** @class RootEvtIterator
13* @brief implements the IEvtSelector::Iterator interface
14*
15* $Header: /bes/bes/BossCvs/Event/RootCnvSvc/RootCnvSvc/RootEvtIterator.h,v 1.8 2008/01/09 00:05:48 codeman Exp $
16*/
17class RootEvtIterator: public IEvtSelector::Iterator {
18 public:
19 friend class RootEvtSelector;
21 RootEvtIterator( const IEvtSelector* glastEvtSel): m_glastEvtSel(glastEvtSel),
22 m_recId(0) { }
23 RootEvtIterator( const IEvtSelector* glastEvtSel, int recId)
24 : m_glastEvtSel(glastEvtSel){
25 m_recId = recId;
26 }
27 virtual ~RootEvtIterator() { }
28 virtual IOpaqueAddress* operator*() const {return m_glastEvtSel->reference(*this);}
29 virtual IOpaqueAddress* operator->() const { return m_glastEvtSel->reference(*this);}
30 virtual IEvtSelector::Iterator& operator++() { return m_glastEvtSel->next(*this);}
31 virtual IEvtSelector::Iterator& operator--() { return m_glastEvtSel->previous(*this);}
32 virtual IEvtSelector::Iterator& operator++(int) { return m_glastEvtSel->next(*this);}
33 virtual IEvtSelector::Iterator& operator--(int) { return m_glastEvtSel->previous(*this);}
34 virtual bool operator==(const IEvtSelector::Iterator& it) const {
35 const RootEvtIterator* glastIt = dynamic_cast<const RootEvtIterator*>(&it);
36 return((m_recId == glastIt->m_recId));
37 }
38 virtual bool operator!=(const IEvtSelector::Iterator& it) const {
39 const RootEvtIterator* glastIt = dynamic_cast<const RootEvtIterator*>(&it);
40 return((m_recId != glastIt->m_recId));
41 }
42
43 private:
44 /// pointer to RootEvtSelector
45 const IEvtSelector* m_glastEvtSel;
46 /// counts number of event
47 int m_recId;
48
49};
50
51#endif // GLASTEvtIterator_H
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
implements the IEvtSelector::Iterator interface
virtual IEvtSelector::Iterator & operator--()
virtual IEvtSelector::Iterator & operator++()
virtual bool operator==(const IEvtSelector::Iterator &it) const
virtual IOpaqueAddress * operator->() const
RootEvtIterator(const IEvtSelector *glastEvtSel, int recId)
virtual IOpaqueAddress * operator*() const
virtual bool operator!=(const IEvtSelector::Iterator &it) const
RootEvtIterator(const IEvtSelector *glastEvtSel)
virtual ~RootEvtIterator()
virtual IEvtSelector::Iterator & operator++(int)
virtual IEvtSelector::Iterator & operator--(int)
RootEvtSelector performs the function of controlling the ApplicationMgr loop.