| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
EventIDRange Class Reference

Event ID Range object. More...

`#include <GaudiKernel/EventIDRange.h>`

Collaboration diagram for EventIDRange:
[legend]

## Public Member Functions
| EventIDRange ()
| EventIDRange (const EventIDBase &start, const EventIDBase &stop)
| EventIDRange (const EventIDRange &r)
EventIDRange & | operator= (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::ostream & | operator<< (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() [1/3]

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 )
16 , m_stop( EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM,
17 EventIDBase::UNDEFNUM, 0 ) {}
EventIDBase::UNDEFNUM
static const number_type UNDEFNUM
Definition: EventIDBase.h:61
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:67
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66
EventIDBase::UNDEFEVT
static const event_number_t UNDEFEVT
Definition: EventIDBase.h:62

## ◆ EventIDRange() [2/3]

EventIDRange::EventIDRange | ( | const EventIDBase & | start,
|  | const EventIDBase & | stop
| ) |  |

Definition at line 19 of file EventIDRange.cpp.

19 : m_start( start ), m_stop( stop ) {
20
21 // For pure time-stamp range, re-adjust start so that it covers O-INF in terms of run-lumi
22 if ( m_start.m_run_number == EventIDBase::UNDEFNUM ) {
23 m_start.m_run_number = 0;
24 m_start.m_event_number = 0;
25 m_start.m_lumi_block = 0;
26 }
27 // For pure run/lumi range, re-adjust start so that it covers 0-inf in terms of time-stamp
28 else if ( m_start.m_time_stamp == EventIDBase::UNDEFNUM ) {
29 m_start.m_time_stamp = 0;
30 m_start.m_time_stamp_ns_offset = 0;
31 }
32 }
EventIDBase::UNDEFNUM
static const number_type UNDEFNUM
Definition: EventIDBase.h:61
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:192
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:67
EventIDBase::m_event_number
event_number_t m_event_number
event number
Definition: EventIDBase.h:186
EventIDBase::m_time_stamp
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:189
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:196
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:183
EventIDRange::stop
EventIDBase stop() const
Definition: EventIDRange.h:31
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66
EventIDRange::start
EventIDBase start() const
Definition: EventIDRange.h:30

## ◆ EventIDRange() [3/3]

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 ){};
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:67
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66

## Member Function Documentation

## ◆ intersect() [1/2]

static EventIDRange EventIDRange::intersect | ( | const EventIDRange & | it | ) |
| inline static

Definition at line 47 of file EventIDRange.h.

47 { return it; }

## ◆ intersect() [2/2]

template<typename... T>

static EventIDRange EventIDRange::intersect | ( | const EventIDRange & | first,
|  | const T &... | rest
| ) |  |
| inline static

Definition at line 49 of file EventIDRange.h.

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

## ◆ isInRange()

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 ) >= // run/lumi larger than run/lumi of start
35 std::tie( m_start.m_run_number, m_start.m_lumi_block, m_start.m_event_number ) &&
36
37 std::tie( t.m_run_number, t.m_lumi_block, t.m_event_number ) < // run/lumi smaller than run/lumi of stop
38 std::tie( m_stop.m_run_number, m_stop.m_lumi_block, m_stop.m_event_number ) &&
39
40 std::tie( t.m_time_stamp, t.m_time_stamp_ns_offset ) >= // time-stamp larger than time-stamp of start
41 std::tie( m_start.m_time_stamp, m_start.m_time_stamp_ns_offset ) &&
42
43 std::tie( t.m_time_stamp, t.m_time_stamp_ns_offset ) < // time-stap smaller than time-tamp of stop
44 std::tie( m_stop.m_time_stamp, m_stop.m_time_stamp_ns_offset ) );
45 }
std::tie
T tie(T... args)
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:192
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:67
EventIDBase::m_event_number
event_number_t m_event_number
event number
Definition: EventIDBase.h:186
EventIDBase::m_time_stamp
number_type m_time_stamp
posix time in seconds since 1970/01/01
Definition: EventIDBase.h:189
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:196
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:183
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66

## ◆ operator std::string()

EventIDRange::operator std::string | ( |  | ) | const
| inline

Definition at line 76 of file EventIDRange.h.

76 {
77 std::ostringstream os;
78 os << "{" << m_start << " - " << m_stop << "}";
79 return os.str();
80 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:67
std::ostringstream
STL class.
std::ostringstream::str
T str(T... args)
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66

## ◆ operator=()

EventIDRange & EventIDRange::operator= | ( | const EventIDRange & | r | ) |

Definition at line 34 of file EventIDRange.cpp.

34 {
35 if ( this != &r ) {
36 m_start = r.m_start;
37 m_stop = r.m_stop;
38 }
39 return *this;
40 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:67
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66

## ◆ start()

EventIDBase EventIDRange::start | ( |  | ) | const
| inline

Definition at line 30 of file EventIDRange.h.

30 { return m_start; }
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66

## ◆ stop()

EventIDBase EventIDRange::stop | ( |  | ) | const
| inline

Definition at line 31 of file EventIDRange.h.

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

## Friends And Related Function Documentation

## ◆ operator!=

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

Definition at line 74 of file EventIDRange.h.

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

## ◆ operator<<

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

Definition at line 42 of file EventIDRange.cpp.

42 {
43 os << (std::string)rhs;
44 return os;
45 }
std::string
STL class.

## ◆ operator==

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

Definition at line 70 of file EventIDRange.h.

70 {
71 return lhs.m_start == rhs.m_start && lhs.m_stop == rhs.m_stop;
72 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:67
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66

## Member Data Documentation

## ◆ m_start

EventIDBase EventIDRange::m_start {}
| private

Definition at line 66 of file EventIDRange.h.

## ◆ m_stop

EventIDBase EventIDRange::m_stop {}
| private

Definition at line 67 of file EventIDRange.h.

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

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