| The Gaudi Framework v32r1 (f65d50dc)

EventIDRange.cpp
Go to the documentation of this file.
1 #include "GaudiKernel/EventIDRange.h"
2
3 /*****************************************************************************
4 *
5 * EventIDRange.cpp
6 *
7 * Author: Charles Leggett
8 *
9 * Validity Range object. Holds two EventIDBases (start and stop)
10 *
11 *****************************************************************************/
12
13 EventIDRange::EventIDRange()
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 ) {}
18
19 EventIDRange::EventIDRange( const EventIDBase& start, const EventIDBase& stop ) : 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 }
33
34 EventIDRange& EventIDRange::operator=( const EventIDRange& r ) {
35 if ( this != &r ) {
36 m_start = r.m_start;
37 m_stop = r.m_stop;
38 }
39 return *this;
40 }
41
42 std::ostream& operator<<( std::ostream& os, const EventIDRange& rhs ) {
43 os << (std::string)rhs;
44 return os;
45 }
EventIDBase::UNDEFNUM
static const number_type UNDEFNUM
Definition: EventIDBase.h:61
operator<<
std::ostream & operator<<(std::ostream &os, const EventIDRange &rhs)
Definition: EventIDRange.cpp:42
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
IOTest.start
def start
Definition: IOTest.py:97
std::string
STL class.
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
EventIDRange
Event ID Range object.
Definition: EventIDRange.h:23
EventIDRange::operator=
EventIDRange & operator=(const EventIDRange &r)
Definition: EventIDRange.cpp:34
EventIDBase::m_run_number
number_type m_run_number
run number
Definition: EventIDBase.h:183
EventIDRange::EventIDRange
EventIDRange()
Definition: EventIDRange.cpp:13
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.h
Event Range object.
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:66
std::ostream
STL class.