The Gaudi Framework  v31r0 (aeb156f0)
EventIDRange Class Reference

Event ID Range object. More...

#include <GaudiKernel/EventIDRange.h>

Collaboration diagram for EventIDRange:

Public Member Functions

 EventIDRange ()
 
 EventIDRange (const EventIDBase &start, const EventIDBase &stop)
 
 EventIDRange (const EventIDRange &r)
 
EventIDRangeoperator= (const EventIDRange &r)
 
EventIDBase start () const
 
EventIDBase stop () const
 
bool isInRange (const EventIDBase &t) const
 
 operator std::string () const
 

Static Public Member Functions

static EventIDRange intersect (const EventIDRange &it)
 
template<typename... T>
static EventIDRange intersect (const EventIDRange &first, const T &...rest)
 

Private Attributes

EventIDBase m_start {}
 
EventIDBase m_stop {}
 

Friends

bool operator== (const EventIDRange &lhs, const EventIDRange &rhs)
 
bool operator!= (const EventIDRange &lhs, const EventIDRange &rhs)
 
std::ostreamoperator<< (std::ostream &os, const EventIDRange &rhs)
 

Detailed Description

Event ID Range object.

Holds two EventIDBases (start and stop)

Definition at line 23 of file EventIDRange.h.

Constructor & Destructor Documentation

EventIDRange::EventIDRange ( )

Definition at line 13 of file EventIDRange.cpp.

14  : // defauld constructor: Range covering everything
15  m_start( 0, 0, 0, 0, 0, 0 )
17  EventIDBase::UNDEFNUM, 0 ) {}
static const number_type UNDEFNUM
Definition: EventIDBase.h:61
EventIDBase m_stop
Definition: EventIDRange.h:64
EventIDBase m_start
Definition: EventIDRange.h:63
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:62
EventIDRange::EventIDRange ( const EventIDBase start,
const EventIDBase stop 
)

Definition at line 19 of file EventIDRange.cpp.

19 : m_start( start ), m_stop( stop ) {}
EventIDBase m_stop
Definition: EventIDRange.h:64
EventIDBase m_start
Definition: EventIDRange.h:63
EventIDRange::EventIDRange ( const EventIDRange r)
inline

Definition at line 27 of file EventIDRange.h.

27 : m_start( r.m_start ), m_stop( r.m_stop ){};
EventIDBase m_stop
Definition: EventIDRange.h:64
EventIDBase m_start
Definition: EventIDRange.h:63

Member Function Documentation

static EventIDRange EventIDRange::intersect ( const EventIDRange it)
inlinestatic

Definition at line 44 of file EventIDRange.h.

44 { return it; }
template<typename... T>
static EventIDRange EventIDRange::intersect ( const EventIDRange first,
const T &...  rest 
)
inlinestatic

Definition at line 46 of file EventIDRange.h.

46  {
47  EventIDRange r = intersect( rest... );
48 
49  EventIDBase i1 = max( first.start(), r.start() );
50  EventIDBase i2 = min( first.stop(), r.stop() );
51 
52  return EventIDRange( i1, i2 );
53  }
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:202
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:215
Event ID Range object.
Definition: EventIDRange.h:23
static EventIDRange intersect(const EventIDRange &it)
Definition: EventIDRange.h:44
EventIDBase stop() const
Definition: EventIDRange.h:31
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventIDBase.h:56
EventIDBase start() const
Definition: EventIDRange.h:30
bool EventIDRange::isInRange ( const EventIDBase t) const
inline

Definition at line 33 of file EventIDRange.h.

33  { // return ( t >= m_start && t < m_stop ); }
34  return ( std::tie( t.m_run_number, t.m_lumi_block, t.m_event_number ) >=
42  }
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:192
EventIDBase m_stop
Definition: EventIDRange.h:64
event_number_t m_event_number
event number
Definition: EventIDBase.h:186
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:189
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run ...
Definition: EventIDBase.h:196
number_type m_run_number
run number
Definition: EventIDBase.h:183
EventIDBase m_start
Definition: EventIDRange.h:63
EventIDRange::operator std::string ( ) const
inline

Definition at line 73 of file EventIDRange.h.

73  {
75  os << "{" << m_start << " - " << m_stop << "}";
76  return os.str();
77 }
EventIDBase m_stop
Definition: EventIDRange.h:64
EventIDBase m_start
Definition: EventIDRange.h:63
EventIDRange & EventIDRange::operator= ( const EventIDRange r)

Definition at line 21 of file EventIDRange.cpp.

21  {
22  if ( this != &r ) {
23  m_start = r.m_start;
24  m_stop = r.m_stop;
25  }
26  return *this;
27 }
EventIDBase m_stop
Definition: EventIDRange.h:64
EventIDBase m_start
Definition: EventIDRange.h:63
EventIDBase EventIDRange::start ( ) const
inline

Definition at line 30 of file EventIDRange.h.

30 { return m_start; }
EventIDBase m_start
Definition: EventIDRange.h:63
EventIDBase EventIDRange::stop ( ) const
inline

Definition at line 31 of file EventIDRange.h.

31 { return m_stop; }
EventIDBase m_stop
Definition: EventIDRange.h:64

Friends And Related Function Documentation

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

Definition at line 71 of file EventIDRange.h.

71 { return !( lhs == rhs ); }
std::ostream& operator<< ( std::ostream os,
const EventIDRange rhs 
)
friend

Definition at line 29 of file EventIDRange.cpp.

29  {
30  os << (std::string)rhs;
31  return os;
32 }
STL class.
bool operator== ( const EventIDRange lhs,
const EventIDRange rhs 
)
friend

Definition at line 67 of file EventIDRange.h.

67  {
68  return lhs.m_start == rhs.m_start && lhs.m_stop == rhs.m_stop;
69 }
EventIDBase m_stop
Definition: EventIDRange.h:64
EventIDBase m_start
Definition: EventIDRange.h:63

Member Data Documentation

EventIDBase EventIDRange::m_start {}
private

Definition at line 63 of file EventIDRange.h.

EventIDBase EventIDRange::m_stop {}
private

Definition at line 64 of file EventIDRange.h.


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