CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
McIterator.h
Go to the documentation of this file.
1#ifndef MCEVENTSELECTOR_MCITERAROR_H
2#define MCEVENTSELECTOR_MCITERATOR_H 1
3
4#include "GaudiKernel/IEvtSelector.h"
5
6class McAddress;
7
8class McIterator : virtual public IEvtSelector::Iterator
9{
10 public:
11 McIterator (const IEvtSelector* selector) :
12 m_evtSelector(selector),
13 m_runNo(0), m_eventNo(0),
14 m_eventsP(1000000) {}
15 McIterator (const McIterator &it) : m_evtSelector(it.m_evtSelector),
16 m_runNo(it.m_runNo),
17 m_eventNo(it.m_eventNo),
18 m_eventsP(1000000) {}
19 // McIterator () : m_evtSelector(0), m_runNo(0), m_eventNo(0) {}
20 virtual ~McIterator (void) {}
21
22 virtual IOpaqueAddress* operator*() const;
23 virtual IOpaqueAddress* operator->() const;
24 virtual Iterator& operator++();
25 virtual Iterator& operator--();
26 virtual Iterator& operator++(int);
27 virtual Iterator& operator--(int);
28 virtual bool operator==(const Iterator& it) const;
29 virtual bool operator!=(const Iterator& it) const;
30
31 unsigned int runNumber() const { return m_runNo; }
32 unsigned int eventNumber() const { return m_eventNo; }
33
34 void setRunNumber( unsigned int runNo ) { m_runNo = runNo; }
35 void setEventNumber( unsigned int eventNo ) { m_eventNo = eventNo ; }
36 void setEventsPerRun( unsigned int eventsP) { m_eventsP = eventsP ; }
37
38 private:
39 McAddress* dereference() const;
40
41 const IEvtSelector* m_evtSelector;
42
43 unsigned int m_runNo;
44 unsigned int m_eventNo;
45 unsigned int m_eventsP;
46};
47#endif /* MCEVENTSELECTOR_MCITERATOR_H */
48
49
int runNo
int eventNo
virtual bool operator!=(const Iterator &it) const
Definition: McIterator.cxx:47
virtual Iterator & operator++()
Definition: McIterator.cxx:12
virtual Iterator & operator--()
Definition: McIterator.cxx:20
McIterator(const IEvtSelector *selector)
Definition: McIterator.h:11
virtual bool operator==(const Iterator &it) const
Definition: McIterator.cxx:39
unsigned int eventNumber() const
Definition: McIterator.h:32
void setRunNumber(unsigned int runNo)
Definition: McIterator.h:34
virtual IOpaqueAddress * operator->() const
Definition: McIterator.cxx:9
McIterator(const McIterator &it)
Definition: McIterator.h:15
unsigned int runNumber() const
Definition: McIterator.h:31
virtual ~McIterator(void)
Definition: McIterator.h:20
void setEventsPerRun(unsigned int eventsP)
Definition: McIterator.h:36
virtual IOpaqueAddress * operator*() const
Definition: McIterator.cxx:6
void setEventNumber(unsigned int eventNo)
Definition: McIterator.h:35