CbmRoot
CbmDigiBranchBase.h
Go to the documentation of this file.
1 
6 #ifndef CBMDIGIBRANCHBASE_H
7 #define CBMDIGIBRANCHBASE_H 1
8 
9 #include <RtypesCore.h> // for Bool_t, UInt_t
10 #include <TString.h> // for TString
11 
12 #include <boost/any.hpp> // for any
13 
14 #include <stddef.h> // for size_t
15 #include <string> // for string
16 
17 class CbmMatch;
18 
26 
27 public:
32  CbmDigiBranchBase(const char* name = "unknown") : fName(name) {}
33 
34 
36  virtual ~CbmDigiBranchBase() {}
37 
38 
43  virtual Bool_t ConnectToTree() = 0;
44 
45 
50  virtual boost::any GetDigi(UInt_t index) = 0;
51 
52 
57  virtual const CbmMatch* GetDigiMatch(UInt_t index) = 0;
58 
59 
63  virtual Bool_t HasMatches() = 0;
64 
65 
67  TString GetName() const { return fName; }
68 
69 
71  virtual std::size_t GetNofDigis() const = 0;
72 
73 
75  virtual std::string ToString() const { return ""; }
76 
77 
78 protected:
79  TString fName;
80 };
81 
82 
83 #endif /* CBMDIGIBRANCHBASE_H */
CbmMatch
Definition: CbmMatch.h:22
CbmDigiBranchBase::HasMatches
virtual Bool_t HasMatches()=0
Presence of match branch.
CbmDigiBranchBase::GetNofDigis
virtual std::size_t GetNofDigis() const =0
Get the number of digis in the branch.
CbmDigiBranchBase::ToString
virtual std::string ToString() const
String output.
Definition: CbmDigiBranchBase.h:75
CbmDigiBranchBase::GetDigi
virtual boost::any GetDigi(UInt_t index)=0
Get a digi from the branch.
CbmDigiBranchBase::ConnectToTree
virtual Bool_t ConnectToTree()=0
Connect the branch to the ROOT tree.
CbmDigiBranchBase::GetName
TString GetName() const
Name of branch.
Definition: CbmDigiBranchBase.h:67
CbmDigiBranchBase::GetDigiMatch
virtual const CbmMatch * GetDigiMatch(UInt_t index)=0
Get a digi from the branch.
CbmDigiBranchBase::CbmDigiBranchBase
CbmDigiBranchBase(const char *name="unknown")
Constructor.
Definition: CbmDigiBranchBase.h:32
CbmDigiBranchBase::fName
TString fName
Branch name.
Definition: CbmDigiBranchBase.h:79
CbmDigiBranchBase
Abstract base class for CBM digi branches.
Definition: CbmDigiBranchBase.h:25
CbmDigiBranchBase::~CbmDigiBranchBase
virtual ~CbmDigiBranchBase()
Destructor.
Definition: CbmDigiBranchBase.h:36