CbmRoot
CbmMcbm2018MonitorAlgoTofPulser.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmMcbm2018MonitorAlgoTofPulser -----
4 // ----- Created 12.10.2019 by P.-A. Loizeau -----
5 // ----- -----
6 // -----------------------------------------------------------------------------
7 
8 #ifndef CbmMcbm2018MonitorAlgoTofPulser_H
9 #define CbmMcbm2018MonitorAlgoTofPulser_H
10 
11 #include "CbmStar2019Algo.h"
12 
13 // Data
14 #include "CbmTofDigi.h"
15 #include "gDpbMessv100.h"
16 
17 // CbmRoot
18 
19 // C++11
20 #include <chrono>
21 
22 // C/C++
23 #include <map>
24 #include <vector>
25 
26 class CbmMcbm2018TofPar;
27 class TH1;
28 class TH2;
29 class TProfile;
30 
32 public:
35 
36  virtual Bool_t Init();
37  virtual void Reset();
38  virtual void Finish();
39 
40  Bool_t InitContainers();
41  Bool_t ReInitContainers();
42  TList* GetParList();
43 
44  Bool_t InitParameters();
45 
46  Bool_t ProcessTs(const fles::Timeslice& ts);
47  Bool_t ProcessTs(const fles::Timeslice& ts, size_t /*component*/) {
48  return ProcessTs(ts);
49  }
50  Bool_t ProcessMs(const fles::Timeslice& ts, size_t uMsCompIdx, size_t uMsIdx);
51 
52  void AddMsComponentToList(size_t component, UShort_t usDetectorId);
53 
54  Bool_t CreateHistograms();
55  Bool_t FillHistograms();
56  Bool_t UpdateStats();
57  Bool_t ResetHistograms();
58 
59  inline void SetGdpbIndex(Int_t iGdpb = -1) { fiGdpbIndex = iGdpb; }
60  inline void SetUpdateFreqTs(UInt_t uFreq = 100) { fuUpdateFreqTs = uFreq; }
61  inline void SetPulserTotLimits(UInt_t uMin, UInt_t uMax) {
62  fuPulserMinTot = uMin;
63  fuPulserMaxTot = uMax;
64  }
65  inline void SetPulserChannel(UInt_t uChan) { fuPulserChannel = uChan; }
66  inline void SetHistoryHistoSize(UInt_t inHistorySizeSec = 1800) {
67  fuHistoryHistoSize = inHistorySizeSec;
68  }
69 
70 private:
72  std::vector<Bool_t> fvbMaskedComponents;
73  Int_t fiGdpbIndex;
75 
78  UInt_t fuNrOfGdpbs;
80  std::map<UInt_t, UInt_t> fGdpbIdIndexMap;
85  UInt_t fuNrOfGet4;
88 
93 
95  static const Int_t kiMaxNbFlibLinks = 32;
96  static const UInt_t kuBytesPerMessage = 8;
97 
100  ULong64_t fulCurrentTsIdx;
101  ULong64_t fulCurrentMsIdx;
102  uint32_t
104  Double_t
106  Double_t
108  Double_t
110  UInt_t fuMsIndex;
111  UInt_t
114  UInt_t
116  UInt_t
118  UInt_t
120  UInt_t
122  std::vector<ULong64_t> fvulCurrentEpoch;
124  std::vector<ULong64_t>
126  std::vector<ULong64_t> fvulCurrentEpochFull;
127 
129  std::vector<gdpbv100::Message> fvmEpSupprBuffer;
130 
132  std::vector<std::vector<Bool_t>> fvvbFeeHitFound;
133  std::vector<std::vector<Double_t>> fvvdFeeHits;
134 
137  const Double_t kdMaxDtPulserPs = 300e3;
138  const UInt_t kuNbBinsDt = 2000;
139  Double_t dMinDt;
140  Double_t dMaxDt;
141  const Double_t kdFitZoomWidthPs = 500.0;
143  Double_t fdStartTime;
145 
148  std::vector<std::vector<TH1*>>
155 
157  TCanvas* fcSummary;
158 
159  void ProcessEpochCycle(uint64_t ulCycleData);
160  void ProcessEpoch(gdpbv100::Message mess);
161 
162  void ProcessEpSupprBuffer();
163 
165 
169 
171 };
172 
173 #endif // CbmMcbm2018MonitorAlgoTofPulser_H
gdpbv100::Message
Definition: gDpbMessv100.h:133
CbmMcbm2018MonitorAlgoTofPulser::fuNrOfGet4
UInt_t fuNrOfGet4
Number of channels in each FEE.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:85
CbmMcbm2018MonitorAlgoTofPulser::kiMaxNbFlibLinks
static const Int_t kiMaxNbFlibLinks
Constants.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:95
CbmMcbm2018MonitorAlgoTofPulser::fulCurrentMsIdx
ULong64_t fulCurrentMsIdx
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:101
CbmMcbm2018MonitorAlgoTofPulser::fvulCurrentEpochCycle
std::vector< ULong64_t > fvulCurrentEpochCycle
Current epoch index, per DPB.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:125
CbmMcbm2018MonitorAlgoTofPulser::ProcessTs
Bool_t ProcessTs(const fles::Timeslice &ts)
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:208
CbmMcbm2018MonitorAlgoTofPulser::UpdateStats
Bool_t UpdateStats()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:774
CbmMcbm2018MonitorAlgoTofPulser::fdTsStopTimeCore
Double_t fdTsStopTimeCore
Time in ns of current TS from the index of the first MS first component.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:107
CbmMcbm2018MonitorAlgoTofPulser::fuPulserChannel
UInt_t fuPulserChannel
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:92
CbmMcbm2018MonitorAlgoTofPulser::fuNrOfChannelsPerFee
UInt_t fuNrOfChannelsPerFee
Number of channels in each GET4.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:84
CbmMcbm2018MonitorAlgoTofPulser::dMinDt
Double_t dMinDt
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:139
CbmMcbm2018MonitorAlgoTofPulser::fuNrOfChannelsPerGet4
UInt_t fuNrOfChannelsPerGet4
Number of GET4s per FEE.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:83
CbmMcbm2018MonitorAlgoTofPulser::fuCurrDpbId
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:115
CbmMcbm2018MonitorAlgoTofPulser::SetUpdateFreqTs
void SetUpdateFreqTs(UInt_t uFreq=100)
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:60
CbmMcbm2018MonitorAlgoTofPulser::ProcessHit
void ProcessHit(gdpbv100::FullMessage mess)
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:489
CbmMcbm2018MonitorAlgoTofPulser::ProcessEpoch
void ProcessEpoch(gdpbv100::Message mess)
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:411
CbmMcbm2018MonitorAlgoTofPulser::fvvdFeeHits
std::vector< std::vector< Double_t > > fvvdFeeHits
[ gDPB ][ FEE ]
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:133
CbmMcbm2018MonitorAlgoTofPulser::FillHistograms
Bool_t FillHistograms()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:682
CbmMcbm2018MonitorAlgoTofPulser::fdStartTime
Double_t fdStartTime
Starting time and time evolution book-keeping.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:143
CbmMcbm2018MonitorAlgoTofPulser::dMaxDt
Double_t dMaxDt
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:140
CbmMcbm2018MonitorAlgoTofPulser::ResetHistograms
Bool_t ResetHistograms()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:851
CbmMcbm2018MonitorAlgoTofPulser::CbmMcbm2018MonitorAlgoTofPulser
CbmMcbm2018MonitorAlgoTofPulser()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:34
CbmMcbm2018MonitorAlgoTofPulser::ProcessEpochCycle
void ProcessEpochCycle(uint64_t ulCycleData)
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:386
CbmMcbm2018MonitorAlgoTofPulser::kuNbBinsDt
const UInt_t kuNbBinsDt
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:138
CbmMcbm2018MonitorAlgoTofPulser::fuNrOfFeePerGdpb
UInt_t fuNrOfFeePerGdpb
gDPB ID to index map
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:81
CbmMcbm2018MonitorAlgoTofPulser::fuNrOfGdpbs
UInt_t fuNrOfGdpbs
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:79
CbmTofDigi.h
CbmMcbm2018MonitorAlgoTofPulser::~CbmMcbm2018MonitorAlgoTofPulser
~CbmMcbm2018MonitorAlgoTofPulser()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:81
CbmMcbm2018MonitorAlgoTofPulser::InitParameters
Bool_t InitParameters()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:125
CbmMcbm2018MonitorAlgoTofPulser::ProcessEpSupprBuffer
void ProcessEpSupprBuffer()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:428
CbmMcbm2018MonitorAlgoTofPulser::CbmMcbm2018MonitorAlgoTofPulser
CbmMcbm2018MonitorAlgoTofPulser(const CbmMcbm2018MonitorAlgoTofPulser &)
CbmMcbm2018MonitorAlgoTofPulser::Finish
virtual void Finish()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:93
CbmMcbm2018MonitorAlgoTofPulser::fvmEpSupprBuffer
std::vector< gdpbv100::Message > fvmEpSupprBuffer
Epoch + Epoch Cycle.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:129
CbmMcbm2018MonitorAlgoTofPulser::SetPulserTotLimits
void SetPulserTotLimits(UInt_t uMin, UInt_t uMax)
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:61
CbmMcbm2018MonitorAlgoTofPulser::ProcessMs
Bool_t ProcessMs(const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:257
CbmMcbm2018MonitorAlgoTofPulser::fUnpackPar
CbmMcbm2018TofPar * fUnpackPar
Settings from parameter file.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:77
CbmMcbm2018MonitorAlgoTofPulser::kuBytesPerMessage
static const UInt_t kuBytesPerMessage
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:96
CbmMcbm2018MonitorAlgoTofPulser::fuCurrDpbIdx
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:117
CbmMcbm2018MonitorAlgoTofPulser::fuPulserMinTot
UInt_t fuPulserMinTot
Number of channels per GDPB.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:90
CbmMcbm2018MonitorAlgoTofPulser::fhPulserRmsGbtxToRefEvo
TH2 * fhPulserRmsGbtxToRefEvo
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:154
CbmMcbm2018MonitorAlgoTofPulser::fhPulserRmsGdpbToRefEvo
TH2 * fhPulserRmsGdpbToRefEvo
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:153
CbmMcbm2018MonitorAlgoTofPulser::SetGdpbIndex
void SetGdpbIndex(Int_t iGdpb=-1)
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:59
CbmStar2019Algo.h
CbmMcbm2018MonitorAlgoTofPulser::Reset
virtual void Reset()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:92
CbmMcbm2018MonitorAlgoTofPulser::fuUpdateFreqTs
UInt_t fuUpdateFreqTs
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:74
CbmStar2019Algo
Definition: CbmStar2019Algo.h:43
CbmMcbm2018MonitorAlgoTofPulser::fGdpbIdIndexMap
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
Total number of GDPBs in the system.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:80
CbmMcbm2018MonitorAlgoTofPulser::fvulCurrentEpochFull
std::vector< ULong64_t > fvulCurrentEpochFull
Epoch cycle from the Ms Start message and Epoch counter flip.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:126
CbmMcbm2018MonitorAlgoTofPulser::fhPulserTimeDiffRms
TH2 * fhPulserTimeDiffRms
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:151
CbmMcbm2018MonitorAlgoTofPulser::CreateHistograms
Bool_t CreateHistograms()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:527
CbmMcbm2018MonitorAlgoTofPulser::InitContainers
Bool_t InitContainers()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:100
CbmMcbm2018MonitorAlgoTofPulser::operator=
CbmMcbm2018MonitorAlgoTofPulser operator=(const CbmMcbm2018MonitorAlgoTofPulser &)
CbmMcbm2018MonitorAlgoTofPulser::ProcessTs
Bool_t ProcessTs(const fles::Timeslice &ts, size_t)
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:47
CbmMcbm2018MonitorAlgoTofPulser::fvbMaskedComponents
std::vector< Bool_t > fvbMaskedComponents
Control flags.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:72
CbmMcbm2018MonitorAlgoTofPulser::SetHistoryHistoSize
void SetHistoryHistoSize(UInt_t inHistorySizeSec=1800)
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:66
CbmMcbm2018MonitorAlgoTofPulser::fdTsStartTime
Double_t fdTsStartTime
SysId of the current MS in TS (0 to fuTotalMsNb)
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:105
CbmMcbm2018MonitorAlgoTofPulser::fuNrOfGet4PerGdpb
UInt_t fuNrOfGet4PerGdpb
Total number of Get4 chips in the system.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:86
CbmMcbm2018MonitorAlgoTofPulser::fdMsTime
Double_t fdMsTime
End Time in ns of current TS Core from the index of the first MS first component.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:109
CbmMcbm2018MonitorAlgoTofPulser::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:106
CbmMcbm2018MonitorAlgoTofPulser::fuGet4Nr
UInt_t fuGet4Nr
running number (0 to fuNrOfGet4PerGdpb) of the Get4 chip of a unique GDPB for current message
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:121
CbmMcbm2018MonitorAlgoTofPulser::fvvbFeeHitFound
std::vector< std::vector< Bool_t > > fvvbFeeHitFound
Storing the time of the last hit for each MS in each of the FEE.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:132
CbmMcbm2018MonitorAlgoTofPulser::GetParList
TList * GetParList()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:118
CbmMcbm2018MonitorAlgoTofPulser::fuGet4Id
UInt_t fuGet4Id
Index of the DPB from which the MS currently unpacked is coming.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:119
CbmMcbm2018MonitorAlgoTofPulser::SetPulserChannel
void SetPulserChannel(UInt_t uChan)
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:65
CbmMcbm2018MonitorAlgoTofPulser::AddMsComponentToList
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:191
gDpbMessv100.h
CbmMcbm2018TofPar
Definition: CbmMcbm2018TofPar.h:18
CbmMcbm2018MonitorAlgoTofPulser::kdFitZoomWidthPs
const Double_t kdFitZoomWidthPs
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:141
CbmMcbm2018MonitorAlgoTofPulser::fcSummary
TCanvas * fcSummary
Canvases.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:157
CbmMcbm2018MonitorAlgoTofPulser
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:31
CbmMcbm2018MonitorAlgoTofPulser::fuHistoryHistoSize
UInt_t fuHistoryHistoSize
Time of first MS.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:144
CbmMcbm2018MonitorAlgoTofPulser::fuMsIndex
UInt_t fuMsIndex
Start Time in ns of current MS from its index field in header.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:110
gdpbv100::FullMessage
Definition: gDpbMessv100.h:362
CbmMcbm2018MonitorAlgoTofPulser::fvvhFeePairPulserTimeDiff
std::vector< std::vector< TH1 * > > fvvhFeePairPulserTimeDiff
Size in seconds of the evolution histograms.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:149
CbmMcbm2018MonitorAlgoTofPulser::fuCurrentMsSysId
uint32_t fuCurrentMsSysId
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:103
CbmMcbm2018MonitorAlgoTofPulser::fhPulserTimeDiffMean
TH2 * fhPulserTimeDiffMean
[ FEE A ][ FEE B ]
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:150
CbmMcbm2018MonitorAlgoTofPulser::fuNrOfGet4PerFee
UInt_t fuNrOfGet4PerFee
Number of FEBs per GDPB.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:82
CbmMcbm2018MonitorAlgoTofPulser::Init
virtual Bool_t Init()
Definition: CbmMcbm2018MonitorAlgoTofPulser.cxx:87
CbmMcbm2018MonitorAlgoTofPulser::fhPulserTimeDiffRmsZoom
TH2 * fhPulserTimeDiffRmsZoom
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:152
CbmMcbm2018MonitorAlgoTofPulser::fulCurrentTsIdx
ULong64_t fulCurrentTsIdx
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:100
CbmMcbm2018MonitorAlgoTofPulser::kdMaxDtPulserPs
const Double_t kdMaxDtPulserPs
[ gDPB ][ FEE ]
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:137
CbmMcbm2018MonitorAlgoTofPulser::fuCurrentEquipmentId
UInt_t fuCurrentEquipmentId
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:113
CbmMcbm2018MonitorAlgoTofPulser::fvulCurrentEpoch
std::vector< ULong64_t > fvulCurrentEpoch
Data format control: Current time references for each GDPB: merged epoch marker, epoch cycle,...
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:123
CbmMcbm2018MonitorAlgoTofPulser::fuPulserMaxTot
UInt_t fuPulserMaxTot
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:91
CbmMcbm2018MonitorAlgoTofPulser::fuNrOfChannelsPerGdpb
UInt_t fuNrOfChannelsPerGdpb
Number of GET4s per GDPB.
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:87
CbmMcbm2018MonitorAlgoTofPulser::fiGdpbIndex
Int_t fiGdpbIndex
Definition: CbmMcbm2018MonitorAlgoTofPulser.h:73