CbmRoot
CbmMcbm2018UnpackerAlgoPsd.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmMcbm2018UnpackerAlgoPsd -----
4 // ----- Created 09.10.2019 by N.Karpushkin -----
5 // ----- based on CbmMcbm2018UnpackerAlgoTof by P.-A. Loizeau -----
6 // ----- -----
7 // -----------------------------------------------------------------------------
8 
9 #ifndef CbmMcbm2018UnpackerAlgoPsd_H
10 #define CbmMcbm2018UnpackerAlgoPsd_H
11 
12 #include "CbmStar2019Algo.h"
13 
14 // Data
15 #include "CbmPsdDigi.h"
16 #include "PronyFitter.h"
17 #include "PsdGbtReader.h"
18 
19 // CbmRoot
20 
21 // C++11
22 #include <chrono>
23 
24 // C/C++
25 #include <map>
26 #include <vector>
27 
28 class CbmMcbm2018PsdPar;
29 
30 class CbmMcbm2018UnpackerAlgoPsd : public CbmStar2019Algo<CbmPsdDigi> {
31 public:
34 
35  virtual Bool_t Init();
36  virtual void Reset();
37  virtual void Finish();
38 
39  Bool_t InitContainers();
40  Bool_t ReInitContainers();
41  TList* GetParList();
42 
43  Bool_t InitParameters();
44 
45  Bool_t ProcessTs(const fles::Timeslice& ts);
46  Bool_t ProcessTs(const fles::Timeslice& ts, size_t /*component*/) {
47  return ProcessTs(ts);
48  }
49  Bool_t ProcessMs(const fles::Timeslice& ts, size_t uMsCompIdx, size_t uMsIdx);
50 
51  void AddMsComponentToList(size_t component, UShort_t usDetectorId);
52 
53  Bool_t CreateHistograms();
54  Bool_t FillHistograms();
55  Bool_t ResetHistograms();
56 
57  inline void SetMonitorMode(Bool_t bFlagIn = kTRUE) {
58  fbMonitorMode = bFlagIn;
59  }
60  inline void SetTimeOffsetNs(Double_t dOffsetIn = 0.0) {
61  fdTimeOffsetNs = dOffsetIn;
62  }
63  inline void SetDiamondDpbIdx(UInt_t uIdx = 2) { fuDiamondDpbIdx = uIdx; }
64 
65 
66 private:
68  Bool_t
70  Bool_t
72  std::vector<Bool_t> fvbMaskedComponents;
73 
76  UInt_t fuNrOfGdpbs;
78  std::map<UInt_t, UInt_t> fGdpbIdIndexMap;
82 
84  UInt_t fuNrOfGbtx;
85  UInt_t fuNrOfModules;
86  std::vector<Int_t> fviNrOfRpc;
87  std::vector<Int_t> fviRpcType;
88  std::vector<Int_t> fviRpcSide;
89  std::vector<Int_t> fviModuleId;
90  std::vector<Int_t> fviPsdChUId;
91 
93  Double_t fdTimeOffsetNs;
95 
97  static const Int_t kiMaxNbFlibLinks = 32;
98  static const UInt_t kuBytesPerMessage = 8;
99  static const UInt_t kuDetMask = 0x0001FFFF;
100 
103  ULong64_t fulCurrentTsIdx;
104  ULong64_t fulCurrentMsIdx;
106  Double_t
108  Double_t
110  Double_t
112  UInt_t fuMsIndex;
113 
115  UInt_t
117  UInt_t
119  UInt_t
121  Int_t
124 
126  std::vector<ULong64_t> fvulCurrentEpoch;
127  std::vector<ULong64_t>
129  std::vector<ULong64_t> fvulCurrentEpochFull;
130 
132  Double_t
134  Double_t
136  std::chrono::steady_clock::time_point
141 
142  ClassDef(CbmMcbm2018UnpackerAlgoPsd, 1)
143 };
144 
145 #endif
CbmMcbm2018UnpackerAlgoPsd::GetParList
TList * GetParList()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:96
CbmMcbm2018UnpackerAlgoPsd::operator=
CbmMcbm2018UnpackerAlgoPsd operator=(const CbmMcbm2018UnpackerAlgoPsd &)
CbmMcbm2018UnpackerAlgoPsd::fuCurrentMsSysId
size_t fuCurrentMsSysId
Idx of the current MS in TS (0 to fuTotalMsNb)
Definition: CbmMcbm2018UnpackerAlgoPsd.h:105
CbmMcbm2018UnpackerAlgoPsd::fdStartTime
Double_t fdStartTime
Epoch + Epoch Cycle.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:133
CbmMcbm2018UnpackerAlgoPsd::~CbmMcbm2018UnpackerAlgoPsd
~CbmMcbm2018UnpackerAlgoPsd()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:65
PsdGbtReader.h
PronyFitter.h
CbmMcbm2018UnpackerAlgoPsd::ProcessTs
Bool_t ProcessTs(const fles::Timeslice &ts)
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:165
CbmPsdDigi.h
CbmMcbm2018UnpackerAlgoPsd::fuCurrDpbId
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:118
CbmMcbm2018UnpackerAlgoPsd::fviPsdChUId
std::vector< Int_t > fviPsdChUId
Definition: CbmMcbm2018UnpackerAlgoPsd.h:90
CbmMcbm2018UnpackerAlgoPsd::fuCurrentEquipmentId
UInt_t fuCurrentEquipmentId
Index of current MS within the TS.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:116
CbmMcbm2018UnpackerAlgoPsd::FillHistograms
Bool_t FillHistograms()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:389
CbmMcbm2018UnpackerAlgoPsd::fvulCurrentEpochCycle
std::vector< ULong64_t > fvulCurrentEpochCycle
Current epoch index, per DPB.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:128
CbmMcbm2018UnpackerAlgoPsd::fvulCurrentEpochFull
std::vector< ULong64_t > fvulCurrentEpochFull
Epoch cycle from the Ms Start message and Epoch counter flip.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:129
CbmMcbm2018UnpackerAlgoPsd::InitParameters
Bool_t InitParameters()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:103
CbmMcbm2018UnpackerAlgoPsd::Finish
virtual void Finish()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:76
CbmMcbm2018UnpackerAlgoPsd::fGdpbIdIndexMap
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
Total number of GDPBs in the system.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:78
CbmMcbm2018UnpackerAlgoPsd::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:85
CbmMcbm2018UnpackerAlgoPsd::fdTimeOffsetNs
Double_t fdTimeOffsetNs
User settings: Data correction parameters.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:93
CbmMcbm2018UnpackerAlgoPsd::fviRpcType
std::vector< Int_t > fviRpcType
Definition: CbmMcbm2018UnpackerAlgoPsd.h:87
CbmMcbm2018UnpackerAlgoPsd::CbmMcbm2018UnpackerAlgoPsd
CbmMcbm2018UnpackerAlgoPsd()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:31
CbmMcbm2018UnpackerAlgoPsd::fbMonitorMode
Bool_t fbMonitorMode
Control flags.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:69
CbmMcbm2018UnpackerAlgoPsd::ProcessMs
Bool_t ProcessMs(const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:220
CbmMcbm2018UnpackerAlgoPsd::SetDiamondDpbIdx
void SetDiamondDpbIdx(UInt_t uIdx=2)
Definition: CbmMcbm2018UnpackerAlgoPsd.h:63
CbmMcbm2018UnpackerAlgoPsd::fUnpackPar
CbmMcbm2018PsdPar * fUnpackPar
Settings from parameter file.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:75
CbmMcbm2018UnpackerAlgoPsd::Reset
virtual void Reset()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:75
CbmMcbm2018UnpackerAlgoPsd
Definition: CbmMcbm2018UnpackerAlgoPsd.h:30
CbmMcbm2018UnpackerAlgoPsd::CbmMcbm2018UnpackerAlgoPsd
CbmMcbm2018UnpackerAlgoPsd(const CbmMcbm2018UnpackerAlgoPsd &)
CbmMcbm2018UnpackerAlgoPsd::kuBytesPerMessage
static const UInt_t kuBytesPerMessage
Definition: CbmMcbm2018UnpackerAlgoPsd.h:98
CbmMcbm2018UnpackerAlgoPsd::ProcessTs
Bool_t ProcessTs(const fles::Timeslice &ts, size_t)
Definition: CbmMcbm2018UnpackerAlgoPsd.h:46
CbmMcbm2018UnpackerAlgoPsd::fulCurrentTsIdx
ULong64_t fulCurrentTsIdx
Definition: CbmMcbm2018UnpackerAlgoPsd.h:103
CbmMcbm2018UnpackerAlgoPsd::ftStartTimeUnix
std::chrono::steady_clock::time_point ftStartTimeUnix
Definition: CbmMcbm2018UnpackerAlgoPsd.h:137
CbmMcbm2018UnpackerAlgoPsd::fuNrOfGbtx
UInt_t fuNrOfGbtx
Number of channels per GDPB.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:84
CbmMcbm2018UnpackerAlgoPsd::fdMsTime
Double_t fdMsTime
End Time in ns of current TS Core from the index of the first MS first component.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:111
CbmMcbm2018UnpackerAlgoPsd::fuNrOfChannelsPerFee
UInt_t fuNrOfChannelsPerFee
Number of FEBs per GDPB.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:80
CbmStar2019Algo.h
CbmMcbm2018UnpackerAlgoPsd::fuNrOfModules
UInt_t fuNrOfModules
Definition: CbmMcbm2018UnpackerAlgoPsd.h:85
CbmMcbm2018UnpackerAlgoPsd::Init
virtual Bool_t Init()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:70
CbmStar2019Algo
Definition: CbmStar2019Algo.h:43
CbmMcbm2018UnpackerAlgoPsd::InitContainers
Bool_t InitContainers()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:79
CbmMcbm2018PsdPar
Definition: CbmMcbm2018PsdPar.h:19
CbmMcbm2018UnpackerAlgoPsd::AddMsComponentToList
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:150
CbmMcbm2018UnpackerAlgoPsd::fuNrOfGdpbs
UInt_t fuNrOfGdpbs
Definition: CbmMcbm2018UnpackerAlgoPsd.h:77
CbmMcbm2018UnpackerAlgoPsd::SetMonitorMode
void SetMonitorMode(Bool_t bFlagIn=kTRUE)
Definition: CbmMcbm2018UnpackerAlgoPsd.h:57
CbmMcbm2018UnpackerAlgoPsd::fviNrOfRpc
std::vector< Int_t > fviNrOfRpc
Definition: CbmMcbm2018UnpackerAlgoPsd.h:86
CbmMcbm2018UnpackerAlgoPsd::fviModuleId
std::vector< Int_t > fviModuleId
Definition: CbmMcbm2018UnpackerAlgoPsd.h:89
CbmMcbm2018UnpackerAlgoPsd::fdStartTimeMsSz
Double_t fdStartTimeMsSz
Definition: CbmMcbm2018UnpackerAlgoPsd.h:135
CbmMcbm2018UnpackerAlgoPsd::kuDetMask
static const UInt_t kuDetMask
Definition: CbmMcbm2018UnpackerAlgoPsd.h:99
CbmMcbm2018UnpackerAlgoPsd::fviRpcSide
std::vector< Int_t > fviRpcSide
Definition: CbmMcbm2018UnpackerAlgoPsd.h:88
CbmMcbm2018UnpackerAlgoPsd::CreateHistograms
Bool_t CreateHistograms()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:388
CbmMcbm2018UnpackerAlgoPsd::fuNrOfFeePerGdpb
UInt_t fuNrOfFeePerGdpb
gDPB ID to index map
Definition: CbmMcbm2018UnpackerAlgoPsd.h:79
CbmMcbm2018UnpackerAlgoPsd::fuNrOfChannelsPerGdpb
UInt_t fuNrOfChannelsPerGdpb
Number of channels in each FEE.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:81
CbmMcbm2018UnpackerAlgoPsd::SetTimeOffsetNs
void SetTimeOffsetNs(Double_t dOffsetIn=0.0)
Definition: CbmMcbm2018UnpackerAlgoPsd.h:60
CbmMcbm2018UnpackerAlgoPsd::fuDiamondDpbIdx
UInt_t fuDiamondDpbIdx
Definition: CbmMcbm2018UnpackerAlgoPsd.h:94
CbmMcbm2018UnpackerAlgoPsd::fuCurrDpbIdx
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:120
CbmMcbm2018UnpackerAlgoPsd::fiRunStartDateTimeSec
Int_t fiRunStartDateTimeSec
Index of the DPB from which the MS currently unpacked is coming.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:122
CbmMcbm2018UnpackerAlgoPsd::fvulCurrentEpoch
std::vector< ULong64_t > fvulCurrentEpoch
Bin size in s for the plots with date as X axis.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:126
CbmMcbm2018UnpackerAlgoPsd::ResetHistograms
Bool_t ResetHistograms()
Definition: CbmMcbm2018UnpackerAlgoPsd.cxx:390
CbmMcbm2018UnpackerAlgoPsd::fulCurrentMsIdx
ULong64_t fulCurrentMsIdx
Idx of the current TS.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:104
CbmMcbm2018UnpackerAlgoPsd::fdTsStartTime
Double_t fdTsStartTime
SysId of the current MS in TS (0 to fuTotalMsNb)
Definition: CbmMcbm2018UnpackerAlgoPsd.h:107
CbmMcbm2018UnpackerAlgoPsd::kiMaxNbFlibLinks
static const Int_t kiMaxNbFlibLinks
Constants.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:97
CbmMcbm2018UnpackerAlgoPsd::fbDebugMonitorMode
Bool_t fbDebugMonitorMode
Switch ON the filling of a minimal set of histograms.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:71
CbmMcbm2018UnpackerAlgoPsd::fvbMaskedComponents
std::vector< Bool_t > fvbMaskedComponents
Switch ON the filling of a additional set of histograms.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:72
CbmMcbm2018UnpackerAlgoPsd::fuMsIndex
UInt_t fuMsIndex
Start Time in ns of current MS from its index field in header.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:112
CbmMcbm2018UnpackerAlgoPsd::fdTsStopTimeCore
Double_t fdTsStopTimeCore
Time in ns of current TS from the index of the first MS first component.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:109
CbmMcbm2018UnpackerAlgoPsd::fiBinSizeDatePlots
Int_t fiBinSizeDatePlots
Start of run time since "epoch" in s, for the plots with date as X axis.
Definition: CbmMcbm2018UnpackerAlgoPsd.h:123