CbmRoot
Loading...
Searching...
No Matches
CbmUnpackTask.h
Go to the documentation of this file.
1/* Copyright (C) 2020 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5// -----------------------------------------------------------------------------
6// ----- -----
7// ----- CbmUnpackTask -----
8// ----- Created 11.02.2020 by P.-A. Loizeau -----
9// ----- -----
10// -----------------------------------------------------------------------------
11
12#ifndef CBMUNPACKTASK_H
13#define CBMUNPACKTASK_H
14
16#include "CbmUnpackTaskBase.hpp"
17#include "Timeslice.hpp"
18
20
22#include "TObject.h"
23
25#include <vector>
26
27//#include "CbmMcbmUnpack.h" <= Move relevant parts as template code here or in virtual base class!
28
29template<class TDigi, class TAlgo, class TParam>
31 public:
32 CbmUnpackTask(TString sDigiBranchName, TString sDigiBranchDescr = "");
33
34 CbmUnpackTask(const CbmUnpackTask&) = delete;
36
38
39 Bool_t Init();
40 Bool_t DoUnpack(const fles::Timeslice& ts);
41 void Reset();
42
43 void Finish();
44
48
50 void AddMsComponentToList(size_t /*component*/, UShort_t /*usDetectorId*/){};
51 void SetNbMsInTs(size_t /*uCoreMsNb*/, size_t /*uOverlapMsNb*/){};
52
53 inline void SetMonitorMode(Bool_t bFlagIn = kTRUE) { fbMonitorMode = bFlagIn; }
54 void SetIgnoreOverlapMs(Bool_t bFlagIn = kTRUE);
55
56 // void SetTimeOffsetNs( Double_t dOffsetIn = 0.0 ); <= Specialization method?
57
59 void SetWriteOutputFlag(Bool_t bFlagIn) { fbWriteOutput = bFlagIn; }
60
61 private:
63 Bool_t fbMonitorMode = kFALSE;
64 Bool_t fbDebugMonitorMode = kFALSE;
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
CbmRoot (+externals) headers.
CbmRoot (+externals) headers.
CbmUnpackTask(TString sDigiBranchName, TString sDigiBranchDescr="")
Bool_t Init()
TAlgo * fUnpackerAlgo
IO vector of Errors, passed to algo for filling and propagated to framework for output.
CbmUnpackTask operator=(const CbmUnpackTask &)=delete
Bool_t fbMonitorMode
Control flags.
Bool_t fbWriteOutput
Switch ON the filling of a additional set of histograms in the algo.
Bool_t fbDebugMonitorMode
Switch ON the filling of a minimal set of histograms in the algo.
void SetWriteOutputFlag(Bool_t bFlagIn)
Task settings.
std::vector< TDigi > * fvDigiIO
TS counter, not same as TS index!
TString fsDigiBranchName
pointer to unpacking algo
Bool_t ReInitContainers()
std::vector< CbmErrorMessage > * fvErrorIO
IO vector of Digis, passed to algo for filling and propagated to framework for output.
void SetMonitorMode(Bool_t bFlagIn=kTRUE)
Bool_t DoUnpack(const fles::Timeslice &ts)
void SetParContainers()
void AddMsComponentToList(size_t, UShort_t)
Temp until we change from CbmMcbmUnpack to something else.
CbmUnpackTask(const CbmUnpackTask &)=delete
TString fsDigiBranchDescr
void SetNbMsInTs(size_t, size_t)
uint64_t fulTsCounter
If ON the output vector of digi is written to disk by FairRoot, otherwise just made available for hig...
Bool_t InitContainers()
void SetIgnoreOverlapMs(Bool_t bFlagIn=kTRUE)