CGEM BOSS 6.6.5.g
BESIII Offline Software System
|
#include <EventType.h>
Public Types | |
typedef std::vector< bool > | BitMask |
typedef BitMask::const_iterator | BitMaskIterator |
typedef BitMask::size_type | EventTypeCode |
typedef std::pair< std::string, std::string > | NameTagPair |
typedef std::vector< NameTagPair > | NameTagPairVec |
Public Member Functions | |
EventType () | |
virtual | ~EventType () |
void | add_type (EventTypeCode type_code) |
void | set_user_type (const std::string &user_type) |
void | set_detdescr_tags (const NameTagPairVec &pairs) |
bool | test (EventTypeCode type_code) const |
const std::string & | user_type (void) const |
void | get_detdescr_tags (NameTagPairVec &pairs) |
BitMaskIterator | bit_mask_begin (void) const |
BitMaskIterator | bit_mask_end (void) const |
Static Public Attributes | |
static const EventTypeCode | IS_SIMULATION = 0 |
static const EventTypeCode | IS_TESTBEAM = 1 |
static const EventTypeCode | IS_CALIBRATION = 2 |
class EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
IS_SIMULATION // false means IS_DATA IS_TESTBEAM // false means IS_FROM_ATLAS_DET IS_CALIBRATION // false means IS_PHYSICS
Since an event may have MORE than one characteristic, a testbeam simulation event would respond true to first two of the above characteristics, whereas an offline simulation event would respond true to ONLY IS_SIMULATION.
These are set with:
void add_type (EventTypeCode type_code);
where the possible EventTypeCode's are provided as constants, e.g.:
static const EventTypeCode IS_SIMULATION;
Thus, one would set IS_SIMULATION by:
an_event_type.set_type_bit(EventType::IS_SIMULATION);
There is a possible to set and get a "user-defined" characteristic in terms of a string:
void add_type (const string& user_type); const string& user_type (void) const;
This is possible via:
BitMaskIterator bit_mask_begin (void) const; BitMaskIterator bit_mask_end (void) const;
The full set of characteristics is provided by static constants. One may add new event characteristics BOTH by adding more static constants AND by providing the cooresponding new boolean methods.
Definition at line 84 of file EventType.h.
typedef std::vector<bool> EventType::BitMask |
Definition at line 88 of file EventType.h.
typedef BitMask::const_iterator EventType::BitMaskIterator |
Definition at line 89 of file EventType.h.
typedef BitMask::size_type EventType::EventTypeCode |
Definition at line 90 of file EventType.h.
typedef std::pair<std::string,std::string> EventType::NameTagPair |
Definition at line 91 of file EventType.h.
typedef std::vector<NameTagPair> EventType::NameTagPairVec |
Definition at line 92 of file EventType.h.
EventType::EventType | ( | ) |
Definition at line 29 of file EventType.cxx.
|
virtual |
Definition at line 33 of file EventType.cxx.
void EventType::add_type | ( | EventTypeCode | type_code | ) |
Definition at line 38 of file EventType.cxx.
EventType::BitMaskIterator EventType::bit_mask_begin | ( | void | ) | const |
Definition at line 135 of file EventType.cxx.
EventType::BitMaskIterator EventType::bit_mask_end | ( | void | ) | const |
Definition at line 141 of file EventType.cxx.
void EventType::get_detdescr_tags | ( | NameTagPairVec & | pairs | ) |
Definition at line 93 of file EventType.cxx.
void EventType::set_detdescr_tags | ( | const NameTagPairVec & | pairs | ) |
Definition at line 51 of file EventType.cxx.
void EventType::set_user_type | ( | const std::string & | user_type | ) |
Definition at line 45 of file EventType.cxx.
bool EventType::test | ( | EventTypeCode | type_code | ) | const |
Definition at line 70 of file EventType.cxx.
const std::string & EventType::user_type | ( | void | ) | const |
Definition at line 77 of file EventType.cxx.
Referenced by set_detdescr_tags(), set_user_type(), and user_type().
|
static |
Definition at line 115 of file EventType.h.
|
static |
Definition at line 113 of file EventType.h.
|
static |
Definition at line 114 of file EventType.h.