CbmRoot
|
Class template for CBM digi branches. More...
#include <CbmDigiBranch.h>
Public Member Functions | |
CbmDigiBranch (const char *name="unknown") | |
Constructor. More... | |
virtual | ~CbmDigiBranch () |
Destructor. More... | |
virtual Bool_t | ConnectToTree () |
Connect the branch to the ROOT tree. More... | |
virtual std::size_t | GetNofDigis () const |
Number of digis. More... | |
virtual boost::any | GetDigi (UInt_t index) |
Get digi object. More... | |
virtual const CbmMatch * | GetDigiMatch (UInt_t index) |
Get match object. More... | |
virtual Bool_t | HasMatches () |
Presence of match branch. More... | |
virtual std::string | ToString () const |
String output. More... | |
TString | GetName () const |
Name of branch. More... | |
Protected Attributes | |
TString | fName |
Branch name. More... | |
Private Attributes | |
const std::vector< Digi > * | fDigiVector |
const std::vector< CbmMatch > * | fMatchVector |
Vector of Digi objects. More... | |
TClonesArray * | fDigiArray |
Vector of match objects. More... | |
TClonesArray * | fMatchArray |
TClonesArray of Digi objects. More... | |
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 25 of file CbmDigiBranch.h.
|
inline |
|
inlinevirtual |
Destructor.
Definition at line 43 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 54 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fDigiArray, CbmDigiBranch< Digi >::fDigiVector, CbmDigiBranch< Digi >::fMatchArray, CbmDigiBranch< Digi >::fMatchVector, and CbmDigiBranchBase::fName.
|
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 106 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 126 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fMatchArray, CbmDigiBranch< Digi >::fMatchVector, and CbmDigiBranch< Digi >::GetNofDigis().
|
inlineinherited |
Name of branch.
Definition at line 67 of file CbmDigiBranchBase.h.
References CbmDigiBranchBase::fName.
|
inlinevirtual |
Number of digis.
Implements CbmDigiBranchBase.
Definition at line 86 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 143 of file CbmDigiBranch.h.
References CbmDigiBranch< Digi >::fMatchArray, and CbmDigiBranch< Digi >::fMatchVector.
|
inlinevirtual |
String output.
Reimplemented from CbmDigiBranchBase.
Definition at line 152 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 177 of file CbmDigiBranch.h.
Referenced by CbmDigiBranch< Digi >::ConnectToTree(), CbmDigiBranch< Digi >::GetDigi(), CbmDigiBranch< Digi >::GetNofDigis(), and CbmDigiBranch< Digi >::ToString().
|
private |
Definition at line 175 of file CbmDigiBranch.h.
Referenced by CbmDigiBranch< Digi >::ConnectToTree(), CbmDigiBranch< Digi >::GetDigi(), CbmDigiBranch< Digi >::GetNofDigis(), and CbmDigiBranch< Digi >::ToString().
|
private |
TClonesArray of Digi objects.
Definition at line 178 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 176 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 79 of file CbmDigiBranchBase.h.
Referenced by CbmDigiBranch< Digi >::ConnectToTree(), CbmDigiBranchBase::GetName(), and CbmDigiBranch< Digi >::ToString().