CbmRoot
CbmUnpackTask.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmUnpackTask -----
4 // ----- Created 11.02.2020 by P.-A. Loizeau -----
5 // ----- -----
6 // -----------------------------------------------------------------------------
7 
8 #ifndef CBMUNPACKTASK_H
9 #define CBMUNPACKTASK_H
10 
12 #include "CbmUnpackTaskBase.hpp"
13 #include "Timeslice.hpp"
14 
16 
18 #include "TObject.h"
19 
21 #include <vector>
22 
23 //#include "CbmMcbmUnpack.h" <= Move relevant parts as template code here or in virtual base class!
24 
25 template<class TDigi, class TAlgo, class TParam>
27 public:
28  CbmUnpackTask(TString sDigiBranchName, TString sDigiBranchDescr = "");
29 
30  CbmUnpackTask(const CbmUnpackTask&) = delete;
32 
34 
35  Bool_t Init();
36  Bool_t DoUnpack(const fles::Timeslice& ts);
37  void Reset();
38 
39  void Finish();
40 
42  Bool_t InitContainers();
43  Bool_t ReInitContainers();
44 
46  void AddMsComponentToList(size_t /*component*/, UShort_t /*usDetectorId*/) {};
47  void SetNbMsInTs(size_t /*uCoreMsNb*/, size_t /*uOverlapMsNb*/) {};
48 
49  inline void SetMonitorMode(Bool_t bFlagIn = kTRUE) {
50  fbMonitorMode = bFlagIn;
51  }
52  void SetIgnoreOverlapMs(Bool_t bFlagIn = kTRUE);
53 
54  // void SetTimeOffsetNs( Double_t dOffsetIn = 0.0 ); <= Specialization method?
55 
57  void SetWriteOutputFlag(Bool_t bFlagIn) { fbWriteOutput = bFlagIn; }
58 
59 private:
61  Bool_t fbMonitorMode =
62  kFALSE;
64  kFALSE;
65  Bool_t fbWriteOutput =
66  kTRUE;
67 
69  uint64_t fulTsCounter = 0;
70 
72  std::vector<TDigi>* fvDigiIO =
73  nullptr;
74  std::vector<CbmErrorMessage>* fvErrorIO =
75  nullptr;
76 
78  // TH1* fhArraySize = nullptr;
79  // TH1* fhArrayCapacity = nullptr;
80 
82  TAlgo* fUnpackerAlgo = nullptr;
83 
85  TString fsDigiBranchName = "";
86  TString fsDigiBranchDescr = "";
87 };
88 
90 #include "CbmUnpackTask.tmpl"
91 
92 #endif // CBMUNPACKTASK_H
CbmUnpackTask::operator=
CbmUnpackTask operator=(const CbmUnpackTask &)=delete
CbmUnpackTask
CbmRoot (+externals) headers.
Definition: CbmUnpackTask.h:26
CbmUnpackTask::Reset
void Reset()
CbmUnpackTask::fUnpackerAlgo
TAlgo * fUnpackerAlgo
IO vector of Errors, passed to algo for filling and propagated to framework for output.
Definition: CbmUnpackTask.h:82
CbmUnpackTask::fsDigiBranchName
TString fsDigiBranchName
pointer to unpacking algo
Definition: CbmUnpackTask.h:85
CbmUnpackTask::fvDigiIO
std::vector< TDigi > * fvDigiIO
TS counter, not same as TS index!
Definition: CbmUnpackTask.h:72
CbmUnpackTask::fbMonitorMode
Bool_t fbMonitorMode
Control flags.
Definition: CbmUnpackTask.h:61
CbmUnpackTask::Init
Bool_t Init()
CbmUnpackTask::SetMonitorMode
void SetMonitorMode(Bool_t bFlagIn=kTRUE)
Definition: CbmUnpackTask.h:49
CbmUnpackTask::fulTsCounter
uint64_t fulTsCounter
If ON the output vector of digi is written to disk by FairRoot, otherwise just made available for hig...
Definition: CbmUnpackTask.h:69
CbmUnpackTask::CbmUnpackTask
CbmUnpackTask(const CbmUnpackTask &)=delete
CbmUnpackTask::SetParContainers
void SetParContainers()
CbmUnpackTask::DoUnpack
Bool_t DoUnpack(const fles::Timeslice &ts)
CbmUnpackTask::Finish
void Finish()
CbmUnpackTask::fvErrorIO
std::vector< CbmErrorMessage > * fvErrorIO
IO vector of Digis, passed to algo for filling and propagated to framework for output.
Definition: CbmUnpackTask.h:74
CbmUnpackTask::CbmUnpackTask
CbmUnpackTask(TString sDigiBranchName, TString sDigiBranchDescr="")
CbmUnpackTask::SetIgnoreOverlapMs
void SetIgnoreOverlapMs(Bool_t bFlagIn=kTRUE)
CbmUnpackTask::fsDigiBranchDescr
TString fsDigiBranchDescr
Definition: CbmUnpackTask.h:86
CbmUnpackTask::fbWriteOutput
Bool_t fbWriteOutput
Switch ON the filling of a additional set of histograms in the algo.
Definition: CbmUnpackTask.h:65
CbmUnpackTask::fbDebugMonitorMode
Bool_t fbDebugMonitorMode
Switch ON the filling of a minimal set of histograms in the algo.
Definition: CbmUnpackTask.h:63
CbmUnpackTask::ReInitContainers
Bool_t ReInitContainers()
CbmUnpackTask::AddMsComponentToList
void AddMsComponentToList(size_t, UShort_t)
Temp until we change from CbmMcbmUnpack to something else.
Definition: CbmUnpackTask.h:46
CbmUnpackTaskBase
CbmRoot (+externals) headers.
Definition: CbmUnpackTaskBase.h:21
CbmUnpackTask::InitContainers
Bool_t InitContainers()
CbmUnpackTask::SetNbMsInTs
void SetNbMsInTs(size_t, size_t)
Definition: CbmUnpackTask.h:47
CbmUnpackTask::SetWriteOutputFlag
void SetWriteOutputFlag(Bool_t bFlagIn)
Task settings.
Definition: CbmUnpackTask.h:57
CbmUnpackTask::~CbmUnpackTask
~CbmUnpackTask()