| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

EventIDBase.cpp
Go to the documentation of this file.
1
10 #include "GaudiKernel/EventIDBase.h"
11
12 #include <limits>
13
14 const EventIDBase::number_type EventIDBase::UNDEFNUM =
15 std::numeric_limits<EventIDBase::number_type>::max();
16 const EventIDBase::event_number_t EventIDBase::UNDEFEVT =
17 std::numeric_limits<EventIDBase::event_number_t>::max();
18
19 EventIDBase::EventIDBase(number_type run_number,
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 {
33 if (m_run_number != UNDEFNUM && m_event_number != UNDEFEVT) {
34 setRE();
35 }
36
37 if (m_time_stamp != UNDEFNUM) {
38 setTS();
39 if (m_time_stamp_ns_offset == UNDEFNUM) {
40 m_time_stamp_ns_offset = 0;
41 }
42 }
43
44 if (m_lumiBlock != UNDEFNUM && m_event_number != UNDEFEVT) {
45 setLE();
46 }
47
48 }
49
50 EventIDBase::~EventIDBase()
51 {}
52
53 bool
54 EventIDBase::isRunEvent() const {
55 return ( m_type & RunEvent );
56 }
57
58 bool
59 EventIDBase::isTimeStamp() const {
60 return ( m_type & TimeStamp );
61 }
62
63 bool
64 EventIDBase::isLumiEvent() const {
65 return ( m_type & LumiEvent );
66 }
67
68 bool
69 EventIDBase::isValid() const {
70 return ( m_type != Invalid );
71 }
EventIDBase::UNDEFNUM
static const number_type UNDEFNUM
Definition: EventIDBase.h:35
EventIDBase::setLE
void setLE()
Definition: EventIDBase.h:162
EventIDBase::m_type
unsigned m_type
Definition: EventIDBase.h:158
EventIDBase::m_lumiBlock
number_type m_lumiBlock
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:178
EventIDBase::m_time_stamp_ns_offset
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:174
EventIDBase::LumiEvent
Definition: EventIDBase.h:155
EventIDBase::setRE
void setRE()
Definition: EventIDBase.h:160
EventIDBase::m_event_number
event_number_t m_event_number
event number
Definition: EventIDBase.h:168
EventIDBase::EventIDBase
EventIDBase()
Definition: EventIDBase.h:42
EventIDBase::m_time_stamp
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:171
EventIDBase.h
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
EventIDBase::isValid
bool isValid() const
Definition: EventIDBase.cpp:69
EventIDBase::Invalid
Definition: EventIDBase.h:152
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:165
std::numeric_limits::max
T max(T...args)
EventIDBase::isRunEvent
bool isRunEvent() const
Definition: EventIDBase.cpp:54
EventIDBase::isTimeStamp
bool isTimeStamp() const
Definition: EventIDBase.cpp:59
EventIDBase::RunEvent
Definition: EventIDBase.h:153
EventIDBase::event_number_t
uint64_t event_number_t
Definition: EventIDBase.h:33
EventIDBase::isLumiEvent
bool isLumiEvent() const
Definition: EventIDBase.cpp:64
EventIDBase::number_type
unsigned int number_type
Definition: EventIDBase.h:32
EventIDBase::TimeStamp
Definition: EventIDBase.h:154
EventIDBase::~EventIDBase
virtual ~EventIDBase()
Definition: EventIDBase.cpp:50
EventIDBase::UNDEFEVT
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:36
EventIDBase::setTS
void setTS()
Definition: EventIDBase.h:161