CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
EventID Class Reference

#include <EventID.h>

Public Types

typedef unsigned int number_type
 

Public Member Functions

 EventID ()
 
 EventID (number_type run_number, number_type event_number)
 
 EventID (number_type run_number, number_type event_number, number_type time_stamp)
 
 EventID (const EventID &id)
 
virtual ~EventID ()
 
number_type run_number (void) const
 
number_type event_number (void) const
 
number_type time_stamp (void) const
 

Friends

bool operator< (const EventID &lhs, const EventID &rhs)
 
bool operator> (const EventID &lhs, const EventID &rhs)
 
bool operator== (const EventID &lhs, const EventID &rhs)
 
bool operator!= (const EventID &lhs, const EventID &rhs)
 
bool operator<= (const EventID &lhs, const EventID &rhs)
 
bool operator>= (const EventID &lhs, const EventID &rhs)
 
std::istream & operator>> (std::istream &is, EventID &rhs)
 
template<class STR >
STR & operator<< (STR &os, const EventID &rhs)
 

Detailed Description

Definition at line 28 of file EventID.h.

Member Typedef Documentation

◆ number_type

unsigned int EventID::number_type

Definition at line 31 of file EventID.h.

Constructor & Destructor Documentation

◆ EventID() [1/4]

EventID::EventID ( )

Definition at line 22 of file EventID.cxx.

22 :
23 m_run_number(0),
24 m_event_number(0),
25 m_time_stamp(0)
26{}

◆ EventID() [2/4]

EventID::EventID ( number_type run_number,
number_type event_number )

Definition at line 28 of file EventID.cxx.

30 :
31 m_run_number(run_number),
32 m_event_number(event_number),
33 m_time_stamp(0)
34{}
number_type run_number(void) const
Definition EventID.cxx:55
number_type event_number(void) const
Definition EventID.cxx:61

◆ EventID() [3/4]

EventID::EventID ( number_type run_number,
number_type event_number,
number_type time_stamp )

Definition at line 36 of file EventID.cxx.

39 :
40 m_run_number(run_number),
41 m_event_number(event_number),
42 m_time_stamp(time_stamp)
43{}
number_type time_stamp(void) const
Definition EventID.cxx:67

◆ EventID() [4/4]

EventID::EventID ( const EventID & id)
explicit

Definition at line 45 of file EventID.cxx.

45 :
46 m_run_number(id.m_run_number),
47 m_event_number(id.m_event_number),
48 m_time_stamp(id.m_time_stamp)
49{}

◆ ~EventID()

EventID::~EventID ( )
virtual

Definition at line 51 of file EventID.cxx.

52{}

Member Function Documentation

◆ event_number()

EventID::number_type EventID::event_number ( void ) const

Definition at line 61 of file EventID.cxx.

62{
63 return m_event_number;
64}

◆ run_number()

EventID::number_type EventID::run_number ( void ) const

Definition at line 55 of file EventID.cxx.

56{
57 return m_run_number;
58}

◆ time_stamp()

EventID::number_type EventID::time_stamp ( void ) const

Definition at line 67 of file EventID.cxx.

68{
69 return m_time_stamp;
70}

Friends And Related Symbol Documentation

◆ operator!=

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

Definition at line 86 of file EventID.h.

86 {
87 return !(lhs == rhs);
88}

◆ operator<

bool operator< ( const EventID & lhs,
const EventID & rhs )
friend

Definition at line 72 of file EventID.h.

72 {
73 // We are assuming that ALL events will have run and event numbers,
74 // and never just a time stamp.
75 return lhs.m_run_number<rhs.m_run_number ||
76 ( lhs.m_run_number==rhs.m_run_number &&
77 lhs.m_event_number<rhs.m_event_number) ;
78}

◆ operator<<

template<class STR >
STR & operator<< ( STR & os,
const EventID & rhs )
friend

Definition at line 97 of file EventID.h.

97 {
98 os << "[R,E] = [" << rhs.m_run_number << "," << rhs.m_event_number << "]";
99 return os;
100}

◆ operator<=

bool operator<= ( const EventID & lhs,
const EventID & rhs )
friend

Definition at line 89 of file EventID.h.

89 {
90 return !(lhs > rhs);
91}

◆ operator==

bool operator== ( const EventID & lhs,
const EventID & rhs )
friend

Definition at line 79 of file EventID.h.

79 {
80 return lhs.m_run_number==rhs.m_run_number &&
81 lhs.m_event_number==rhs.m_event_number ;
82}

◆ operator>

bool operator> ( const EventID & lhs,
const EventID & rhs )
friend

Definition at line 83 of file EventID.h.

83 {
84 return !( (lhs < rhs) || (lhs == rhs));
85}

◆ operator>=

bool operator>= ( const EventID & lhs,
const EventID & rhs )
friend

Definition at line 92 of file EventID.h.

92 {
93 return !(lhs < rhs);
94}

◆ operator>>

std::istream & operator>> ( std::istream & is,
EventID & rhs )
friend

Definition at line 102 of file EventID.h.

102 {
103 is >> rhs.m_run_number >> rhs.m_event_number;
104 return is;
105}

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