14#include <FairRootManager.h>
17#include <TClonesArray.h>
64 FairRootManager* frm = FairRootManager::Instance();
73 TString mBranch =
fName +
"Match";
74 fMatchVector = frm->InitObjectAs<std::vector<CbmMatch>
const*>(mBranch.Data());
91 std::size_t nDigis = 0;
111 const Digi* digi =
nullptr;
115 digi =
dynamic_cast<const Digi*
>(
fDigiArray->At(index));
158 std::stringstream ss;
159 ss <<
"Branch " <<
fName <<
" (";
162 ss <<
"TClonesArray";
164 ss <<
"not connected";
165 ss <<
"), match branch " <<
fName +
"Match (";
168 ss <<
"TClonesArray";
170 ss <<
"not connected";
Abstract base class for CBM digi branches.
TString fName
Branch name.
Class template for CBM digi branches.
virtual std::size_t GetNofDigis() const
Number of digis.
virtual boost::any GetDigi(uint32_t index)
Get digi object.
virtual bool ConnectToTree()
Connect the branch to the ROOT tree.
virtual ~CbmDigiBranch()
Destructor.
virtual std::string ToString() const
String output.
CbmDigiBranch(const char *name="unknown")
Constructor.
const std::vector< Digi > * fDigiVector
virtual bool HasMatches()
Presence of match branch.
virtual const CbmMatch * GetDigiMatch(uint32_t index)
Get match object.
TClonesArray * fMatchArray
TClonesArray of Digi objects.
const std::vector< CbmMatch > * fMatchVector
Vector of Digi objects.
TClonesArray * fDigiArray
Vector of match objects.
virtual boost::any GetBranchContainer() const
Get branch pointer.