Go to the documentation of this file.
7 #ifndef CBMDIGIVECTOR_H
8 #define CBMDIGIVECTOR_H 1
11 #include <FairLogger.h>
30 TString name = Digi::GetClassName();
49 LOG(fatal) <<
GetName() <<
"::AddDigi: Vector is locked.";
52 const Digi* thisDigi = boost::any_cast<const Digi*>(digi);
54 LOG(fatal) <<
GetName() <<
"::AddDigi: Wrong argument type"
55 <<
" (should be " << Digi::GetClassName() <<
"*) !";
58 fDigis.push_back(*thisDigi);
60 if (match ==
nullptr) {
61 LOG(fatal) <<
GetName() <<
"::AddDigi: Valid match object required!";
74 LOG(fatal) <<
"Digi vector cannot be connected to a TTree!";
85 virtual boost::any
GetDigi(UInt_t index) {
87 const Digi* result =
nullptr;
89 return boost::any(result);
119 return static_cast<ULong64_t
>(
fDigis.size());
127 std::stringstream ss;
Abstract container for digis in CBM.
std::vector implementation of CbmDigiContainer
virtual boost::any GetDigi(UInt_t index)
Get digi object.
std::vector< Digi > fDigis
virtual ~CbmDigiVector()
Destructor.
std::vector< CbmMatch > fMatches
virtual ULong64_t GetNofDigis() const
Number of digis in the vector.
virtual void AddDigi(boost::any digi, const CbmMatch *match=nullptr)
Add a digi (and match) to the vector.
CbmDigiVector(Bool_t hasMatches=kFALSE)
Constructor.
virtual const CbmMatch * GetDigiMatch(UInt_t index)
Get digi match object.
ClassDef(CbmDigiVector, 1)
virtual Bool_t ConnectToTree()
Connect to a ROOT TTree.
virtual const char * GetName() const
Name of container.
virtual std::string ToString() const
String output.
virtual Bool_t HasMatches() const
Presence of match objects.