| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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 25 of file EventIDRange.h.

25 {};

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

Definition at line 13 of file EventIDRange.cpp.

15 : m_start(start), m_stop(stop) {
16 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:58
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:57

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:58
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:57

## Member Function Documentation

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

Definition at line 37 of file EventIDRange.h.

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

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

Definition at line 39 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:25
std::max
T max(T...args)
EventIDRange::intersect
static EventIDRange intersect(const EventIDRange &it)
Definition: EventIDRange.h:37
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:29
EventIDRange::start
EventIDBase start() const
Definition: EventIDRange.h:30

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

Definition at line 33 of file EventIDRange.h.

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

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

Definition at line 71 of file EventIDRange.h.

71 {
72 std::ostringstream os;
73 os << "{" << m_start << " - " << m_stop << "}";
74 return os.str();
75 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:58
std::ostringstream
STL class.
std::ostringstream::str
T str(T...args)
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:57

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

Definition at line 19 of file EventIDRange.cpp.

19 {
20 if (this != &r) {
21 m_start = r.m_start;
22 m_stop = r.m_stop;
23 }
24 return *this;
25 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:58
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:57

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:57

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:58

## Friends And Related Function Documentation

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

Definition at line 67 of file EventIDRange.h.

67 {
68 return ! (lhs == rhs);
69 }

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

Definition at line 28 of file EventIDRange.cpp.

28 {
29 os << (std::string) rhs;
30 return os;
31 }
std::string
STL class.

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

Definition at line 62 of file EventIDRange.h.

62 {
63 return lhs.m_start==rhs.m_start &&
64 lhs.m_stop==rhs.m_stop ;
65 }
EventIDRange::m_stop
EventIDBase m_stop
Definition: EventIDRange.h:58
EventIDRange::m_start
EventIDBase m_start
Definition: EventIDRange.h:57

## Member Data Documentation

EventIDBase EventIDRange::m_start {}
| private

Definition at line 57 of file EventIDRange.h.

EventIDBase EventIDRange::m_stop {}
| private

Definition at line 58 of file EventIDRange.h.

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

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