| The Gaudi Framework v27r1

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Private Attributes | Friends | List of all members
EventIDBase Class Reference

This class provides a unique identification for each event, in terms of run/event number and/or a time stamp. More...

`#include <GaudiKernel/EventIDBase.h>`

## Public Types
typedef unsigned int | number_type

## Public Member Functions
number_type | run_number () const
| run number - 32 bit unsigned More...
uint64_t | event_number () const
| event number - 64 bit unsigned More...
number_type | time_stamp () const
| time stamp - posix time in seconds from 1970, 32 bit unsigned More...
number_type | time_stamp_ns_offset () const
| time stamp ns - ns time offset for time_stamp, 32 bit unsigned More...
number_type | lumi_block () const
| luminosity block identifier, 32 bit unsigned More...
number_type | bunch_crossing_id () const
| bunch crossing ID, 32 bit unsigned More...
void | set_run_number (number_type runNumber)
| set run number More...
void | set_event_number (uint64_t eventNumber)
| set event number More...
void | set_time_stamp (number_type timeStamp)
| set time stamp More...
void | set_time_stamp_ns_offset (number_type timeStampNs)
| set time stamp in ns More...
void | set_lumi_block (number_type lumiBlock)
| set luminosity block identifier More...
void | set_bunch_crossing_id (number_type bcid)
| set bunch crossing ID More...
structors
| EventIDBase ()
| EventIDBase (number_type run_number, uint64_t event_number, number_type time_stamp=0, number_type time_stamp_ns_offset=0, number_type lumi_block=0, number_type bunch_crossing_id=0)
virtual | ~EventIDBase ()

## Private Attributes
number_type | m_run_number {0}
| run number More...
uint64_t | m_event_number {0}
| event number More...
number_type | m_time_stamp {0}
| posix time in seconds since 1970/01/01 More...
number_type | m_time_stamp_ns_offset {0}
| time stamp ns - ns time offset for time_stamp, 32 bit unsigned More...
number_type | m_lumiBlock {0}
| luminosity block number: the number which uniquely tags a luminosity block within a run More...
number_type | m_bunch_crossing_id {0}
| bunch crossing ID, 32 bit unsigned More...

## Friends
bool | operator< (const EventIDBase &lhs, const EventIDBase &rhs)
| Comparison operators. More...
bool | operator> (const EventIDBase &lhs, const EventIDBase &rhs)
bool | operator== (const EventIDBase &lhs, const EventIDBase &rhs)
bool | operator!= (const EventIDBase &lhs, const EventIDBase &rhs)
bool | operator<= (const EventIDBase &lhs, const EventIDBase &rhs)
bool | operator>= (const EventIDBase &lhs, const EventIDBase &rhs)
std::ostream & | operator<< (std::ostream &os, const EventIDBase &rhs)
| Extraction operators. More...

## Detailed Description

This class provides a unique identification for each event, in terms of run/event number and/or a time stamp.

Definition at line 28 of file EventIDBase.h.

## Member Typedef Documentation

typedef unsigned int EventIDBase::number_type

Definition at line 31 of file EventIDBase.h.

## Constructor & Destructor Documentation

EventIDBase::EventIDBase | ( |  | ) |
| inline

Definition at line 35 of file EventIDBase.h.

35 {};

EventIDBase::EventIDBase | ( | number_type | run_number,
|  | uint64_t | event_number,
|  | number_type | time_stamp = `0`,
|  | number_type | time_stamp_ns_offset = `0`,
|  | number_type | lumi_block = `0`,
|  | number_type | bunch_crossing_id = `0`
| ) |  |

Definition at line 12 of file EventIDBase.cpp.

18 :
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_lumiBlock (lumi_block),
24 m_bunch_crossing_id (bunch_crossing_id)
25 {}
EventIDBase::m_event_number
uint64_t m_event_number
event number
Definition: EventIDBase.h:101
EventIDBase::bunch_crossing_id
number_type bunch_crossing_id() const
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:62
EventIDBase::m_lumiBlock
number_type m_lumiBlock
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:111
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:107
EventIDBase::m_bunch_crossing_id
number_type m_bunch_crossing_id
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:114
EventIDBase::lumi_block
number_type lumi_block() const
luminosity block identifier, 32 bit unsigned
Definition: EventIDBase.h:59
EventIDBase::time_stamp
number_type time_stamp() const
time stamp - posix time in seconds from 1970, 32 bit unsigned
Definition: EventIDBase.h:53
EventIDBase::m_time_stamp
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:104
EventIDBase::event_number
uint64_t event_number() const
event number - 64 bit unsigned
Definition: EventIDBase.h:50
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:98
EventIDBase::run_number
number_type run_number() const
run number - 32 bit unsigned
Definition: EventIDBase.h:47
EventIDBase::time_stamp_ns_offset
number_type time_stamp_ns_offset() const
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:56

EventIDBase::~EventIDBase | ( |  | ) |
| virtual

Definition at line 27 of file EventIDBase.cpp.

28 {}

## Member Function Documentation

number_type EventIDBase::bunch_crossing_id | ( |  | ) | const
| inline

bunch crossing ID, 32 bit unsigned

Definition at line 62 of file EventIDBase.h.

62 { return m_bunch_crossing_id; }
EventIDBase::m_bunch_crossing_id
number_type m_bunch_crossing_id
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:114

uint64_t EventIDBase::event_number | ( |  | ) | const
| inline

event number - 64 bit unsigned

Definition at line 50 of file EventIDBase.h.

50 { return m_event_number; }
EventIDBase::m_event_number
uint64_t m_event_number
event number
Definition: EventIDBase.h:101

number_type EventIDBase::lumi_block | ( |  | ) | const
| inline

luminosity block identifier, 32 bit unsigned

Definition at line 59 of file EventIDBase.h.

59 { return m_lumiBlock; }
EventIDBase::m_lumiBlock
number_type m_lumiBlock
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:111

number_type EventIDBase::run_number | ( |  | ) | const
| inline

run number - 32 bit unsigned

Definition at line 47 of file EventIDBase.h.

47 { return m_run_number; }
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:98

void EventIDBase::set_bunch_crossing_id | ( | number_type | bcid | ) |
| inline

set bunch crossing ID

Definition at line 82 of file EventIDBase.h.

82 { m_bunch_crossing_id = bcid; }
EventIDBase::m_bunch_crossing_id
number_type m_bunch_crossing_id
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:114

void EventIDBase::set_event_number | ( | uint64_t | eventNumber | ) |
| inline

set event number

Definition at line 68 of file EventIDBase.h.

68 { m_event_number = eventNumber; }
EventIDBase::m_event_number
uint64_t m_event_number
event number
Definition: EventIDBase.h:101

void EventIDBase::set_lumi_block | ( | number_type | lumiBlock | ) |
| inline

set luminosity block identifier

Definition at line 79 of file EventIDBase.h.

79 { m_lumiBlock = lumiBlock; }
EventIDBase::m_lumiBlock
number_type m_lumiBlock
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:111

void EventIDBase::set_run_number | ( | number_type | runNumber | ) |
| inline

set run number

Definition at line 65 of file EventIDBase.h.

65 { m_run_number = runNumber; }
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:98

void EventIDBase::set_time_stamp | ( | number_type | timeStamp | ) |
| inline

set time stamp

Definition at line 71 of file EventIDBase.h.

71 { m_time_stamp = timeStamp; }
EventIDBase::m_time_stamp
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:104

void EventIDBase::set_time_stamp_ns_offset | ( | number_type | timeStampNs | ) |
| inline

set time stamp in ns

Definition at line 74 of file EventIDBase.h.

74 {
75 m_time_stamp_ns_offset = timeStampNs;
76 }
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:107

number_type EventIDBase::time_stamp | ( |  | ) | const
| inline

time stamp - posix time in seconds from 1970, 32 bit unsigned

Definition at line 53 of file EventIDBase.h.

53 { return m_time_stamp; }
EventIDBase::m_time_stamp
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:104

number_type EventIDBase::time_stamp_ns_offset | ( |  | ) | const
| inline

time stamp ns - ns time offset for time_stamp, 32 bit unsigned

Definition at line 56 of file EventIDBase.h.

56 { return m_time_stamp_ns_offset; }
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:107

## Friends And Related Function Documentation

bool operator!= | ( | const EventIDBase & | lhs,
|  | const EventIDBase & | rhs
| ) |  |
| friend

Definition at line 136 of file EventIDBase.h.

136 {
137 return !(lhs == rhs);
138 }

bool operator< | ( | const EventIDBase & | lhs,
|  | const EventIDBase & | rhs
| ) |  |
| friend

Comparison operators.

Definition at line 119 of file EventIDBase.h.

119 {
120 // We are assuming that ALL events will have run and event numbers,
121 // and never just a time stamp.
122 // FIXME: any use for also ordering by lumi-block ?
123 return lhs.m_run_number<rhs.m_run_number ||
124 ( lhs.m_run_number==rhs.m_run_number &&
125 lhs.m_event_number<rhs.m_event_number) ;
126 }
EventIDBase::m_event_number
uint64_t m_event_number
event number
Definition: EventIDBase.h:101
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:98

std::ostream& operator<< | ( | std::ostream & | os,
|  | const EventIDBase & | rhs
| ) |  |
| friend

Extraction operators.

Definition at line 146 of file EventIDBase.h.

146 {
147 os << "["
148 << rhs.m_run_number
149 << "," << rhs.m_event_number;
150
151 if ( rhs.m_time_stamp != 0 ) {
152 os << "," << rhs.m_time_stamp << ":" << rhs.m_time_stamp_ns_offset;
153 }
154
155 if ( rhs.m_lumiBlock != 0) {
156 os << ",l:" << rhs.m_lumiBlock;
157 }
158
159 if ( rhs.m_bunch_crossing_id != 0) {
160 os << ",b:" << rhs.m_bunch_crossing_id;
161 }
162 os << "]";
163 return os;
164 }
EventIDBase::m_event_number
uint64_t m_event_number
event number
Definition: EventIDBase.h:101
EventIDBase::m_lumiBlock
number_type m_lumiBlock
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:111
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:107
EventIDBase::m_bunch_crossing_id
number_type m_bunch_crossing_id
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:114
EventIDBase::m_time_stamp
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:104
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:98

bool operator<= | ( | const EventIDBase & | lhs,
|  | const EventIDBase & | rhs
| ) |  |
| friend

Definition at line 139 of file EventIDBase.h.

139 {
140 return !(lhs > rhs);
141 }

bool operator== | ( | const EventIDBase & | lhs,
|  | const EventIDBase & | rhs
| ) |  |
| friend

Definition at line 128 of file EventIDBase.h.

128 {
129 // We assume that equality via run/event numbers is sufficient
130 return lhs.m_run_number == rhs.m_run_number &&
131 lhs.m_event_number == rhs.m_event_number;
132 }
EventIDBase::m_event_number
uint64_t m_event_number
event number
Definition: EventIDBase.h:101
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:98

bool operator> | ( | const EventIDBase & | lhs,
|  | const EventIDBase & | rhs
| ) |  |
| friend

Definition at line 133 of file EventIDBase.h.

133 {
134 return !( (lhs < rhs) || (lhs == rhs));
135 }

bool operator>= | ( | const EventIDBase & | lhs,
|  | const EventIDBase & | rhs
| ) |  |
| friend

Definition at line 142 of file EventIDBase.h.

142 {
143 return !(lhs < rhs);
144 }

## Member Data Documentation

number_type EventIDBase::m_bunch_crossing_id {0}
| private

bunch crossing ID, 32 bit unsigned

Definition at line 114 of file EventIDBase.h.

uint64_t EventIDBase::m_event_number {0}
| private

event number

Definition at line 101 of file EventIDBase.h.

number_type EventIDBase::m_lumiBlock {0}
| private

luminosity block number: the number which uniquely tags a luminosity block within a run

Definition at line 111 of file EventIDBase.h.

number_type EventIDBase::m_run_number {0}
| private

run number

Definition at line 98 of file EventIDBase.h.

number_type EventIDBase::m_time_stamp {0}
| private

posix time in seconds since 1970/01/01

Definition at line 104 of file EventIDBase.h.

number_type EventIDBase::m_time_stamp_ns_offset {0}
| private

time stamp ns - ns time offset for time_stamp, 32 bit unsigned

Definition at line 107 of file EventIDBase.h.

The documentation for this class was generated from the following files:

- GaudiKernel/GaudiKernel/EventIDBase.h
- GaudiKernel/src/Lib/EventIDBase.cpp