CbmRoot
|
Class template for CBM digi branches. More...
#include <CbmDigiBranch.h>
Public Member Functions | |
CbmDigiBranch (const char *name="unknown") | |
Constructor. | |
virtual | ~CbmDigiBranch () |
Destructor. | |
virtual bool | ConnectToTree () |
Connect the branch to the ROOT tree. | |
virtual std::size_t | GetNofDigis () const |
Number of digis. | |
virtual boost::any | GetDigi (uint32_t index) |
Get digi object. | |
virtual const CbmMatch * | GetDigiMatch (uint32_t index) |
Get match object. | |
virtual bool | HasMatches () |
Presence of match branch. | |
virtual std::string | ToString () const |
String output. | |
virtual boost::any | GetBranchContainer () const |
Get branch pointer. | |
TString | GetName () const |
Name of branch. | |
Protected Attributes | |
TString | fName |
Branch name. | |
Private Attributes | |
const std::vector< Digi > * | fDigiVector |
const std::vector< CbmMatch > * | fMatchVector |
Vector of Digi objects. | |
TClonesArray * | fDigiArray |
Vector of match objects. | |
TClonesArray * | fMatchArray |
TClonesArray of Digi objects. | |
Class template for CBM digi branches.
Interface to branches holding CbmDigis. The branch may hold a std::vector or a TClonesArray. The requirement to the specialisation is that the class Digi derives from CbmDigi (its pointer can be cast to CbmDigi*).
Definition at line 30 of file CbmDigiBranch.h.
|
inline |
|
inlinevirtual |
Destructor.
Definition at line 50 of file CbmDigiBranch.h.
|
inlinevirtual |
Connect the branch to the ROOT tree.
A std::vector is first looked for; if not found, a TClonesArray is looked for.
Implements CbmDigiBranchBase.
Definition at line 61 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fDigiArray, CbmDigiBranch< Digi >::fDigiVector, CbmDigiBranch< Digi >::fMatchArray, CbmDigiBranch< Digi >::fMatchVector, and CbmDigiBranchBase::fName.
|
inlinevirtual |
Get branch pointer.
Reimplemented from CbmDigiBranchBase.
Definition at line 183 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fDigiArray, and CbmDigiBranch< Digi >::fDigiVector.
|
inlinevirtual |
Get digi object.
index | Index of digi in branch container |
Returns a null pointer if the branch is not present.
Implements CbmDigiBranchBase.
Definition at line 109 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fDigiArray, CbmDigiBranch< Digi >::fDigiVector, and CbmDigiBranch< Digi >::GetNofDigis().
|
inlinevirtual |
Get match object.
index | Index of match in branch container |
Returns a null pointer if the branch is not present.
Implements CbmDigiBranchBase.
Definition at line 129 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fMatchArray, CbmDigiBranch< Digi >::fMatchVector, and CbmDigiBranch< Digi >::GetNofDigis().
|
inlineinherited |
Name of branch.
Definition at line 71 of file CbmDigiBranchBase.h.
References CbmDigiBranchBase::fName.
|
inlinevirtual |
Number of digis.
Implements CbmDigiBranchBase.
Definition at line 89 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fDigiArray, and CbmDigiBranch< Digi >::fDigiVector.
Referenced by CbmDigiBranch< Digi >::GetDigi(), and CbmDigiBranch< Digi >::GetDigiMatch().
|
inlinevirtual |
Presence of match branch.
Implements CbmDigiBranchBase.
Definition at line 146 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fMatchArray, and CbmDigiBranch< Digi >::fMatchVector.
|
inlinevirtual |
String output.
Reimplemented from CbmDigiBranchBase.
Definition at line 156 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fDigiArray, CbmDigiBranch< Digi >::fDigiVector, CbmDigiBranch< Digi >::fMatchArray, CbmDigiBranch< Digi >::fMatchVector, and CbmDigiBranchBase::fName.
|
private |
Vector of match objects.
Definition at line 196 of file CbmDigiBranch.h.
Referenced by CbmDigiBranch< Digi >::ConnectToTree(), CbmDigiBranch< Digi >::GetBranchContainer(), CbmDigiBranch< Digi >::GetDigi(), CbmDigiBranch< Digi >::GetNofDigis(), and CbmDigiBranch< Digi >::ToString().
|
private |
Definition at line 194 of file CbmDigiBranch.h.
Referenced by CbmDigiBranch< Digi >::ConnectToTree(), CbmDigiBranch< Digi >::GetBranchContainer(), CbmDigiBranch< Digi >::GetDigi(), CbmDigiBranch< Digi >::GetNofDigis(), and CbmDigiBranch< Digi >::ToString().
|
private |
TClonesArray of Digi objects.
Definition at line 197 of file CbmDigiBranch.h.
Referenced by CbmDigiBranch< Digi >::ConnectToTree(), CbmDigiBranch< Digi >::GetDigiMatch(), CbmDigiBranch< Digi >::HasMatches(), and CbmDigiBranch< Digi >::ToString().
|
private |
Vector of Digi objects.
Definition at line 195 of file CbmDigiBranch.h.
Referenced by CbmDigiBranch< Digi >::ConnectToTree(), CbmDigiBranch< Digi >::GetDigiMatch(), CbmDigiBranch< Digi >::HasMatches(), and CbmDigiBranch< Digi >::ToString().
|
protectedinherited |
Branch name.
Definition at line 85 of file CbmDigiBranchBase.h.
Referenced by CbmDigiBranch< Digi >::ConnectToTree(), CbmDigiBranchBase::GetName(), and CbmDigiBranch< Digi >::ToString().