CbmRoot
|
Storable event class for CBM. More...
#include <CbmEventStore.h>
Public Member Functions | |
CbmEventStore (UInt_t eventId=0, Bool_t hasMatches=kFALSE) | |
Default constructor. More... | |
CbmEventStore (const CbmEventStore &) | |
Copy constructor. More... | |
CbmEventStore (CbmEventStore &&)=default | |
Move constructor. More... | |
virtual | ~CbmEventStore () |
Destructor. More... | |
template<class Digi > | |
void | AddDigi (const Digi *digi) |
Add a digi object to the event. More... | |
template<class Digi > | |
void | AddDigi (const Digi *digi, const CbmMatch *match) |
Add a digi and its match object to the event. More... | |
template<class Digi > | |
const Digi * | GetDigi (UInt_t index) const |
Get a digi object. More... | |
UInt_t | GetEventId () const |
Get event ID. More... | |
UInt_t | GetNofDigis (ECbmModuleId system) const |
Number of digis for a given system. More... | |
Bool_t | HasMatches () const |
Presence of match objects. More... | |
Bool_t | IsEmpty () const |
Indicate whether event contains no digis. More... | |
void | MatchToMC (CbmMatch &result) const |
Match to MC event. More... | |
CbmEventStore & | operator= (const CbmEventStore &)=delete |
Assignment operator. More... | |
std::string | ToString () const |
Private Member Functions | |
ClassDef (CbmEventStore, 2) | |
Private Attributes | |
UInt_t | fEventId = -1 |
Event identifier. More... | |
Bool_t | fHasMatches = kFALSE |
Presence of matches to MC. More... | |
std::map< ECbmModuleId, TObject * > | fDigis |
Map of CbmDigiVector. More... | |
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 39 of file CbmEventStore.h.
CbmEventStore::CbmEventStore | ( | UInt_t | eventId = 0 , |
Bool_t | hasMatches = kFALSE |
||
) |
Default constructor.
eventId | Unique event identifier |
has | Matches True if matches to MC are stored |
Definition at line 18 of file CbmEventStore.cxx.
CbmEventStore::CbmEventStore | ( | const CbmEventStore & | other | ) |
Copy constructor.
Definition at line 26 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 70 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 95 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 119 of file CbmEventStore.h.
References fDigis, and kNofSystems.
|
inline |
Get event ID.
Definition at line 131 of file CbmEventStore.h.
References fEventId.
UInt_t CbmEventStore::GetNofDigis | ( | ECbmModuleId | system | ) | const |
Number of digis for a given system.
system | System identifier [ECbmModuleId] |
Definition at line 66 of file CbmEventStore.cxx.
References fDigis, CbmDigiContainer::GetNofDigis(), and kNofSystems.
|
inline |
Presence of match objects.
If | true, match objects are stored |
Definition at line 144 of file CbmEventStore.h.
References fHasMatches.
Bool_t CbmEventStore::IsEmpty | ( | ) | const |
Indicate whether event contains no digis.
Definition at line 47 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 76 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 112 of file CbmEventStore.cxx.
References fDigis, fEventId, fHasMatches, CbmModuleList::GetModuleNameCaps(), and IsEmpty().
|
private |
Map of CbmDigiVector.
Definition at line 174 of file CbmEventStore.h.
Referenced by AddDigi(), GetDigi(), GetNofDigis(), IsEmpty(), MatchToMC(), ToString(), and ~CbmEventStore().
|
private |
Event identifier.
Definition at line 171 of file CbmEventStore.h.
Referenced by CbmEventStore(), GetEventId(), and ToString().
|
private |
Presence of matches to MC.
Definition at line 172 of file CbmEventStore.h.
Referenced by AddDigi(), CbmEventStore(), HasMatches(), MatchToMC(), and ToString().