CbmRoot
|
Storable event class for CBM. More...
#include <CbmEventStore.h>
Public Member Functions | |
CbmEventStore (uint32_t eventId=0, bool hasMatches=false) | |
Default constructor. | |
CbmEventStore (const CbmEventStore &) | |
Copy constructor. | |
CbmEventStore (CbmEventStore &&)=default | |
Move constructor. | |
virtual | ~CbmEventStore () |
Destructor. | |
template<class Digi > | |
void | AddDigi (const Digi *digi) |
Add a digi object to the event. | |
template<class Digi > | |
void | AddDigi (const Digi *digi, const CbmMatch *match) |
Add a digi and its match object to the event. | |
template<class Digi > | |
const Digi * | GetDigi (uint32_t index) const |
Get a digi object. | |
uint32_t | GetEventId () const |
Get event ID. | |
uint32_t | GetNofDigis (ECbmModuleId system) const |
Number of digis for a given system. | |
bool | HasMatches () const |
Presence of match objects. | |
bool | IsEmpty () const |
Indicate whether event contains no digis. | |
void | MatchToMC (CbmMatch &result) const |
Match to MC event. | |
CbmEventStore & | operator= (const CbmEventStore &)=delete |
Assignment operator. | |
std::string | ToString () const |
Private Member Functions | |
ClassDef (CbmEventStore, 2) | |
Private Attributes | |
uint32_t | fEventId = -1 |
Event identifier. | |
bool | fHasMatches = false |
Presence of matches to MC. | |
std::map< ECbmModuleId, TObject * > | fDigis |
Map of CbmDigiVector. | |
Storable event class for CBM.
The storable event contains digi objects associated to an event as direct data members. It is as such persistent. The internal representation of digis and their matches is through CbmDigiVector, using std::vector as underlying container.
Definition at line 43 of file CbmEventStore.h.
CbmEventStore::CbmEventStore | ( | uint32_t | eventId = 0, |
bool | hasMatches = false ) |
Default constructor.
eventId | Unique event identifier |
has | Matches True if matches to MC are stored |
Definition at line 20 of file CbmEventStore.cxx.
CbmEventStore::CbmEventStore | ( | const CbmEventStore & | other | ) |
Copy constructor.
Definition at line 28 of file CbmEventStore.cxx.
References fEventId, and fHasMatches.
|
default |
Move constructor.
|
virtual |
|
inline |
Add a digi object to the event.
digi | Pointer to digi object |
The data referenced by the argument will be copied into the internal arrays.
This method cannot be used if the event is set to contain matches.
Definition at line 74 of file CbmEventStore.h.
References fDigis, fHasMatches, and kNofSystems.
|
inline |
Add a digi and its match object to the event.
digi | Pointer to digi object |
match | Pointer to match object |
The data referenced by the arguments will be copied into the internal arrays.
This method cannot be used if the event is not set to contain matches.
Definition at line 100 of file CbmEventStore.h.
References fDigis, fHasMatches, and kNofSystems.
|
private |
|
inline |
Get a digi object.
Index | Index of digi object for the given system in the event |
The method will return a null pointer if the detector system is not present or the index is out of range.
Definition at line 125 of file CbmEventStore.h.
References fDigis, and kNofSystems.
|
inline |
Get event ID.
Definition at line 138 of file CbmEventStore.h.
References fEventId.
uint32_t CbmEventStore::GetNofDigis | ( | ECbmModuleId | system | ) | const |
Number of digis for a given system.
system | System identifier [ECbmModuleId] |
Definition at line 71 of file CbmEventStore.cxx.
References fDigis, CbmDigiContainer::GetNofDigis(), and kNofSystems.
|
inline |
Presence of match objects.
If | true, match objects are stored |
Definition at line 151 of file CbmEventStore.h.
References fHasMatches.
bool CbmEventStore::IsEmpty | ( | ) | const |
Indicate whether event contains no digis.
Definition at line 51 of file CbmEventStore.cxx.
References fDigis, and CbmDigiContainer::GetNofDigis().
Referenced by ToString().
void CbmEventStore::MatchToMC | ( | CbmMatch & | result | ) | const |
Match to MC event.
[out] | Reference | to event match object |
The method evaluates all digi matches and combines them into an event match object.
Definition at line 82 of file CbmEventStore.cxx.
References CbmMatch::AddLink(), CbmMatch::ClearLinks(), fDigis, fHasMatches, CbmLink::GetEntry(), CbmLink::GetFile(), CbmMatch::GetLink(), CbmMatch::GetNofLinks(), and CbmLink::GetWeight().
|
delete |
Assignment operator.
std::string CbmEventStore::ToString | ( | ) | const |
String output
Definition at line 119 of file CbmEventStore.cxx.
References fDigis, fEventId, fHasMatches, CbmModuleList::GetModuleNameCaps(), and IsEmpty().
|
private |
Map of CbmDigiVector.
Definition at line 181 of file CbmEventStore.h.
Referenced by AddDigi(), AddDigi(), GetDigi(), GetNofDigis(), IsEmpty(), MatchToMC(), ToString(), and ~CbmEventStore().
|
private |
Event identifier.
Definition at line 178 of file CbmEventStore.h.
Referenced by CbmEventStore(), GetEventId(), and ToString().
|
private |
Presence of matches to MC.
Definition at line 179 of file CbmEventStore.h.
Referenced by AddDigi(), AddDigi(), CbmEventStore(), HasMatches(), MatchToMC(), and ToString().