The Gaudi Framework  v33r0 (d5ea422b)
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
 
typedef uint64_t event_number_t
 

Public Member Functions

number_type run_number () const
 run number - 32 bit unsigned More...
 
event_number_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 (event_number_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...
 
bool isRunEvent () const
 
bool isTimeStamp () const
 
bool isLumiEvent () const
 
bool isRunLumi () const
 
bool isValid () const
 
structors
 EventIDBase ()
 
 EventIDBase (number_type run_number, event_number_t event_number, number_type time_stamp=UNDEFNUM, number_type time_stamp_ns_offset=0, number_type lumi_block=UNDEFNUM, number_type bunch_crossing_id=0)
 
 EventIDBase (std::tuple< number_type, number_type, event_number_t > run_lumi_ev, std::tuple< number_type, number_type > time_stamp, number_type bunch_crossing_id)
 
virtual ~EventIDBase ()=default
 

Static Public Member Functions

static auto SortByTimeStamp ()
 
static auto SortByRunEvent ()
 
static auto SortByLumiEvent ()
 
static auto SortByRunLumi ()
 

Static Public Attributes

static const number_type UNDEFNUM = std::numeric_limits<EventIDBase::number_type>::max()
 
static const event_number_t UNDEFEVT = std::numeric_limits<EventIDBase::event_number_t>::max()
 

Private Types

enum  Type {
  Invalid = 0, RunEvent = 1 << 1, TimeStamp = 1 << 2, LumiEvent = 1 << 3,
  RunLumi = 1 << 4
}
 

Private Member Functions

void setRE ()
 
void setTS ()
 
void setLE ()
 
void setRL ()
 

Private Attributes

unsigned m_type {Invalid}
 
number_type m_run_number {UNDEFNUM}
 run number More...
 
event_number_t m_event_number {UNDEFEVT}
 event number More...
 
number_type m_time_stamp {UNDEFNUM}
 posix time in seconds since 1970/01/01 More...
 
number_type m_time_stamp_ns_offset {UNDEFNUM}
 time stamp ns - ns time offset for time_stamp, 32 bit unsigned More...
 
number_type m_lumi_block {UNDEFNUM}
 luminosity block number: the number which uniquely tags a luminosity block within a run More...
 
number_type m_bunch_crossing_id {UNDEFNUM}
 bunch crossing ID, 32 bit unsigned More...
 

Friends

class EventIDRange
 
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)
 
EventIDBase min (const EventIDBase &lhs, const EventIDBase &rhs)
 
EventIDBase max (const EventIDBase &lhs, const EventIDBase &rhs)
 
std::ostreamoperator<< (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 66 of file EventIDBase.h.

Member Typedef Documentation

◆ event_number_t

Definition at line 69 of file EventIDBase.h.

◆ number_type

typedef unsigned int EventIDBase::number_type

Definition at line 68 of file EventIDBase.h.

Member Enumeration Documentation

◆ Type

enum EventIDBase::Type
private
Enumerator
Invalid 
RunEvent 
TimeStamp 
LumiEvent 
RunLumi 

Definition at line 183 of file EventIDBase.h.

Constructor & Destructor Documentation

◆ EventIDBase() [1/3]

EventIDBase::EventIDBase ( )
inline

Definition at line 79 of file EventIDBase.h.

79 {};

◆ EventIDBase() [2/3]

EventIDBase::EventIDBase ( number_type  run_number,
event_number_t  event_number,
number_type  time_stamp = UNDEFNUM,
number_type  time_stamp_ns_offset = 0,
number_type  lumi_block = UNDEFNUM,
number_type  bunch_crossing_id = 0 
)

Definition at line 27 of file EventIDBase.cpp.

36 
37  if ( m_time_stamp != UNDEFNUM ) {
38  setTS();
40  }
41 
43 
45 }
static const number_type UNDEFNUM
Definition: EventIDBase.h:71
void setLE()
Definition: EventIDBase.h:189
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:202
number_type lumi_block() const
luminosity block identifier, 32 bit unsigned
Definition: EventIDBase.h:104
number_type m_bunch_crossing_id
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:209
void setRE()
Definition: EventIDBase.h:187
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
event_number_t event_number() const
event number - 64 bit unsigned
Definition: EventIDBase.h:95
void setRL()
Definition: EventIDBase.h:190
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:199
number_type run_number() const
run number - 32 bit unsigned
Definition: EventIDBase.h:92
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193
number_type time_stamp() const
time stamp - posix time in seconds from 1970, 32 bit unsigned
Definition: EventIDBase.h:98
number_type time_stamp_ns_offset() const
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:101
number_type bunch_crossing_id() const
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:107
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:72
void setTS()
Definition: EventIDBase.h:188

◆ EventIDBase() [3/3]

EventIDBase::EventIDBase ( std::tuple< number_type, number_type, event_number_t run_lumi_ev,
std::tuple< number_type, number_type time_stamp,
number_type  bunch_crossing_id 
)

Definition at line 47 of file EventIDBase.cpp.

49  : EventIDBase( std::get<0>( run_lumi_ev ), // run number
50  std::get<2>( run_lumi_ev ), // event number
51  std::get<0>( time_stamp ), // timestamp in seconds
52  std::get<1>( time_stamp ), // nanoseconds offst
53  std::get<1>( run_lumi_ev ), // lumi block
number_type time_stamp() const
time stamp - posix time in seconds from 1970, 32 bit unsigned
Definition: EventIDBase.h:98
number_type bunch_crossing_id() const
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:107

◆ ~EventIDBase()

virtual EventIDBase::~EventIDBase ( )
virtualdefault

Member Function Documentation

◆ bunch_crossing_id()

number_type EventIDBase::bunch_crossing_id ( ) const
inline

bunch crossing ID, 32 bit unsigned

Definition at line 107 of file EventIDBase.h.

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

◆ event_number()

event_number_t EventIDBase::event_number ( ) const
inline

event number - 64 bit unsigned

Definition at line 95 of file EventIDBase.h.

95 { return m_event_number; }
event_number_t m_event_number
event number
Definition: EventIDBase.h:196

◆ isLumiEvent()

bool EventIDBase::isLumiEvent ( ) const
inline

Definition at line 155 of file EventIDBase.h.

155 { return m_type & LumiEvent; }
unsigned m_type
Definition: EventIDBase.h:185

◆ isRunEvent()

bool EventIDBase::isRunEvent ( ) const
inline

Definition at line 153 of file EventIDBase.h.

153 { return m_type & RunEvent; }
unsigned m_type
Definition: EventIDBase.h:185

◆ isRunLumi()

bool EventIDBase::isRunLumi ( ) const
inline

Definition at line 156 of file EventIDBase.h.

156 { return m_type & RunLumi; }
unsigned m_type
Definition: EventIDBase.h:185

◆ isTimeStamp()

bool EventIDBase::isTimeStamp ( ) const
inline

Definition at line 154 of file EventIDBase.h.

154 { return m_type & TimeStamp; }
unsigned m_type
Definition: EventIDBase.h:185

◆ isValid()

bool EventIDBase::isValid ( ) const
inline

Definition at line 157 of file EventIDBase.h.

157 { return m_type != Invalid; }
unsigned m_type
Definition: EventIDBase.h:185

◆ lumi_block()

number_type EventIDBase::lumi_block ( ) const
inline

luminosity block identifier, 32 bit unsigned

Definition at line 104 of file EventIDBase.h.

104 { return 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:206

◆ run_number()

number_type EventIDBase::run_number ( ) const
inline

run number - 32 bit unsigned

Definition at line 92 of file EventIDBase.h.

92 { return m_run_number; }
number_type m_run_number
run number
Definition: EventIDBase.h:193

◆ set_bunch_crossing_id()

void EventIDBase::set_bunch_crossing_id ( number_type  bcid)
inline

set bunch crossing ID

Definition at line 140 of file EventIDBase.h.

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

◆ set_event_number()

void EventIDBase::set_event_number ( event_number_t  eventNumber)
inline

set event number

Definition at line 117 of file EventIDBase.h.

117  {
118  m_event_number = eventNumber;
119  if ( m_run_number != UNDEFNUM ) setRE();
120  if ( m_lumi_block != UNDEFNUM ) setLE();
121  }
static const number_type UNDEFNUM
Definition: EventIDBase.h:71
void setLE()
Definition: EventIDBase.h:189
void setRE()
Definition: EventIDBase.h:187
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193

◆ set_lumi_block()

void EventIDBase::set_lumi_block ( number_type  lumiBlock)
inline

set luminosity block identifier

Definition at line 133 of file EventIDBase.h.

133  {
134  m_lumi_block = lumiBlock;
135  if ( m_run_number != UNDEFNUM ) setRL();
136  if ( m_event_number != UNDEFEVT ) setLE();
137  }
static const number_type UNDEFNUM
Definition: EventIDBase.h:71
void setLE()
Definition: EventIDBase.h:189
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
void setRL()
Definition: EventIDBase.h:190
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:72

◆ set_run_number()

void EventIDBase::set_run_number ( number_type  runNumber)
inline

set run number

Definition at line 110 of file EventIDBase.h.

110  {
111  m_run_number = runNumber;
112  if ( m_event_number != UNDEFEVT ) setRE();
113  if ( m_lumi_block != UNDEFNUM ) setRL();
114  }
static const number_type UNDEFNUM
Definition: EventIDBase.h:71
void setRE()
Definition: EventIDBase.h:187
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
void setRL()
Definition: EventIDBase.h:190
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:72

◆ set_time_stamp()

void EventIDBase::set_time_stamp ( number_type  timeStamp)
inline

set time stamp

Definition at line 124 of file EventIDBase.h.

124  {
125  m_time_stamp = timeStamp;
126  setTS();
127  }
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:199
void setTS()
Definition: EventIDBase.h:188

◆ set_time_stamp_ns_offset()

void EventIDBase::set_time_stamp_ns_offset ( number_type  timeStampNs)
inline

set time stamp in ns

Definition at line 130 of file EventIDBase.h.

130 { m_time_stamp_ns_offset = timeStampNs; }
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:202

◆ setLE()

void EventIDBase::setLE ( )
inlineprivate

Definition at line 189 of file EventIDBase.h.

◆ setRE()

void EventIDBase::setRE ( )
inlineprivate

Definition at line 187 of file EventIDBase.h.

◆ setRL()

void EventIDBase::setRL ( )
inlineprivate

Definition at line 190 of file EventIDBase.h.

◆ setTS()

void EventIDBase::setTS ( )
inlineprivate

Definition at line 188 of file EventIDBase.h.

◆ SortByLumiEvent()

static auto EventIDBase::SortByLumiEvent ( )
inlinestatic

Definition at line 172 of file EventIDBase.h.

172  {
174  ::details::make_cmp( []( const EventIDBase& e ) { return std::tie( e.m_lumi_block, e.m_event_number ); } ) );
175  };
T tie(T... args)
auto add_deref(Fun f)
Definition: EventIDBase.h:46
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
auto make_cmp(Proj p, Cmp cmp={})
Definition: EventIDBase.h:51
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventIDBase.h:66

◆ SortByRunEvent()

static auto EventIDBase::SortByRunEvent ( )
inlinestatic

Definition at line 167 of file EventIDBase.h.

167  {
169  ::details::make_cmp( []( const EventIDBase& e ) { return std::tie( e.m_run_number, e.m_event_number ); } ) );
170  };
T tie(T... args)
auto add_deref(Fun f)
Definition: EventIDBase.h:46
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
number_type m_run_number
run number
Definition: EventIDBase.h:193
auto make_cmp(Proj p, Cmp cmp={})
Definition: EventIDBase.h:51
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventIDBase.h:66

◆ SortByRunLumi()

static auto EventIDBase::SortByRunLumi ( )
inlinestatic

Definition at line 177 of file EventIDBase.h.

177  {
179  ::details::make_cmp( []( const EventIDBase& e ) { return std::tie( e.m_run_number, e.m_lumi_block ); } ) );
180  };
T tie(T... args)
auto add_deref(Fun f)
Definition: EventIDBase.h:46
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193
auto make_cmp(Proj p, Cmp cmp={})
Definition: EventIDBase.h:51
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventIDBase.h:66

◆ SortByTimeStamp()

static auto EventIDBase::SortByTimeStamp ( )
inlinestatic

Definition at line 162 of file EventIDBase.h.

162  {
164  []( const EventIDBase& e ) { return std::tie( e.m_time_stamp, e.m_time_stamp_ns_offset ); } ) );
165  };
T tie(T... args)
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:202
auto add_deref(Fun f)
Definition: EventIDBase.h:46
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:199
auto make_cmp(Proj p, Cmp cmp={})
Definition: EventIDBase.h:51
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventIDBase.h:66

◆ time_stamp()

number_type EventIDBase::time_stamp ( ) const
inline

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

Definition at line 98 of file EventIDBase.h.

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

◆ time_stamp_ns_offset()

number_type EventIDBase::time_stamp_ns_offset ( ) const
inline

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

Definition at line 101 of file EventIDBase.h.

101 { return 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:202

Friends And Related Function Documentation

◆ EventIDRange

friend class EventIDRange
friend

Definition at line 74 of file EventIDBase.h.

◆ max

EventIDBase max ( const EventIDBase lhs,
const EventIDBase rhs 
)
friend

Definition at line 225 of file EventIDBase.h.

225  {
226 
227  //"max" is much trickier because we need to handle invalid number explicilty by
228  // checking if a EventIDBase is TS or Run/Lumi
229 
232 
233  if ( lhs.isTimeStamp() && rhs.isTimeStamp() ) { // both time-stamp, compare them
236  } else if ( lhs.isTimeStamp() ) { // only lhs time-stamp: Use it
238  } else { // otherwise use rhs time-stamp which might be UNDEFNUM (in case both input values are Run-Lumi only)
240  }
241 
242  if ( lhs.isRunLumi() && rhs.isRunLumi() ) { // both run-lumi, compare them
243  run_lumi_ev = std::max( std::tie( lhs.m_run_number, lhs.m_lumi_block, lhs.m_event_number ),
245 
246  } else if ( lhs.isRunLumi() ) { // only lhs run-lumi: Use it
247  run_lumi_ev = std::tie( lhs.m_run_number, lhs.m_lumi_block, lhs.m_event_number );
248  } else { // otherwise use rhs run-lumi which might be UNDEFNUM (in case both input values are TS-only)
249  run_lumi_ev = std::tie( rhs.m_run_number, rhs.m_lumi_block, rhs.m_event_number );
250  }
251 
252  return EventIDBase( run_lumi_ev, time_stamp, lhs.bunch_crossing_id() );
253 }
bool isRunLumi() const
Definition: EventIDBase.h:156
T tie(T... args)
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:202
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:199
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193
number_type time_stamp() const
time stamp - posix time in seconds from 1970, 32 bit unsigned
Definition: EventIDBase.h:98
T max(T... args)
number_type bunch_crossing_id() const
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:107
bool isTimeStamp() const
Definition: EventIDBase.h:154

◆ min

EventIDBase min ( const EventIDBase lhs,
const EventIDBase rhs 
)
friend

Definition at line 212 of file EventIDBase.h.

212  {
213 
214  //"min" is easy b/c the numbers denoting invalidty for TS or Run/Event/LB are the
215  // largest possible numbers, so naturally larger than any valid number
216 
221  lhs.bunch_crossing_id() // bcid doesn't really matter here
222  );
223 }
T tie(T... args)
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:202
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:199
T min(T... args)
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193
number_type bunch_crossing_id() const
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:107

◆ operator!=

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

Definition at line 146 of file EventIDBase.h.

146 { return !( lhs == rhs ); }

◆ operator<

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

Definition at line 255 of file EventIDBase.h.

255  {
256  // first try ordering by timestamp if both are non-zero
257  // then try ordering by run/lumi/event
258  // this assumes that both EventIDBase have the same set of values defined.
259 
260  if ( lhs.isTimeStamp() && rhs.isTimeStamp() ) {
261  return lhs.m_time_stamp < rhs.m_time_stamp;
262  } else {
263  return std::tie( lhs.m_run_number, lhs.m_lumi_block, lhs.m_event_number ) <
265  }
266 }
T tie(T... args)
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:199
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193
bool isTimeStamp() const
Definition: EventIDBase.h:154

◆ operator<<

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

Extraction operators.

Definition at line 274 of file EventIDBase.h.

274  {
275  if ( rhs.m_type == EventIDBase::Invalid ) return os << "[INVALID]";
276 
277  const char* separator = "";
278  os << "[";
279  if ( rhs.m_run_number != EventIDBase::UNDEFNUM ) {
280  os << rhs.m_run_number;
281  separator = ",";
282  }
283 
284  if ( rhs.m_event_number != EventIDBase::UNDEFEVT ) {
285  os << separator << rhs.m_event_number;
286  separator = ",";
287  }
288 
289  if ( rhs.isTimeStamp() ) {
290  os << separator << "t:" << rhs.m_time_stamp;
291  if ( rhs.m_time_stamp_ns_offset != 0 ) {
292  os << "." << std::setfill( '0' ) << std::setw( 9 ) << rhs.m_time_stamp_ns_offset;
293  }
294  separator = ",";
295  }
296 
297  if ( rhs.isLumiEvent() || rhs.isRunLumi() ) {
298  os << separator << "l:" << rhs.m_lumi_block;
299  separator = ",";
300  }
301 
302  if ( rhs.m_bunch_crossing_id != 0 ) { os << separator << "b:" << rhs.m_bunch_crossing_id; }
303  os << "]";
304  return os;
305 }
static const number_type UNDEFNUM
Definition: EventIDBase.h:71
unsigned m_type
Definition: EventIDBase.h:185
bool isRunLumi() const
Definition: EventIDBase.h:156
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
Definition: EventIDBase.h:202
number_type m_bunch_crossing_id
bunch crossing ID, 32 bit unsigned
Definition: EventIDBase.h:209
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
T setw(T... args)
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:199
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
T setfill(T... args)
number_type m_run_number
run number
Definition: EventIDBase.h:193
bool isLumiEvent() const
Definition: EventIDBase.h:155
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:72
bool isTimeStamp() const
Definition: EventIDBase.h:154

◆ operator<=

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

Definition at line 147 of file EventIDBase.h.

147 { return !( lhs > rhs ); }

◆ operator==

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

Comparison operators.

Definition at line 268 of file EventIDBase.h.

268  {
269  // We assume that equality via run/event/lumi numbers is sufficient
270  return ( lhs.m_run_number == rhs.m_run_number && lhs.m_event_number == rhs.m_event_number &&
271  lhs.m_lumi_block == rhs.m_lumi_block );
272 }
event_number_t m_event_number
event number
Definition: EventIDBase.h:196
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
Definition: EventIDBase.h:206
number_type m_run_number
run number
Definition: EventIDBase.h:193

◆ operator>

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

Definition at line 145 of file EventIDBase.h.

145 { return rhs < lhs; }

◆ operator>=

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

Definition at line 148 of file EventIDBase.h.

148 { return !( lhs < rhs ); }

Member Data Documentation

◆ m_bunch_crossing_id

number_type EventIDBase::m_bunch_crossing_id {UNDEFNUM}
private

bunch crossing ID, 32 bit unsigned

Definition at line 209 of file EventIDBase.h.

◆ m_event_number

event_number_t EventIDBase::m_event_number {UNDEFEVT}
private

event number

Definition at line 196 of file EventIDBase.h.

◆ m_lumi_block

number_type EventIDBase::m_lumi_block {UNDEFNUM}
private

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

Definition at line 206 of file EventIDBase.h.

◆ m_run_number

number_type EventIDBase::m_run_number {UNDEFNUM}
private

run number

Definition at line 193 of file EventIDBase.h.

◆ m_time_stamp

number_type EventIDBase::m_time_stamp {UNDEFNUM}
private

posix time in seconds since 1970/01/01

Definition at line 199 of file EventIDBase.h.

◆ m_time_stamp_ns_offset

number_type EventIDBase::m_time_stamp_ns_offset {UNDEFNUM}
private

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

Definition at line 202 of file EventIDBase.h.

◆ m_type

unsigned EventIDBase::m_type {Invalid}
private

Definition at line 185 of file EventIDBase.h.

◆ UNDEFEVT

Definition at line 72 of file EventIDBase.h.

◆ UNDEFNUM

Definition at line 71 of file EventIDBase.h.


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