11#ifndef CBMDIGIVECTOR_H
12#define CBMDIGIVECTOR_H 1
36 TString name = Digi::GetClassName();
56 LOG(fatal) <<
GetName() <<
"::AddDigi: Vector is locked.";
59 const Digi* thisDigi = boost::any_cast<const Digi*>(digi);
61 LOG(fatal) <<
GetName() <<
"::AddDigi: Wrong argument type"
62 <<
" (should be " << Digi::GetClassName() <<
"*) !";
65 fDigis.push_back(*thisDigi);
67 if (match ==
nullptr) {
68 LOG(fatal) <<
GetName() <<
"::AddDigi: Valid match object required!";
82 LOG(fatal) <<
"Digi vector cannot be connected to a TTree!";
93 virtual boost::any
GetDigi(uint32_t index)
96 const Digi* result =
nullptr;
98 return boost::any(result);
130 return static_cast<uint64_t
>(
fDigis.size());
139 std::stringstream ss;
Abstract container for digis in CBM.
virtual const char * GetName() const
Name of container.
std::vector implementation of CbmDigiContainer
std::vector< Digi > fDigis
virtual bool HasMatches() const
Presence of match objects.
std::vector< CbmMatch > fMatches
virtual ~CbmDigiVector()
Destructor.
ClassDef(CbmDigiVector, 1)
virtual std::string ToString() const
String output.
virtual uint64_t GetNofDigis() const
Number of digis in the vector.
CbmDigiVector(bool hasMatches=false)
Constructor.
virtual const CbmMatch * GetDigiMatch(uint32_t index)
Get digi match object.
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.