CbmRoot
|
std::vector implementation of CbmDigiContainer More...
#include <CbmDigiVector.h>
Public Member Functions | |
CbmDigiVector (Bool_t hasMatches=kFALSE) | |
Constructor. More... | |
virtual | ~CbmDigiVector () |
Destructor. More... | |
virtual void | AddDigi (boost::any digi, const CbmMatch *match=nullptr) |
Add a digi (and match) to the vector. More... | |
virtual Bool_t | ConnectToTree () |
Connect to a ROOT TTree. More... | |
virtual boost::any | GetDigi (UInt_t index) |
Get digi object. More... | |
virtual const CbmMatch * | GetDigiMatch (UInt_t index) |
Get digi match object. More... | |
virtual Bool_t | HasMatches () const |
Presence of match objects. More... | |
virtual ULong64_t | GetNofDigis () const |
Number of digis in the vector. More... | |
virtual std::string | ToString () const |
String output. More... | |
virtual const char * | GetName () const |
Name of container. More... | |
ClassDef (CbmDigiContainer, 1) | |
Private Member Functions | |
ClassDef (CbmDigiVector, 1) | |
Private Attributes | |
std::vector< Digi > | fDigis {} |
std::vector< CbmMatch > | fMatches {} |
Bool_t | fHasMatches = kFALSE |
Bool_t | fIsLocked = kFALSE |
std::vector implementation of CbmDigiContainer
Definition at line 23 of file CbmDigiVector.h.
|
inline |
Constructor.
hasMatches | If true, a match vector will be managed. |
Definition at line 29 of file CbmDigiVector.h.
|
inlinevirtual |
Destructor.
Definition at line 37 of file CbmDigiVector.h.
|
inlinevirtual |
Add a digi (and match) to the vector.
digi | Pointer to digi object |
match | Pointer to match object |
After the first call to GetDigi or GetMatch, the vector is locked; adding more digis is then not possible.
Reimplemented from CbmDigiContainer.
Definition at line 47 of file CbmDigiVector.h.
References CbmDigiVector< Digi >::fDigis, CbmDigiVector< Digi >::fHasMatches, CbmDigiVector< Digi >::fIsLocked, CbmDigiVector< Digi >::fMatches, and CbmDigiContainer::GetName().
|
inherited |
|
private |
|
inlinevirtual |
Connect to a ROOT TTree.
Abstract from base class; no implementation here.
Reimplemented from CbmDigiContainer.
Definition at line 73 of file CbmDigiVector.h.
|
inlinevirtual |
Get digi object.
index | Index of digi in the vector |
Returns a null pointer if index is out of range.
Implements CbmDigiContainer.
Definition at line 85 of file CbmDigiVector.h.
References CbmDigiVector< Digi >::fDigis, and CbmDigiVector< Digi >::fIsLocked.
|
inlinevirtual |
Get digi match object.
index | Index of digi in the vector |
Returns a null pointer if matches are not present or index is out of range.
Implements CbmDigiContainer.
Definition at line 100 of file CbmDigiVector.h.
References CbmDigiVector< Digi >::fHasMatches, CbmDigiVector< Digi >::fIsLocked, and CbmDigiVector< Digi >::fMatches.
|
inlinevirtualinherited |
Name of container.
Definition at line 79 of file CbmDigiContainer.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiContainer::ToString(), and CbmDigiVector< Digi >::ToString().
|
inlinevirtual |
Number of digis in the vector.
Implements CbmDigiContainer.
Definition at line 117 of file CbmDigiVector.h.
References CbmDigiVector< Digi >::fDigis, CbmDigiVector< Digi >::fHasMatches, and CbmDigiVector< Digi >::fMatches.
|
inlinevirtual |
Presence of match objects.
Implements CbmDigiContainer.
Definition at line 111 of file CbmDigiVector.h.
References CbmDigiVector< Digi >::fHasMatches.
Referenced by CbmDigiVector< Digi >::ToString().
|
inlinevirtual |
String output.
Info to string
Reimplemented from CbmDigiContainer.
Definition at line 126 of file CbmDigiVector.h.
References CbmDigiVector< Digi >::fDigis, CbmDigiContainer::GetName(), and CbmDigiVector< Digi >::HasMatches().
|
private |
Definition at line 135 of file CbmDigiVector.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiVector< Digi >::GetDigi(), CbmDigiVector< Digi >::GetNofDigis(), and CbmDigiVector< Digi >::ToString().
|
private |
Definition at line 137 of file CbmDigiVector.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiVector< Digi >::GetDigiMatch(), CbmDigiVector< Digi >::GetNofDigis(), and CbmDigiVector< Digi >::HasMatches().
|
private |
Definition at line 138 of file CbmDigiVector.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiVector< Digi >::GetDigi(), and CbmDigiVector< Digi >::GetDigiMatch().
|
private |
Definition at line 136 of file CbmDigiVector.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiVector< Digi >::GetDigiMatch(), and CbmDigiVector< Digi >::GetNofDigis().