CbmRoot
CbmDigitizeBase.h
Go to the documentation of this file.
1 
6 #ifndef CBMDIGITIZEBASE_H
7 #define CBMDIGITIZEBASE_H 1
8 
9 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
10 #include <RtypesCore.h> // for Bool_t, Double_t, Int_t, kTRUE, ULong64_t
11 
12 #include <FairTask.h> // for FairTask
13 
14 #include <string> // for string
15 
16 #include "CbmDefs.h" // for ECbmModuleId
17 class CbmTimeSlice;
18 
26 class CbmDigitizeBase : public FairTask {
27 
28 public:
31 
32 
36  CbmDigitizeBase(const char* name);
37 
38 
40  virtual ~CbmDigitizeBase();
41 
42 
50  virtual Bool_t CheckOutput() = 0;
51 
52 
58  virtual void ClearOutput() = 0;
59 
60 
68  virtual void FillCustomData(Double_t /*fillTime*/, Bool_t /*limit*/ = kTRUE) {
69  }
70 
71 
79  virtual ULong64_t FillTimeSlice(CbmTimeSlice* timeSlice) = 0;
80 
81 
90  virtual ULong64_t FillTimeSlice(CbmTimeSlice*, Double_t tMax) = 0;
91 
92 
101  void GetEventInfo();
102 
103 
107  Double_t GetEventTime() const { return fCurrentEventTime; }
108 
109 
113  virtual ULong64_t GetDaqBufferSize() const = 0;
114 
115 
119  virtual std::string GetDaqBufferStatus() const = 0;
120 
121 
125  virtual Double_t GetDaqBufferTimeFirst() const = 0;
126 
127 
131  virtual ECbmModuleId GetSystemId() const = 0;
132 
133 
137  virtual Double_t GetDaqBufferTimeLast() const = 0;
138 
139 
143  void SetCreateMatches(Bool_t choice = kTRUE) { fCreateMatches = choice; }
144 
145 
149  void SetEventMode(Bool_t choice = kTRUE) { fEventMode = choice; }
150 
151 
155  void SetProduceNoise(Bool_t choice = kTRUE) { fProduceNoise = choice; }
156 
157 
158 protected:
159  Bool_t fEventMode;
160  Bool_t fProduceNoise;
161  Bool_t fCreateMatches;
165  Double_t fCurrentEventTime;
166 
167 
168 private:
171 
172 
174  void operator=(const CbmDigitizeBase&) = delete;
175 
176 
178 };
179 
180 #endif /* CBMDIGITIZEBASE_H */
CbmDigitizeBase::GetDaqBufferStatus
virtual std::string GetDaqBufferStatus() const =0
Status of DAQ buffer @value Status string of the DAQ buffer.
CbmDigitizeBase::FillTimeSlice
virtual ULong64_t FillTimeSlice(CbmTimeSlice *timeSlice)=0
Fill data into the current time slice.
CbmDigitizeBase::GetEventInfo
void GetEventInfo()
Get event information.
Definition: CbmDigitizeBase.cxx:48
CbmDigitizeBase::CheckOutput
virtual Bool_t CheckOutput()=0
Check the output arrays.
CbmDigitizeBase::fCreateMatches
Bool_t fCreateMatches
Flag for production of inter-event noise.
Definition: CbmDigitizeBase.h:161
CbmDigitizeBase::SetCreateMatches
void SetCreateMatches(Bool_t choice=kTRUE)
Set creation of links to MC.
Definition: CbmDigitizeBase.h:143
CbmDigitizeBase::fCurrentMCEntry
Int_t fCurrentMCEntry
Number of current MC event.
Definition: CbmDigitizeBase.h:164
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmDigitizeBase::GetEventTime
Double_t GetEventTime() const
Current event time @value Start time of current event [ns].
Definition: CbmDigitizeBase.h:107
CbmDigitizeBase::GetDaqBufferTimeFirst
virtual Double_t GetDaqBufferTimeFirst() const =0
Time of first datum in DAQ buffer @value Time of first datum in DAQ buffer.
CbmDigitizeBase::~CbmDigitizeBase
virtual ~CbmDigitizeBase()
Destructor.
Definition: CbmDigitizeBase.cxx:43
CbmDigitizeBase::operator=
void operator=(const CbmDigitizeBase &)=delete
Assignment operator forbidden.
CbmDigitizeBase::GetDaqBufferSize
virtual ULong64_t GetDaqBufferSize() const =0
Size of DAQ buffer @value Number of data in the DAQ buffer.
CbmDigitizeBase::CbmDigitizeBase
CbmDigitizeBase()
Constructor.
Definition: CbmDigitizeBase.cxx:17
CbmDigitizeBase::fProduceNoise
Bool_t fProduceNoise
Flag for event-by-event mode.
Definition: CbmDigitizeBase.h:160
CbmDigitizeBase::FillCustomData
virtual void FillCustomData(Double_t, Bool_t=kTRUE)
Fill custom data into time slice.
Definition: CbmDigitizeBase.h:68
CbmDigitizeBase::SetEventMode
void SetEventMode(Bool_t choice=kTRUE)
Set event-by-event mode.
Definition: CbmDigitizeBase.h:149
CbmDigitizeBase::fEventMode
Bool_t fEventMode
Definition: CbmDigitizeBase.h:159
CbmDigitizeBase::SetProduceNoise
void SetProduceNoise(Bool_t choice=kTRUE)
Set production of inter-event noise.
Definition: CbmDigitizeBase.h:155
CbmDigitizeBase::fCurrentEvent
Int_t fCurrentEvent
Number of current input.
Definition: CbmDigitizeBase.h:163
CbmDigitizeBase::fCurrentInput
Int_t fCurrentInput
Flag for creation of links to MC.
Definition: CbmDigitizeBase.h:162
CbmDigitizeBase::fCurrentEventTime
Double_t fCurrentEventTime
Number of current MC entry.
Definition: CbmDigitizeBase.h:165
CbmDigitizeBase::ClassDef
ClassDef(CbmDigitizeBase, 3)
CbmDigitizeBase::ClearOutput
virtual void ClearOutput()=0
Clear the output arrays.
CbmDigitizeBase::FillTimeSlice
virtual ULong64_t FillTimeSlice(CbmTimeSlice *, Double_t tMax)=0
Fill data into the current time slice.
CbmTimeSlice
Bookkeeping of time-slice content.
Definition: CbmTimeSlice.h:29
CbmDigitizeBase::CbmDigitizeBase
CbmDigitizeBase(const CbmDigitizeBase &)=delete
Time of current MC event [ns].
CbmDigitizeBase::GetSystemId
virtual ECbmModuleId GetSystemId() const =0
Detector system ID.
CbmDigitizeBase
Abstract base class for CBM digitisation tasks.
Definition: CbmDigitizeBase.h:26
CbmDigitizeBase::GetDaqBufferTimeLast
virtual Double_t GetDaqBufferTimeLast() const =0
Time of last datum in DAQ buffer @value Time of last datum in DAQ buffer.
CbmDefs.h