CbmRoot
Loading...
Searching...
No Matches
CbmTofUnpackMonitorTestFee.h
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5#ifndef CbmTofUnpackMonitorTestFee_H
6#define CbmTofUnpackMonitorTestFee_H
7
8#include "CbmMcbm2018TofPar.h"
10
11#include <Rtypes.h>
12/*
13#include <TH1.h>
14#include <TH2.h>
15#include <TProfile.h>
16#include <TProfile2D.h>
17*/
18
19#include <array>
20#include <cstdint>
21#include <vector>
22
23class TH1;
24class TH2;
25class TProfile;
26class TProfile2D;
27class TCanvas;
28
30 public:
32
34
35 inline void SelectTestFees(UInt_t uCompA, UInt_t uGbtxA, UInt_t uFeeA, UInt_t uCompB, UInt_t uGbtxB, UInt_t uFeeB)
36 {
37 fuCompA = uCompA;
38 fuGbtxA = uGbtxA;
39 fuFeeA = uFeeA;
40 fuCompB = uCompB;
41 fuGbtxB = uGbtxB;
42 fuFeeB = uFeeB;
43 }
44 inline void SetFitZoomWidthPs(Double_t inZoomWidth = 1000.0) { fdFitZoomWidthPs = inZoomWidth; }
45
47 virtual Bool_t Init(CbmMcbm2018TofPar* digiParSet);
48
49 virtual Bool_t CreateHistograms();
50 virtual Bool_t ResetHistograms();
51 virtual void DrawCanvases();
52
54 virtual void Finish();
55
57 virtual void FillHitMonitoringHistos(const double_t& dMsTime, const uint32_t& uCurrCompIdx, const uint32_t& uGet4Id,
58 const uint32_t& uRawCh, const uint32_t& uRemapCh, const uint32_t& uTot,
59 const double_t& dHitTime, const uint32_t& uFts, bool bDiamond = false);
61 virtual void FinalizeMsHistos();
63 virtual void FinalizeTsHistos(double_t dTsStartTime);
64
66 virtual void FillEpochMonitoringHistos(const uint32_t&, const uint32_t&, const bool&, const bool&, const bool&,
67 const bool&)
68 {
69 }
70 virtual void FillScmMonitoringHistos(const uint32_t&, const uint32_t&, const uint32_t&, const uint32_t&,
71 const uint32_t&)
72 {
73 }
74 virtual void FillSysMonitoringHistos(const uint32_t&, const uint32_t&, const uint32_t&) {}
75 virtual void FillErrMonitoringHistos(const uint32_t&, const uint32_t&, const uint32_t&, const uint32_t&) {}
76
77 void UpdateZoomedFit(std::vector<std::vector<TH1*>> phTimeDiff, TH2* phTimeRmsZoom, TH2* phTimeResFit);
78
79 // Overload setters for all special modes of the base class to prevent their usage
80 void SetBmonMode(bool value);
81 void SetBmonMicroSpillMode(bool value);
82 void SetBmonScvdMode(bool value);
83 void SetBmonQFactorMode(bool value);
84 void SetTofQFactorMode(bool value);
85
86 private:
88 static const UInt_t kuNbTestFee = 2;
89 const double_t kdMaxDtPulserPs = 300e3;
90 // Default value for nb bins in Pulser time difference histos
91 const uint32_t kuNbBinsDt = 2000;
92
94 double_t fdFitZoomWidthPs = 1000.0;
95 double_t fdLastRmsUpdateTime = -1.0;
96 uint32_t fuNbRmsUpdates = 0;
97 // Dt limits?
98 double_t dMinDt = 0.0;
99 double_t dMaxDt = 0.0;
100 // Default number of FEE per channels histograms
101 uint32_t fuNbFeePlot = 2;
103 // FIXME: Start using again the parameter class accessors once a new CRI oriented class is brought into use
104 const uint32_t kuNbFeePerGbtx = 5;
105 const uint32_t kuNbGbtxPerComp = 1;
106 uint32_t fuNbOfFeePerComp = 10;
107 uint32_t fuNbOfGet4PerFee = 8;
108 uint32_t fuNbOfChannelsPerFee = 0;
109
110 uint32_t fuCompA = 0;
111 uint32_t fuGbtxA = 0;
112 uint32_t fuFeeA = 0;
113 uint32_t fuGlobalIdxFeeA = 0;
114 uint32_t fuCompB = 0;
115 uint32_t fuGbtxB = 0;
116 uint32_t fuFeeB = 0;
117 uint32_t fuGlobalIdxFeeB = 0;
118
120 std::vector<std::vector<UInt_t>> fvuFeeChanNbHitsLastMs;
121 std::vector<std::vector<Double_t>> fvdFeeChanMsLastPulserHit;
122
124 std::vector<std::vector<TH1*>> fvhTimeDiffPulserFeeA;
129
130 std::vector<std::vector<TH1*>> fvhTimeDiffPulserFeeB;
135
136 std::vector<std::vector<TH1*>> fvhTimeDiffPulserFeeFee;
141
144
147
149
151 TCanvas* fcPulserFeeA;
152 TCanvas* fcPulserFeeB;
154 TCanvas* fcPulseProp;
155
158
159 ClassDef(CbmTofUnpackMonitorTestFee, 1)
160};
161
162#endif
static double dTsStartTime
bool Bool_t
TH2 * fhTimeMeanPulserFeeFee
[ Ch FEE A ][ Ch FEE B ]
CbmTofUnpackMonitorTestFee operator=(const CbmTofUnpackMonitorTestFee &)
virtual Bool_t Init(CbmMcbm2018TofPar *digiParSet)
Init all required parameter informations and histograms.
std::vector< std::vector< UInt_t > > fvuFeeChanNbHitsLastMs
Buffer for pulser channels.
void SetFitZoomWidthPs(Double_t inZoomWidth=1000.0)
virtual void FillEpochMonitoringHistos(const uint32_t &, const uint32_t &, const bool &, const bool &, const bool &, const bool &)
Original "general histograms" filling, unused here.
virtual void FillSysMonitoringHistos(const uint32_t &, const uint32_t &, const uint32_t &)
std::vector< std::vector< TH1 * > > fvhTimeDiffPulserFeeB
std::vector< TH2 * > fvhPulserCountEvoPerFeeComp
virtual void Finish()
Write all histograms and canvases to file.
const uint32_t kuNbGbtxPerComp
FIXME: recheck if OK and if not conflicting with fuNbOfFeePerComp!
uint32_t fuNbOfFeePerComp
FIXME: recheck if OK and if not conflicting with fuNbOfFeePerComp!
uint32_t fuNbOfGet4PerFee
Max number of FEE per component.
void UpdateZoomedFit(std::vector< std::vector< TH1 * > > phTimeDiff, TH2 *phTimeRmsZoom, TH2 *phTimeResFit)
double_t fdFitZoomWidthPs
Settings and tracers.
virtual void FinalizeMsHistos()
Finalize pulser histograms.
virtual void FinalizeTsHistos(double_t dTsStartTime)
Finalize pulser histograms.
void SelectTestFees(UInt_t uCompA, UInt_t uGbtxA, UInt_t uFeeA, UInt_t uCompB, UInt_t uGbtxB, UInt_t uFeeB)
virtual void FillScmMonitoringHistos(const uint32_t &, const uint32_t &, const uint32_t &, const uint32_t &, const uint32_t &)
virtual void FillHitMonitoringHistos(const double_t &dMsTime, const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const uint32_t &uRawCh, const uint32_t &uRemapCh, const uint32_t &uTot, const double_t &dHitTime, const uint32_t &uFts, bool bDiamond=false)
Fill pulser histograms.
static const UInt_t kuNbTestFee
Constants.
uint32_t fuCompA
Number of channels in each FEE.
CbmTofUnpackMonitorTestFee(const CbmTofUnpackMonitorTestFee &)
uint32_t fuNbOfChannelsPerFee
Max number of Get4 per FEE (has to match nb FEE and GET4 per comp)
std::vector< std::vector< TH1 * > > fvhTimeDiffPulserFeeA
[ fuFeeNr ][ ChanNr ]
virtual void FillErrMonitoringHistos(const uint32_t &, const uint32_t &, const uint32_t &, const uint32_t &)
std::vector< std::vector< TH1 * > > fvhTimeDiffPulserFeeFee
std::vector< std::vector< Double_t > > fvdFeeChanMsLastPulserHit
[ fuFeeNr ][ ChanNr ]