CbmRoot
Loading...
Searching...
No Matches
CbmDigitizeInfo.h
Go to the documentation of this file.
1/* Copyright (C) 2018-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
11#ifndef CBMDIGITIZEINFO_H
12#define CBMDIGITIZEINFO_H 1
13
14#include "CbmDigitizeBase.h"
15
16#include "TObject.h"
17#include "TString.h"
18
19
28class CbmDigitizeInfo : public TObject {
29
30public:
39 CbmDigitizeInfo(ECbmModuleId system, TString branch = "", CbmDigitizeBase* digitizer = nullptr,
40 Bool_t present = kFALSE, Bool_t active = kTRUE, Bool_t persistent = kTRUE)
41 : fSystem(system)
42 , fBranch(branch)
43 , fDigitizer(digitizer)
44 , fPresent(present)
45 , fActive(active)
46 , fPersistent(persistent)
47 {
48 }
49
50
52 virtual ~CbmDigitizeInfo() {};
53
54
58 TString GetBranchName() const { return fBranch; }
59
60
65
66
70 Bool_t IsActive() const { return fActive; }
71
72
76 Bool_t IsPresent() const { return fPresent; }
77
81 void SetActive(Bool_t choice = kTRUE) { fActive = choice; }
82
83
87 void SetBranchName(TString branch) { fBranch = branch; }
88
89
93 void SetDigitizer(CbmDigitizeBase* digitizer) { fDigitizer = digitizer; }
94
95
99 void SetPersistent(Bool_t choice = kTRUE) { fPersistent = choice; }
100
101
105 void SetPresent(Bool_t choice = kTRUE) { fPresent = choice; }
106
107
109 std::string ToString() const;
110
111
112private:
113 ECbmModuleId fSystem; // System ID (ECbmModuleId)
114 TString fBranch; // Branch (array) name
115 CbmDigitizeBase* fDigitizer; // Pointer to digitizer instance
116 Bool_t fPresent; // Data branch is present in input tree
117 Bool_t fActive; // Digitizer is active
118 Bool_t fPersistent; // Digitizer output is persistent
119
120
123
124
127
128
130};
131
132#endif /* CBMDIGITIZEINFO_H */
ECbmModuleId
Definition CbmDefs.h:39
Abstract base class for CBM digitisation tasks.
Auxiliary class for CbmDigitize.
CbmDigitizeInfo(const CbmDigitizeInfo &)=delete
Copy constructor forbidden.
Bool_t IsPresent() const
Data presence flag @value kTRUE if input branch is present in the tree.
CbmDigitizeBase * fDigitizer
void SetPresent(Bool_t choice=kTRUE)
Set data presence flag.
std::string ToString() const
Info to string.
virtual ~CbmDigitizeInfo()
Bool_t IsActive() const
Activity flag @value If kTRUE, if digitizer will be active.
void SetPersistent(Bool_t choice=kTRUE)
Set persistence flag.
void SetBranchName(TString branch)
Set input branch name.
void SetActive(Bool_t choice=kTRUE)
Set activity flag.
TString GetBranchName() const
Get input branch name @value Input branch name.
ClassDef(CbmDigitizeInfo, 2)
ECbmModuleId fSystem
CbmDigitizeBase * GetDigitizer() const
Get digitizer @value Pointer to digitizer instance.
CbmDigitizeInfo operator=(const CbmDigitizeInfo &)=delete
Assignment operator forbidden.
void SetDigitizer(CbmDigitizeBase *digitizer)
Set digitizer instance.
CbmDigitizeInfo(ECbmModuleId system, TString branch="", CbmDigitizeBase *digitizer=nullptr, Bool_t present=kFALSE, Bool_t active=kTRUE, Bool_t persistent=kTRUE)
Constructor.