The Gaudi Framework  v29r0 (ff2e7097)
EventIDBase.cpp
Go to the documentation of this file.
1 
11 
12 #include <limits>
13 
16 
17 EventIDBase::EventIDBase( number_type run_number, event_number_t event_number, number_type time_stamp,
18  number_type time_stamp_ns_offset, number_type lumi_block, number_type bunch_crossing_id )
19  : m_run_number( run_number )
20  , m_event_number( event_number )
21  , m_time_stamp( time_stamp )
22  , m_time_stamp_ns_offset( time_stamp_ns_offset )
23  , m_lumi_block( lumi_block )
24  , m_bunch_crossing_id( bunch_crossing_id )
25 {
27  setRE();
28  }
29 
30  if ( m_time_stamp != UNDEFNUM ) {
31  setTS();
34  }
35  }
36 
38  setLE();
39  }
40 
41  if ( m_run_number != UNDEFNUM && m_lumi_block != UNDEFNUM ) {
42  setRL();
43  }
44 }
45 
47 
48 bool EventIDBase::isRunEvent() const { return ( m_type & RunEvent ); }
49 
50 bool EventIDBase::isTimeStamp() const { return ( m_type & TimeStamp ); }
51 
52 bool EventIDBase::isLumiEvent() const { return ( m_type & LumiEvent ); }
53 
54 bool EventIDBase::isRunLumi() const { return ( m_type & RunLumi ); }
55 
56 bool EventIDBase::isValid() const { return ( m_type != Invalid ); }
static const number_type UNDEFNUM
Definition: EventIDBase.h:34
void setLE()
Definition: EventIDBase.h:183
unsigned m_type
Definition: EventIDBase.h:179
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:196
bool isRunLumi() const
Definition: EventIDBase.cpp:54
void setRE()
Definition: EventIDBase.h:181
event_number_t m_event_number
event number
Definition: EventIDBase.h:190
void setRL()
Definition: EventIDBase.h:184
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:193
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:200
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:56
number_type m_run_number
run number
Definition: EventIDBase.h:187
bool isRunEvent() const
Definition: EventIDBase.cpp:48
bool isTimeStamp() const
Definition: EventIDBase.cpp:50
uint64_t event_number_t
Definition: EventIDBase.h:32
bool isLumiEvent() const
Definition: EventIDBase.cpp:52
unsigned int number_type
Definition: EventIDBase.h:31
virtual ~EventIDBase()
Definition: EventIDBase.cpp:46
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:35
void setTS()
Definition: EventIDBase.h:182