ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
McContext Class Reference
Inheritance diagram for McContext:
Collaboration diagram for McContext:

Public Member Functions

 McContext (const McEventSelector *pSelector)
 Standard constructor. More...
 
 McContext (const McEventSelector *pSelector, const unsigned int &initRunNo, const uint64_t &initEventNo, const uint64_t &evPR, const unsigned int &initLBNo, const unsigned int &evPLB, const unsigned int &initTimeStamp, const unsigned int &timeStampInt)
 
virtual ~McContext ()
 Standard destructor. More...
 
virtual void * identifier () const
 
void setCriteria (const std::string &crit)
 
void rewind ()
 
void next ()
 
void previous ()
 
unsigned int runNumber () const
 
uint64_t eventNumber () const
 
unsigned int lumiBlock () const
 
unsigned int timeStamp () const
 
int serialEventNumber () const
 
void setRunNumber (unsigned int runNo)
 
void setEventNumber (uint64_t eventNo)
 
void setEventsPerRun (uint64_t eventsP)
 
void setTimeStamp (unsigned int time)
 
void setTimeStampInterval (unsigned int intvl)
 

Private Attributes

const McEventSelectorm_pSelector
 
std::string m_criteria
 
unsigned int m_initRunNo
 
uint64_t m_initEventNo
 
uint64_t m_eventsP
 
unsigned int m_initLBNo
 
unsigned int m_eventsPLB
 
unsigned int m_initTimeStamp
 
unsigned int m_timeStampInt
 
unsigned int m_runNo
 
uint64_t m_eventNo
 
unsigned int m_LBNo
 
unsigned int m_timeStamp
 
unsigned int m_LBTick
 
int m_nevt
 
bool m_firstEvent
 

Detailed Description

Definition at line 38 of file McEventSelector.cxx.

Constructor & Destructor Documentation

◆ McContext() [1/2]

McContext::McContext ( const McEventSelector pSelector)

Standard constructor.

Definition at line 159 of file McEventSelector.cxx.

159  :
160  m_pSelector(pSelector),
161  m_initRunNo(0),
162  m_initEventNo(0),
163  m_eventsP(2000000000), // <-- match default property of McEventSelector
164  m_initLBNo(0),
165  m_eventsPLB(1000), // <-- ditto
166  m_initTimeStamp(0),
167  m_timeStampInt(0),
168  m_runNo(0),
169  m_eventNo(0),
170  m_LBNo(0),
171  m_timeStamp(0),
172  m_LBTick(0),
173  m_nevt(0),
174  m_firstEvent(true)
175 {}

◆ McContext() [2/2]

McContext::McContext ( const McEventSelector pSelector,
const unsigned int &  initRunNo,
const uint64_t &  initEventNo,
const uint64_t &  evPR,
const unsigned int &  initLBNo,
const unsigned int &  evPLB,
const unsigned int &  initTimeStamp,
const unsigned int &  timeStampInt 
)

Definition at line 177 of file McEventSelector.cxx.

184  :
185  m_pSelector(pSelector),
186  m_initRunNo(initRunNo), m_initEventNo(initEventNo), m_eventsP(evPR),
187  m_initLBNo(initLBNo), m_eventsPLB(evPLB),
188  m_initTimeStamp(initTimeStamp), m_timeStampInt(timeStampInt),
189  m_runNo(0),
190  m_eventNo(0),
191  m_LBNo(0),
192  m_timeStamp(0),
193  m_LBTick(0),
194  m_nevt(0),
195  m_firstEvent(true)
196 {}

◆ ~McContext()

McContext::~McContext ( )
virtual

Standard destructor.

Definition at line 199 of file McEventSelector.cxx.

199  {
200 }

Member Function Documentation

◆ eventNumber()

uint64_t McContext::eventNumber ( ) const
inline

Definition at line 144 of file McEventSelector.cxx.

144 { return m_eventNo; }

◆ identifier()

virtual void* McContext::identifier ( ) const
inlinevirtual

Definition at line 75 of file McEventSelector.cxx.

75  {
76  return (void*)m_pSelector;
77  }

◆ lumiBlock()

unsigned int McContext::lumiBlock ( ) const
inline

Definition at line 145 of file McEventSelector.cxx.

145 { return m_LBNo; }

◆ next()

void McContext::next ( )
inline

Definition at line 101 of file McEventSelector.cxx.

101  {
102  m_nevt++; // advance serial event number
103 
104  if (m_firstEvent) {
105  m_firstEvent = false;
106 
109  m_LBNo = m_initLBNo;
111  m_LBTick=0;
112 
113  return;
114  }
115 
116  // Andy Buckley, 10 Feb 2014: commenting out to reduce Athena evgen noise
117  //std::cout << "evt no, per run " << m_eventNo << "/" << m_eventsP << std::endl;
118 
119  if(m_eventNo>=m_eventsP) {
120  m_runNo++;
121  m_eventNo=0;
122  m_LBNo=0; // lumiblock starts at 1 by default
123  m_LBTick=0;
124  }
125  m_eventNo++;
126  if (++m_LBTick >= m_eventsPLB) {
127  m_LBTick=0;
128  ++m_LBNo;
129  }
131  }

◆ previous()

void McContext::previous ( )
inline

Definition at line 133 of file McEventSelector.cxx.

133  {
134  m_nevt--; // decrement serial event number
135  m_eventNo--;
137  if (--m_LBTick <=0) {
139  --m_LBNo;
140  }
141  }

◆ rewind()

void McContext::rewind ( )
inline

Definition at line 82 of file McEventSelector.cxx.

82  {
83 
84  // Question: should this rewind to before the first event, or to
85  // it? ie, will next() be called right after rewind()?
86  // if so, then should set m_firstEvent to true;
87 
88  // CGL 2011.6.9: by process of experimental programming, we have
89  // determined that next() is called right after rewind() for the
90  // first event, so set m_firstEvent to true.
91 
92  m_firstEvent = true;
93 
98  m_nevt = 0;
99  }

◆ runNumber()

unsigned int McContext::runNumber ( ) const
inline

Definition at line 143 of file McEventSelector.cxx.

143 { return m_runNo; }

◆ serialEventNumber()

int McContext::serialEventNumber ( ) const
inline

Definition at line 147 of file McEventSelector.cxx.

147 { return m_nevt; }

◆ setCriteria()

void McContext::setCriteria ( const std::string &  crit)
inline

Definition at line 78 of file McEventSelector.cxx.

78  {
79  m_criteria = crit;
80  }

◆ setEventNumber()

void McContext::setEventNumber ( uint64_t  eventNo)
inline

Definition at line 152 of file McEventSelector.cxx.

152 { m_eventNo = eventNo ; }

◆ setEventsPerRun()

void McContext::setEventsPerRun ( uint64_t  eventsP)
inline

Definition at line 153 of file McEventSelector.cxx.

153 { m_eventsP = eventsP ; }

◆ setRunNumber()

void McContext::setRunNumber ( unsigned int  runNo)
inline

Definition at line 151 of file McEventSelector.cxx.

151 { m_runNo = runNo; }

◆ setTimeStamp()

void McContext::setTimeStamp ( unsigned int  time)
inline

Definition at line 154 of file McEventSelector.cxx.

154 { m_timeStamp = time; }

◆ setTimeStampInterval()

void McContext::setTimeStampInterval ( unsigned int  intvl)
inline

Definition at line 155 of file McEventSelector.cxx.

155 { m_timeStampInt = intvl; }

◆ timeStamp()

unsigned int McContext::timeStamp ( ) const
inline

Definition at line 146 of file McEventSelector.cxx.

146 { return m_timeStamp; }

Member Data Documentation

◆ m_criteria

std::string McContext::m_criteria
private

Definition at line 41 of file McEventSelector.cxx.

◆ m_eventNo

uint64_t McContext::m_eventNo
private

Definition at line 53 of file McEventSelector.cxx.

◆ m_eventsP

uint64_t McContext::m_eventsP
private

Definition at line 45 of file McEventSelector.cxx.

◆ m_eventsPLB

unsigned int McContext::m_eventsPLB
private

Definition at line 47 of file McEventSelector.cxx.

◆ m_firstEvent

bool McContext::m_firstEvent
private

Definition at line 59 of file McEventSelector.cxx.

◆ m_initEventNo

uint64_t McContext::m_initEventNo
private

Definition at line 44 of file McEventSelector.cxx.

◆ m_initLBNo

unsigned int McContext::m_initLBNo
private

Definition at line 46 of file McEventSelector.cxx.

◆ m_initRunNo

unsigned int McContext::m_initRunNo
private

Definition at line 43 of file McEventSelector.cxx.

◆ m_initTimeStamp

unsigned int McContext::m_initTimeStamp
private

Definition at line 49 of file McEventSelector.cxx.

◆ m_LBNo

unsigned int McContext::m_LBNo
private

Definition at line 54 of file McEventSelector.cxx.

◆ m_LBTick

unsigned int McContext::m_LBTick
private

Definition at line 56 of file McEventSelector.cxx.

◆ m_nevt

int McContext::m_nevt
private

Definition at line 57 of file McEventSelector.cxx.

◆ m_pSelector

const McEventSelector* McContext::m_pSelector
private

Definition at line 40 of file McEventSelector.cxx.

◆ m_runNo

unsigned int McContext::m_runNo
private

Definition at line 52 of file McEventSelector.cxx.

◆ m_timeStamp

unsigned int McContext::m_timeStamp
private

Definition at line 55 of file McEventSelector.cxx.

◆ m_timeStampInt

unsigned int McContext::m_timeStampInt
private

Definition at line 50 of file McEventSelector.cxx.


The documentation for this class was generated from the following file:
McContext::m_eventsPLB
unsigned int m_eventsPLB
Definition: McEventSelector.cxx:47
McContext::m_pSelector
const McEventSelector * m_pSelector
Definition: McEventSelector.cxx:40
McContext::m_initLBNo
unsigned int m_initLBNo
Definition: McEventSelector.cxx:46
McContext::m_LBNo
unsigned int m_LBNo
Definition: McEventSelector.cxx:54
McContext::m_firstEvent
bool m_firstEvent
Definition: McEventSelector.cxx:59
McContext::m_runNo
unsigned int m_runNo
Definition: McEventSelector.cxx:52
McContext::m_eventNo
uint64_t m_eventNo
Definition: McEventSelector.cxx:53
McContext::m_initRunNo
unsigned int m_initRunNo
Definition: McEventSelector.cxx:43
McContext::m_nevt
int m_nevt
Definition: McEventSelector.cxx:57
McContext::m_timeStampInt
unsigned int m_timeStampInt
Definition: McEventSelector.cxx:50
McContext::m_eventsP
uint64_t m_eventsP
Definition: McEventSelector.cxx:45
McContext::m_initEventNo
uint64_t m_initEventNo
Definition: McEventSelector.cxx:44
McContext::m_initTimeStamp
unsigned int m_initTimeStamp
Definition: McEventSelector.cxx:49
McContext::m_LBTick
unsigned int m_LBTick
Definition: McEventSelector.cxx:56
McContext::m_criteria
std::string m_criteria
Definition: McEventSelector.cxx:41
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
McContext::m_timeStamp
unsigned int m_timeStamp
Definition: McEventSelector.cxx:55