EventIDBase.cpp
Go to the documentation of this file.
1 
11 
12 #include <limits>
13 
18 
20  event_number_t event_number,
21  number_type time_stamp,
22  number_type time_stamp_ns_offset,
23  number_type lumi_block,
24  number_type bunch_crossing_id)
25  :
26  m_run_number (run_number),
27  m_event_number (event_number),
28  m_time_stamp (time_stamp),
29  m_time_stamp_ns_offset (time_stamp_ns_offset),
30  m_lumiBlock (lumi_block),
31  m_bunch_crossing_id (bunch_crossing_id)
32 {
34  setRE();
35  }
36 
37  if (m_time_stamp != UNDEFNUM) {
38  setTS();
41  }
42  }
43 
45  setLE();
46  }
47 
48 }
49 
51 {}
52 
53 bool
55  return ( m_type & RunEvent );
56 }
57 
58 bool
60  return ( m_type & TimeStamp );
61 }
62 
63 bool
65  return ( m_type & LumiEvent );
66 }
67 
68 bool
70  return ( m_type != Invalid );
71 }
static const number_type UNDEFNUM
Definition: EventIDBase.h:35
void setLE()
Definition: EventIDBase.h:162
unsigned m_type
Definition: EventIDBase.h:158
number_type m_lumiBlock
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:178
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:174
void setRE()
Definition: EventIDBase.h:160
event_number_t m_event_number
event number
Definition: EventIDBase.h:168
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:171
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
bool isValid() const
Definition: EventIDBase.cpp:69
number_type m_run_number
run number
Definition: EventIDBase.h:165
bool isRunEvent() const
Definition: EventIDBase.cpp:54
bool isTimeStamp() const
Definition: EventIDBase.cpp:59
uint64_t event_number_t
Definition: EventIDBase.h:33
bool isLumiEvent() const
Definition: EventIDBase.cpp:64
unsigned int number_type
Definition: EventIDBase.h:32
virtual ~EventIDBase()
Definition: EventIDBase.cpp:50
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:36
void setTS()
Definition: EventIDBase.h:161