CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
McIterator Class Reference

#include <McIterator.h>

+ Inheritance diagram for McIterator:

Public Member Functions

 McIterator (const IEvtSelector *selector)
 
 McIterator (const McIterator &it)
 
virtual ~McIterator (void)
 
virtual IOpaqueAddress * operator* () const
 
virtual IOpaqueAddress * operator-> () const
 
virtual Iterator & operator++ ()
 
virtual Iterator & operator-- ()
 
virtual Iterator & operator++ (int)
 
virtual Iterator & operator-- (int)
 
virtual bool operator== (const Iterator &it) const
 
virtual bool operator!= (const Iterator &it) const
 
unsigned int runNumber () const
 
unsigned int eventNumber () const
 
void setRunNumber (unsigned int runNo)
 
void setEventNumber (unsigned int eventNo)
 
void setEventsPerRun (unsigned int eventsP)
 

Detailed Description

Definition at line 8 of file McIterator.h.

Constructor & Destructor Documentation

◆ McIterator() [1/2]

McIterator::McIterator ( const IEvtSelector * selector)
inline

Definition at line 11 of file McIterator.h.

11 :
12 m_evtSelector(selector),
13 m_runNo(0), m_eventNo(0),
14 m_eventsP(1000000) {}

◆ McIterator() [2/2]

McIterator::McIterator ( const McIterator & it)
inline

Definition at line 15 of file McIterator.h.

15 : m_evtSelector(it.m_evtSelector),
16 m_runNo(it.m_runNo),
17 m_eventNo(it.m_eventNo),
18 m_eventsP(1000000) {}

◆ ~McIterator()

virtual McIterator::~McIterator ( void )
inlinevirtual

Definition at line 20 of file McIterator.h.

20{}

Member Function Documentation

◆ eventNumber()

unsigned int McIterator::eventNumber ( ) const
inline

Definition at line 32 of file McIterator.h.

32{ return m_eventNo; }

◆ operator!=()

bool McIterator::operator!= ( const Iterator & it) const
virtual

Definition at line 47 of file McIterator.cxx.

47 {
48 return !operator==(it);
49}
virtual bool operator==(const Iterator &it) const

◆ operator*()

IOpaqueAddress * McIterator::operator* ( ) const
virtual

Definition at line 6 of file McIterator.cxx.

6 {
7 return dereference();
8}

◆ operator++() [1/2]

IEvtSelector::Iterator & McIterator::operator++ ( )
virtual

Definition at line 12 of file McIterator.cxx.

12 {
13 if(m_eventNo>=m_eventsP){
14 m_runNo++;
15 m_eventNo=1;
16 }
17 m_eventNo++;
18 return *this;
19}

◆ operator++() [2/2]

IEvtSelector::Iterator & McIterator::operator++ ( int )
virtual

Definition at line 24 of file McIterator.cxx.

24 {
25
26 if(m_eventNo>=m_eventsP){
27 m_runNo++;
28 m_eventNo=1;
29 }
30 m_eventNo++;
31 return *this;
32}

◆ operator--() [1/2]

IEvtSelector::Iterator & McIterator::operator-- ( )
virtual

Definition at line 20 of file McIterator.cxx.

20 {
21 m_eventNo--;
22 return *this;
23}

◆ operator--() [2/2]

IEvtSelector::Iterator & McIterator::operator-- ( int )
virtual

Definition at line 34 of file McIterator.cxx.

34 {
35 m_eventNo--;
36 return *this;
37}

◆ operator->()

IOpaqueAddress * McIterator::operator-> ( ) const
virtual

Definition at line 9 of file McIterator.cxx.

9 {
10 return dereference();
11}

◆ operator==()

bool McIterator::operator== ( const Iterator & it) const
virtual

Definition at line 39 of file McIterator.cxx.

39 {
40 const McIterator* zIt = dynamic_cast<const McIterator*>(&it);
41 return (NULL != zIt) &&
42 (m_runNo == zIt->runNumber()) &&
43 (m_eventNo == zIt->eventNumber()) ;
44}

Referenced by operator!=().

◆ runNumber()

unsigned int McIterator::runNumber ( ) const
inline

Definition at line 31 of file McIterator.h.

31{ return m_runNo; }

◆ setEventNumber()

void McIterator::setEventNumber ( unsigned int eventNo)
inline

Definition at line 35 of file McIterator.h.

35{ m_eventNo = eventNo ; }
int eventNo

◆ setEventsPerRun()

void McIterator::setEventsPerRun ( unsigned int eventsP)
inline

Definition at line 36 of file McIterator.h.

36{ m_eventsP = eventsP ; }

◆ setRunNumber()

void McIterator::setRunNumber ( unsigned int runNo)
inline

Definition at line 34 of file McIterator.h.

34{ m_runNo = runNo; }
int runNo

The documentation for this class was generated from the following files: