CbmRoot
CbmDigitizeInfo.h
Go to the documentation of this file.
1 
7 #ifndef CBMDIGITIZEINFO_H
8 #define CBMDIGITIZEINFO_H 1
9 
10 #include "CbmDigitizeBase.h"
11 #include "TObject.h"
12 #include "TString.h"
13 
14 
23 class CbmDigitizeInfo : public TObject {
24 
25 public:
35  TString branch = "",
36  CbmDigitizeBase* digitizer = nullptr,
37  Bool_t present = kFALSE,
38  Bool_t active = kTRUE,
39  Bool_t persistent = kTRUE)
40  : fSystem(system)
41  , fBranch(branch)
42  , fDigitizer(digitizer)
43  , fPresent(present)
44  , fActive(active)
45  , fPersistent(persistent) {}
46 
47 
49  virtual ~CbmDigitizeInfo() {};
50 
51 
55  TString GetBranchName() const { return fBranch; }
56 
57 
62 
63 
67  Bool_t IsActive() const { return fActive; }
68 
69 
73  Bool_t IsPresent() const { return fPresent; }
74 
78  void SetActive(Bool_t choice = kTRUE) { fActive = choice; }
79 
80 
84  void SetBranchName(TString branch) { fBranch = branch; }
85 
86 
90  void SetDigitizer(CbmDigitizeBase* digitizer) { fDigitizer = digitizer; }
91 
92 
96  void SetPersistent(Bool_t choice = kTRUE) { fPersistent = choice; }
97 
98 
102  void SetPresent(Bool_t choice = kTRUE) { fPresent = choice; }
103 
104 
106  std::string ToString() const;
107 
108 
109 private:
110  ECbmModuleId fSystem; // System ID (ECbmModuleId)
111  TString fBranch; // Branch (array) name
112  CbmDigitizeBase* fDigitizer; // Pointer to digitizer instance
113  Bool_t fPresent; // Data branch is present in input tree
114  Bool_t fActive; // Digitizer is active
115  Bool_t fPersistent; // Digitizer output is persistent
116 
117 
120 
121 
124 
125 
127 };
128 
129 #endif /* CBMDIGITIZEINFO_H */
CbmDigitizeBase.h
CbmDigitizeInfo::GetDigitizer
CbmDigitizeBase * GetDigitizer() const
Get digitizer @value Pointer to digitizer instance.
Definition: CbmDigitizeInfo.h:61
CbmDigitizeInfo::SetDigitizer
void SetDigitizer(CbmDigitizeBase *digitizer)
Set digitizer instance.
Definition: CbmDigitizeInfo.h:90
CbmDigitizeInfo::~CbmDigitizeInfo
virtual ~CbmDigitizeInfo()
Definition: CbmDigitizeInfo.h:49
CbmDigitizeInfo::GetBranchName
TString GetBranchName() const
Get input branch name @value Input branch name.
Definition: CbmDigitizeInfo.h:55
CbmDigitizeInfo::SetPresent
void SetPresent(Bool_t choice=kTRUE)
Set data presence flag.
Definition: CbmDigitizeInfo.h:102
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmDigitizeInfo::fActive
Bool_t fActive
Definition: CbmDigitizeInfo.h:114
CbmDigitizeInfo::IsActive
Bool_t IsActive() const
Activity flag @value If kTRUE, if digitizer will be active.
Definition: CbmDigitizeInfo.h:67
CbmDigitizeInfo::fSystem
ECbmModuleId fSystem
Definition: CbmDigitizeInfo.h:110
CbmDigitizeInfo::SetActive
void SetActive(Bool_t choice=kTRUE)
Set activity flag.
Definition: CbmDigitizeInfo.h:78
CbmDigitizeInfo::fPresent
Bool_t fPresent
Definition: CbmDigitizeInfo.h:113
CbmDigitizeInfo::CbmDigitizeInfo
CbmDigitizeInfo(ECbmModuleId system, TString branch="", CbmDigitizeBase *digitizer=nullptr, Bool_t present=kFALSE, Bool_t active=kTRUE, Bool_t persistent=kTRUE)
Constructor.
Definition: CbmDigitizeInfo.h:34
CbmDigitizeInfo::IsPresent
Bool_t IsPresent() const
Data presence flag @value kTRUE if input branch is present in the tree.
Definition: CbmDigitizeInfo.h:73
CbmDigitizeInfo::SetBranchName
void SetBranchName(TString branch)
Set input branch name.
Definition: CbmDigitizeInfo.h:84
CbmDigitizeInfo::operator=
CbmDigitizeInfo operator=(const CbmDigitizeInfo &)=delete
Assignment operator forbidden.
CbmDigitizeInfo::fPersistent
Bool_t fPersistent
Definition: CbmDigitizeInfo.h:115
CbmDigitizeInfo::ToString
std::string ToString() const
Info to string.
Definition: CbmDigitizeInfo.cxx:12
CbmDigitizeInfo::CbmDigitizeInfo
CbmDigitizeInfo(const CbmDigitizeInfo &)=delete
Copy constructor forbidden.
CbmDigitizeInfo::ClassDef
ClassDef(CbmDigitizeInfo, 2)
CbmDigitizeBase
Abstract base class for CBM digitisation tasks.
Definition: CbmDigitizeBase.h:26
CbmDigitizeInfo::SetPersistent
void SetPersistent(Bool_t choice=kTRUE)
Set persistence flag.
Definition: CbmDigitizeInfo.h:96
CbmDigitizeInfo
Auxiliary class for CbmDigitize.
Definition: CbmDigitizeInfo.h:23
CbmDigitizeInfo::fBranch
TString fBranch
Definition: CbmDigitizeInfo.h:111
CbmDigitizeInfo::fDigitizer
CbmDigitizeBase * fDigitizer
Definition: CbmDigitizeInfo.h:112