Go to the documentation of this file.
8 #include <FairLogger.h>
9 #include <FairRootManager.h>
10 #include <TClonesArray.h>
56 FairRootManager* frm = FairRootManager::Instance();
67 TString mBranch =
fName +
"Match";
69 frm->InitObjectAs<std::vector<CbmMatch>
const*>(mBranch.Data());
73 fMatchArray =
dynamic_cast<TClonesArray*
>(frm->GetObject(mBranch.Data()));
87 std::size_t nDigis = 0;
107 const Digi* digi =
nullptr;
110 digi = &((*fDigiVector)[index]);
112 digi =
dynamic_cast<const Digi*
>(
fDigiArray->At(index));
130 match = &((*fMatchVector)[index]);
153 std::stringstream ss;
154 ss <<
"Branch " <<
fName <<
" (";
158 ss <<
"TClonesArray";
160 ss <<
"not connected";
161 ss <<
"), match branch " <<
fName +
"Match (";
165 ss <<
"TClonesArray";
167 ss <<
"not connected";
const std::vector< CbmMatch > * fMatchVector
Vector of Digi objects.
TClonesArray * fMatchArray
TClonesArray of Digi objects.
const std::vector< Digi > * fDigiVector
virtual ~CbmDigiBranch()
Destructor.
virtual Bool_t HasMatches()
Presence of match branch.
CbmDigiBranch(const char *name="unknown")
Constructor.
virtual Bool_t ConnectToTree()
Connect the branch to the ROOT tree.
TClonesArray * fDigiArray
Vector of match objects.
virtual std::string ToString() const
String output.
virtual boost::any GetDigi(UInt_t index)
Get digi object.
Class template for CBM digi branches.
TString fName
Branch name.
virtual std::size_t GetNofDigis() const
Number of digis.
Abstract base class for CBM digi branches.
virtual const CbmMatch * GetDigiMatch(UInt_t index)
Get match object.