| The Gaudi Framework v29r0 (ff2e7097)

- 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 = std::numeric_limits<EventIDBase::number_type>::max();
15 const EventIDBase::event_number_t EventIDBase::UNDEFEVT = std::numeric_limits<EventIDBase::event_number_t>::max();
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 {
26 if ( m_run_number != UNDEFNUM && m_event_number != UNDEFEVT ) {
27 setRE();
28 }
29
30 if ( m_time_stamp != UNDEFNUM ) {
31 setTS();
32 if ( m_time_stamp_ns_offset == UNDEFNUM ) {
33 m_time_stamp_ns_offset = 0;
34 }
35 }
36
37 if ( m_lumi_block != UNDEFNUM && m_event_number != UNDEFEVT ) {
38 setLE();
39 }
40
41 if ( m_run_number != UNDEFNUM && m_lumi_block != UNDEFNUM ) {
42 setRL();
43 }
44 }
45
46 EventIDBase::~EventIDBase() {}
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 ); }
EventIDBase::UNDEFNUM
static const number_type UNDEFNUM
Definition: EventIDBase.h:34
EventIDBase::setLE
void setLE()
Definition: EventIDBase.h:183
EventIDBase::m_type
unsigned m_type
Definition: EventIDBase.h:179
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:196
EventIDBase::isRunLumi
bool isRunLumi() const
Definition: EventIDBase.cpp:54
EventIDBase::LumiEvent
Definition: EventIDBase.h:177
EventIDBase::setRE
void setRE()
Definition: EventIDBase.h:181
EventIDBase::m_event_number
event_number_t m_event_number
event number
Definition: EventIDBase.h:190
EventIDBase::RunLumi
Definition: EventIDBase.h:177
EventIDBase::EventIDBase
EventIDBase()
Definition: EventIDBase.h:40
EventIDBase::setRL
void setRL()
Definition: EventIDBase.h:184
EventIDBase::m_time_stamp
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:193
EventIDBase::m_lumi_block
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:200
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:56
EventIDBase::Invalid
Definition: EventIDBase.h:177
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:187
std::numeric_limits::max
T max(T...args)
EventIDBase::isRunEvent
bool isRunEvent() const
Definition: EventIDBase.cpp:48
EventIDBase::isTimeStamp
bool isTimeStamp() const
Definition: EventIDBase.cpp:50
EventIDBase::RunEvent
Definition: EventIDBase.h:177
EventIDBase::event_number_t
uint64_t event_number_t
Definition: EventIDBase.h:32
EventIDBase::isLumiEvent
bool isLumiEvent() const
Definition: EventIDBase.cpp:52
EventIDBase::number_type
unsigned int number_type
Definition: EventIDBase.h:31
EventIDBase::TimeStamp
Definition: EventIDBase.h:177
EventIDBase::~EventIDBase
virtual ~EventIDBase()
Definition: EventIDBase.cpp:46
EventIDBase::UNDEFEVT
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:35
EventIDBase::setTS
void setTS()
Definition: EventIDBase.h:182