| The Gaudi Framework v30r0 (c919700c)

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

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

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::EventIDRange | ( |  | ) |
| inline

Definition at line 26 of file EventIDRange.h.

26 {};

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

Definition at line 13 of file EventIDRange.cpp.

13 : m_start( start ), m_stop( stop ) {}
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:57
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:56

EventIDRange::EventIDRange | ( | const EventIDRange & | r | ) |
| inline

Definition at line 28 of file EventIDRange.h.

28 : m_start( r.m_start ), m_stop( r.m_stop ){};
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:57
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:56

## Member Function Documentation

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

Definition at line 36 of file EventIDRange.h.

36 { return it; }
template<typename... T>

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

Definition at line 38 of file EventIDRange.h.

39 {
40 EventIDRange r = intersect( rest... );
41
42 EventIDBase i1 = std::max( first.start(), r.start() );
43 EventIDBase i2 = std::min( first.stop(), r.stop() );
44
45 return EventIDRange( i1, i2 );
46 }
std::min
T min(T...args)
EventIDRange
Event ID Range object.
Definition: EventIDRange.h:23
EventIDRange::EventIDRange
EventIDRange()
Definition: EventIDRange.h:26
std::max
T max(T...args)
EventIDRange::intersect
static EventIDRange intersect(const EventIDRange &it)
Definition: EventIDRange.h:36
EventIDRange::stop
EventIDBase stop() const
Definition: EventIDRange.h:32
EventIDBase
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventIDBase.h:29
EventIDRange::start
EventIDBase start() const
Definition: EventIDRange.h:31

bool EventIDRange::isInRange | ( | const EventIDBase & | t | ) | const
| inline

Definition at line 34 of file EventIDRange.h.

34 { return ( t >= m_start && t < m_stop ); }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:57
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:56

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

Definition at line 67 of file EventIDRange.h.

68 {
69 std::ostringstream os;
70 os << "{" << m_start << " - " << m_stop << "}";
71 return os.str();
72 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:57
std::ostringstream
STL class.
std::ostringstream::str
T str(T...args)
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:56

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

Definition at line 15 of file EventIDRange.cpp.

16 {
17 if ( this != &r ) {
18 m_start = r.m_start;
19 m_stop = r.m_stop;
20 }
21 return *this;
22 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:57
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:56

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

Definition at line 31 of file EventIDRange.h.

31 { return m_start; }
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:56

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

Definition at line 32 of file EventIDRange.h.

32 { return m_stop; }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:57

## Friends And Related Function Documentation

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

Definition at line 65 of file EventIDRange.h.

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

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

Definition at line 24 of file EventIDRange.cpp.

25 {
26 os << (std::string)rhs;
27 return os;
28 }
std::string
STL class.

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

Definition at line 60 of file EventIDRange.h.

61 {
62 return lhs.m_start == rhs.m_start && lhs.m_stop == rhs.m_stop;
63 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:57
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:56

## Member Data Documentation

EventIDBase EventIDRange::m_start {}
| private

Definition at line 56 of file EventIDRange.h.

EventIDBase EventIDRange::m_stop {}
| private

Definition at line 57 of file EventIDRange.h.

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

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