CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2018UnpackerTaskTrdR.h
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dennis Spicker, Florian Uhlig [committer], Pascal Raisig */
4
11#ifndef CbmMcbm2018UnpackerTaskTrdR_H
12#define CbmMcbm2018UnpackerTaskTrdR_H
13
15#include "CbmMcbmUnpack.h"
16#include "CbmTrdDigi.h"
18
19#include "TString.h"
20
22
30public:
33
35
40
47 virtual Bool_t Init();
48
50 virtual Bool_t DoUnpack(const fles::Timeslice& ts, size_t component);
51
53 virtual void Reset();
54
55 // Called in CbmMcbm2018Source::Close() */
56 virtual void Finish();
57
59 virtual void SetParContainers();
60
61 virtual Bool_t InitContainers();
62
63 virtual Bool_t ReInitContainers();
64
68 virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId);
69
73 virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb);
74
75 void SetMonitorMode(Bool_t bFlagIn = kTRUE) { fbMonitorMode = bFlagIn; }
76 void SetDebugMonitorMode(Bool_t bFlagIn = kTRUE) { fbDebugMonitorMode = bFlagIn; }
77 void SetWriteOutput(Bool_t bFlagIn = kTRUE) { fbWriteOutput = bFlagIn; }
78 void SetDebugWriteOutput(Bool_t bFlagIn = kTRUE) { fbDebugWriteOutput = bFlagIn; }
79 void SetDebugSortOutput(Bool_t bFlagIn = kTRUE) { fbDebugSortOutput = bFlagIn; }
80 void SetSystemIdentifier(std::uint8_t id) { fSystemIdentifier = id; }
81 void SetTimeOffsetNs(Double_t dOffsetIn = 0.0);
82
86 void SetBaselineAvg(Bool_t bFlagIn = kTRUE) { fbBaselineAvg = bFlagIn; }
87
88 void SetActiveHistograms(std::vector<bool> isActiveHistoVec) { fIsActiveHistoVec = isActiveHistoVec; }
89 void SetHistoFileName(TString filename);
90
91 void SetMsSizeInNs(Double_t msSizeInNs) { fdMsSizeInNs = msSizeInNs; } // TODO handle this with asic parameter files
92
93 void SetIgnoreOverlapMs(Bool_t bFlagIn = kTRUE);
94
95 void SetFirstChannelsElinkEven(bool isEven)
96 {
98 }
99
100private:
101 // Control flags
106 Bool_t fbDebugSortOutput = kTRUE;
108 std::uint8_t fSystemIdentifier;
109 Double_t
111
113 false;
114
115
117 std::vector<bool> fIsActiveHistoVec; // Define active histos in algo
118
121
123 std::vector<CbmTrdDigi>* fTrdDigiVector;
124
126 std::vector<CbmTrdRawMessageSpadic>* fTrdRawMessageVector;
127
129 std::vector<std::pair<size_t, size_t>>* fSpadicInfoMsgVector;
130
133
134 ClassDef(CbmMcbm2018UnpackerTaskTrdR, 1)
135};
136
137#endif
Timeslice unpacker algorithm for Spadic v.2.2 .
Timeslice unpacker FairTask for Spadic v.2.2 .
Bool_t fbDebugSortOutput
If ON the output vector of raw messages is sorted in time.
void SetMsSizeInNs(Double_t msSizeInNs)
void SetMonitorMode(Bool_t bFlagIn=kTRUE)
void SetTimeOffsetNs(Double_t dOffsetIn=0.0)
void SetBaselineAvg(Bool_t bFlagIn=kTRUE)
Call this when Spadic Average-Baseline feature is enabled.
Bool_t fbWriteOutput
If ON the output Vector of digis is written to disk.
std::vector< std::pair< size_t, size_t > > * fSpadicInfoMsgVector
vector< pair< fulltime, word > >
Bool_t fbDebugMonitorMode
Switch ON the filling of a additional set of histograms.
void SetActiveHistograms(std::vector< bool > isActiveHistoVec)
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
virtual Bool_t Init()
Registers output-data containers at the FairRootManager.
void SetWriteOutput(Bool_t bFlagIn=kTRUE)
Double_t fdMsSizeInNs
microslice size in ns to be passed to the unpacker // TODO handle this with asic parameter files
Bool_t fbBaselineAvg
Set to true if Baseline Averaging is activated in Spadic.
void SetDebugWriteOutput(Bool_t bFlagIn=kTRUE)
virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
Sets numbers of Core Microslices and overlap Microslices per Timeslice.
std::uint8_t fSystemIdentifier
by default set to: fles::Subsystem::TRD, changable via setter
Bool_t fbDebugWriteOutput
If ON the output vector of raw messages is filled and written to disk.
CbmMcbm2020TrdTshiftPar * fTimeshiftPar
mCbm2020 timeshift correction parameters
void SetDebugMonitorMode(Bool_t bFlagIn=kTRUE)
CbmMcbm2018UnpackerTaskTrdR(const CbmMcbm2018UnpackerTaskTrdR &)
std::vector< CbmTrdRawMessageSpadic > * fTrdRawMessageVector
Output Spadic raw messages for debugging.
std::vector< CbmTrdDigi > * fTrdDigiVector
Output Digi vector.
Bool_t fbMonitorMode
< Set wether channels 00..15 are on the even (true) or the odd (false and default) elink
virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Adds an input component to the list of active components for this unpacker.
void SetIgnoreOverlapMs(Bool_t bFlagIn=kTRUE)
CbmMcbm2018UnpackerAlgoTrdR * fUnpackerAlgo
Processing algo.
CbmMcbm2018UnpackerTaskTrdR operator=(const CbmMcbm2018UnpackerTaskTrdR &)
bool fIsFirstChannelsElinkEven
define if the first 16 channels (00..15) are found on the even (set true) or odd (false) eLinkId,...
void SetDebugSortOutput(Bool_t bFlagIn=kTRUE)