5#ifndef CbmTofUnpackMonitor_H
6#define CbmTofUnpackMonitor_H
13#include "TProfile2D.h"
89 const uint32_t& uRawCh,
const uint32_t& uRemapCh,
const uint32_t& uTot);
91 const bool& bDataLoss,
const bool& bEpochLoss,
const bool& bMissmMatch);
93 const uint32_t& uEdge,
const uint32_t& uType);
96 const uint32_t& uType);
101 const uint32_t& uTot);
104 const bool& bErrEvtLost);
184 static constexpr UInt_t
kuBmonChanMap[
kuNbChanBmon] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
186 static constexpr UInt_t
kuBmonChanMapScvd[
kuNbChanBmonScvd] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
187 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
332 std::vector<std::pair<TNamed*, std::string>>
334 std::vector<std::pair<TCanvas*, std::string>>
Bool_t fbSpillOn
Spill detection.
Bool_t CreateHistogramsMicroSpills()
TH1 * fhBmonMicrospillsTsMeanErrs
TH2 * fhBmonMicrospillsTsBinCntErrs
TCanvas * fcBmonSpillCounts
void SetHistosStartTime(double_t value)
Set start time for evolution histos.
std::vector< TH1 * > fvhBmonChannelMapSpill
TH1 * fvhMsSize[kuMaxNbFlibLinks]
MS size histograms.
void CheckBmonSpillLimits(const double_t &dMsTime)
Fill BMon histograms.
std::vector< TH1 * > fvhBmonCompMapSpill
---> No Pulser cut + Spill detection
std::vector< std::pair< TNamed *, std::string > > fvpAllHistoPointers
TProfile * fvhMsSizeTime[kuMaxNbFlibLinks]
std::vector< TH1 * > fvhBmonErrorCntEvoChan
std::vector< TH1 * > fvhBmonEvtLostCntEvoChan
Bool_t ResetMsComponentSizeHistos(UInt_t component)
static const UInt_t kuNbChanBmon
Double_t fdBmonLastInterTime
TH2 * fhBmonChanHitMapEvo
void SetBmonMicroSpillMode(bool value)
Activate the BMon mode.
CbmMcbm2018TofPar * fUnpackPar
Settings from parameter file.
void AddHistoToVector(TNamed *pointer, std::string sFolder="")
static const UInt_t kuNbChanBmonScvd
std::vector< std::pair< TCanvas *, std::string > > GetCanvasVector()
TCanvas * fcBmonMicrospillsRatios
static constexpr UInt_t kuBmonChanMap[kuNbChanBmon]
std::vector< TH1 * > fvhBmonHitCntEvoChan
std::vector< TH1 * > fvhCompRemapChCount
---> Per remapped (PADI) channel in Component
UInt_t GetMaxNbFlibLinks()
void FillSysMonitoringHistos(const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const uint32_t &uType)
UInt_t fuHistoryHistoSize
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)
Fill general histograms.
void AddCanvasToVector(TCanvas *pointer, std::string sFolder="")
Bool_t ResetHistogramsMicroSpills(Bool_t bResetTime)
bool GetBmonMicroSpillMode()
Read the Bmon mode.
static constexpr UInt_t kuBmonChanMapScvd[kuNbChanBmonScvd]
2024 mapping: +4 channels scvd added
void SetBmonMode(bool value)
Activate the BMon mode.
void DrawCanvasesMicroSpills()
UInt_t fuLongHistoBinSizeSec
std::vector< std::pair< TNamed *, std::string > > GetHistoVector()
static const UInt_t kuBytesPerMessage
TH2 * fhBmonChanHitMapEvoAll
TCanvas * fcBmonSpillCountsHori
UInt_t fuBmonNonPulserCountsLastInter
TH2 * fhBmonMicrospillsTsBinFractHits
void FillEpochMonitoringHistos(const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const bool &bSyncFlag, const bool &bDataLoss, const bool &bEpochLoss, const bool &bMissmMatch)
Double_t fdStartTimeSpill
void FillScmMonitoringHistos(const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const uint32_t &uCh, const uint32_t &uEdge, const uint32_t &uType)
TH1 * fhBmonMicrospillsTsMeanHits
TH2 * fhBmonErrorFractPerMsEvo
TH2 * fhBmonErrorCntPerMsEvo
std::vector< TH2 * > fvhCompGet4MessType
---> Per GET4 in Component
bool GetBmonScvdMode()
Read the BMon mode.
void FillErrMonitoringHistos(const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const uint32_t &uCh, const uint32_t &uType)
bool GetInternalHttpMode()
Read the Bmon mode.
TH1 * fhBmonCompMapAll
---> Channels maps without cuts
std::vector< TH1 * > fvhBmonMsgCntEvoChan
void FillMsSizeTime(UInt_t uMsComp, Double_t dTime, UInt_t uSize)
void SetSpillCheckInterval(Double_t dIntervalSec)
std::vector< TH2 * > fvhBmonErrorCntPerMsEvoChan
TProfile * fhBmonLostEvtFractEvo
void SetLongDurationLimits(UInt_t uDurationSeconds, UInt_t uBinSize)
UInt_t fuOffSpillCountLimitNonPulser
TH1 * fhBmonChannelMapAll
Bool_t CreateMsComponentSizeHistos(UInt_t component)
void FillHitBmonMonitoringHistos(const double_t &dMsTime, const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const uint32_t &uTot)
TCanvas * fcBmonSummaryMap
std::vector< UInt_t > fuBmonChanMap
UInt_t fuBmonCountsLastInter
std::unique_ptr< double[]> fArrErrCounts
uint32_t fuNbTsMicrospills
void FinalizeTsBmonMicroSpillHistos()
Finalize BMon Microspill histograms.
TH1 * fhBmonMicrospillsTsMedianHits
Double_t fdStartTime
Total/maximum number of Get4 in system.
Bool_t ResetBmonHistograms(Bool_t bResetTime)
TH2 * fhBmonChannelTotAll
TProfile * fhBmonErrorFractEvo
std::vector< UInt_t > fvuBmonErrorCntChanMs
void FillHitBmonMicroSpillHistos(const double_t &dTime)
Fill BMon Microspill histograms.
std::vector< TH2 * > fvhBmonErrorFractPerMsEvoChan
std::vector< TCanvas * > fvcSumComp
std::vector< TH2 * > fvhBmonMsgCntPerMsEvoChan
TH1 * fhBmonMicrospillsDistErrs
std::vector< TH2 * > fvhCompRawChRate
UInt_t fuNbOfComps
Readout chain dimensions and mapping.
double_t GetHistosStartTime()
Set start time for evolution histos.
TH1 * fhBmonMicrospillsTsMedianErrs
std::vector< TH2 * > fvhCompRawChTot
TH1 * fhBmonCompMap
---> No Pulser cut
std::vector< UInt_t > fvuBmonEvtLostCntChanMs
TH1 * fhBmonChanHitMapAll
TCanvas * fcBmonMicrospillsBinCnts
---> BMon Microspills monitoring
Double_t fdSpillCheckInterval
TH2 * fhBmonMicrospillsTsBinCntHits
std::vector< TH2 * > fvhCompRemapChRate
void FillErrBmonMonitoringHistos(const double_t &dMsTime, const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const bool &bErrEvtLost)
std::vector< TH2 * > fvhCompGet4ChErrors
TH2 * fhBmonHitCntPerMsEvo
TH2 * fhBmonLostEvtFractPerMsEvo
UInt_t fuNbChanBmon
Runtime values.
static const UInt_t kuNbSpillPlots
std::unique_ptr< double[]> fArrHitCounts
std::vector< TH2 * > fvhCompGet4ChScm
TH1 * fhBmonMicrospillsDistHits
Bool_t CreateHistograms()
UInt_t fuNbOfGet4PerComp
Total number of Components in the system.
void SetSpillThresholdNonPulser(UInt_t uCntLimit)
std::vector< TH2 * > fvhCompRemapChTot
TH2 * fhBmonMicrospillsTsBinRatioErrs
TCanvas * fcBmonSummary
---> BMon
TH1 * fhBmonMsgCntEvo
---> Global Rate
bool fBmonMode
Flag if debug mode is active or not.
TH1 * fhBmonLostEvtCntEvo
void SetBmonChannelMap(std::vector< uint32_t > vChanMapIn)
std::vector< TH2 * > fvhBmonEvtLostCntPerMsEvoChan
TH2 * fhBmonMicrospillsTsBinRatioHits
TCanvas * fcBmonMicrospillsFraction
static const UInt_t kuMaxNbFlibLinks
---> Constants
double_t dFirstTsStartTime
void FillMsSize(UInt_t uMsComp, UInt_t uSize)
Fill Ms Component Size Histos.
std::vector< TH1 * > fvhCompRawChCount
---> Per raw channel in Component
UInt_t fuCurrentSpillPlot
std::vector< TH2 * > fvhBmonEvtLostFractPerMsEvoChan
void SetHistoFileName(TString nameIn)
CbmTofUnpackMonitor operator=(const CbmTofUnpackMonitor &)
std::vector< TProfile * > fvhBmonErrorFractEvoChan
Bool_t Init(CbmMcbm2018TofPar *digiParSet)
Init all required parameter informations and histograms.
void SetSpillThreshold(UInt_t uCntLimit)
std::vector< std::pair< TCanvas *, std::string > > fvpAllCanvasPointers
Vector of pointers to histograms + optional folder name.
UInt_t fuMinTotPulser
---> User settings: Data correction parameters
std::vector< TH2 * > fvhBmonHitCntPerMsEvoChan
TH2 * fhBmonHitMapEvoPulser
TH2 * fhBmonMsgCntPerMsEvo
---> Global Rate per MS
UInt_t fuNbOfChannelsPerComp
Number of channels per Get4, constant.
TH2 * fhBmonMicrospillsTsBinFractErrs
void SetBmonScvdMode(bool value)
Activate the BMon sCVD mode.
void SetPulserTotLimits(UInt_t uMin, UInt_t uMax)
std::vector< TProfile * > fvhBmonEvtLostFractEvoChan
UInt_t fuOffSpillCountLimit
TCanvas * fcBmonGenCntsPerMs
TH1 * fhBmonChannelMapPulser
---> Pulser
bool GetBmonMode()
Read the BMon mode.
UInt_t fuLongHistoNbSeconds
virtual ~CbmTofUnpackMonitor()
TCanvas * fcBmonSpillCompCountsHori
UInt_t fuNbOfChannelsPerGet4
Max number of Get4 per component.
void Finish()
Write all histograms and canvases to file.
UInt_t fuNbOfGet4InSyst
Number of channels per Component, recalculated.
TH2 * fhBmonLostEvtCntPerMsEvo
void SetInternalHttpMode(bool value)
Activate/de-activate the internal histo serve mode.
std::vector< UInt_t > fvuBmonHitCntChanMs
double_t fdBmonMicrospillsTsLengthSec
BMon micro-spills monitoring histograms.
Bool_t CreateBmonHistograms()
CbmTofUnpackMonitor(const CbmTofUnpackMonitor &)
Vector of pointers to canvases + optional folder name.
TH1 * fhPulserChCounts
---> Pulser
uint32_t fuBmonMicrospillsNbBinsTs