CbmRoot
|
std::vector implementation of CbmDigiContainer More...
#include <CbmDigiVector.h>
Public Member Functions | |
CbmDigiVector (bool hasMatches=false) | |
Constructor. | |
virtual | ~CbmDigiVector () |
Destructor. | |
virtual void | AddDigi (boost::any digi, const CbmMatch *match=nullptr) |
Add a digi (and match) to the vector. | |
virtual bool | ConnectToTree () |
Connect to a ROOT TTree. | |
virtual boost::any | GetDigi (uint32_t index) |
Get digi object. | |
virtual const CbmMatch * | GetDigiMatch (uint32_t index) |
Get digi match object. | |
virtual bool | HasMatches () const |
Presence of match objects. | |
virtual uint64_t | GetNofDigis () const |
Number of digis in the vector. | |
virtual std::string | ToString () const |
String output. | |
virtual const char * | GetName () const |
Name of container. | |
ClassDef (CbmDigiContainer, 1) | |
Private Member Functions | |
ClassDef (CbmDigiVector, 1) | |
Private Attributes | |
std::vector< Digi > | fDigis {} |
std::vector< CbmMatch > | fMatches {} |
bool | fHasMatches = false |
bool | fIsLocked = false |
std::vector implementation of CbmDigiContainer
Definition at line 28 of file CbmDigiVector.h.
|
inline |
Constructor.
hasMatches | If true, a match vector will be managed. |
Definition at line 34 of file CbmDigiVector.h.
|
inlinevirtual |
Destructor.
Definition at line 43 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 53 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 80 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 93 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 109 of file CbmDigiVector.h.
References CbmDigiVector< Digi >::fHasMatches, CbmDigiVector< Digi >::fIsLocked, and CbmDigiVector< Digi >::fMatches.
|
inlinevirtualinherited |
Name of container.
Definition at line 83 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 127 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 121 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 137 of file CbmDigiVector.h.
References CbmDigiVector< Digi >::fDigis, CbmDigiContainer::GetName(), and CbmDigiVector< Digi >::HasMatches().
|
private |
Definition at line 147 of file CbmDigiVector.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiVector< Digi >::GetDigi(), CbmDigiVector< Digi >::GetNofDigis(), and CbmDigiVector< Digi >::ToString().
|
private |
Definition at line 149 of file CbmDigiVector.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiVector< Digi >::GetDigiMatch(), CbmDigiVector< Digi >::GetNofDigis(), and CbmDigiVector< Digi >::HasMatches().
|
private |
Definition at line 150 of file CbmDigiVector.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiVector< Digi >::GetDigi(), and CbmDigiVector< Digi >::GetDigiMatch().
|
private |
Definition at line 148 of file CbmDigiVector.h.
Referenced by CbmDigiVector< Digi >::AddDigi(), CbmDigiVector< Digi >::GetDigiMatch(), and CbmDigiVector< Digi >::GetNofDigis().