9#include "MicrosliceDescriptor.hpp"
12#include <FairRunOnline.h>
15#include <RtypesCore.h>
20#include <THttpServer.h>
22#include <TPaveStats.h>
46 if (iter->first !=
nullptr) {
52 if (iter->first !=
nullptr) {
61 uint32_t uNbCh = vChanMapIn.size();
62 if (8 != uNbCh && 16 != uNbCh) {
63 LOG(fatal) <<
"Wrong number of channels in call to CbmTofUnpackMonitor::SetBmonChannelMap, "
64 <<
"only 8 and 16 supported, input here was " << uNbCh;
66 for (UInt_t uChan = 0; uChan < uNbCh; ++uChan) {
74 std::string sSystem =
"tof";
82 "Nb of message for each type per GET4; GET4 chip # ; Type",
93 "Epoch flags per GET4; GET4 chip # ; Type",
101 fhGet4ScmType =
new TH2I(Form(
"%sGet4ScmType", sSystem.data()),
102 "SC messages per GET4 channel; GET4 channel # ; SC type",
112 "Nb of system message for each type per Get4; Get4; System Type",
121 "Error messages per GET4 channel; GET4 channel # ; Error",
147 std::string sFolder =
"Get4InSys";
154 for (UInt_t uComp = 0; uComp <
fuNbOfComps; ++uComp) {
155 UInt_t uCompIndex = uComp;
157 std::string sFolderComp = Form(
"c%02u", uCompIndex);
161 new TH2I(Form(
"%sCompGet4MessType_c%02u", sSystem.data(), uComp),
162 Form(
"Nb of message for each type per GET4 in Comp %02u; GET4 chip # ; Type", uCompIndex),
171 new TH2I(Form(
"%sCompGet4ChanScm_c%02u", sSystem.data(), uComp),
172 Form(
"SC messages per GET4 channel in Comp %02u; GET4 channel # ; SC type", uCompIndex),
182 new TH2I(Form(
"%sCompGet4ChanErrors_c%02u", sSystem.data(), uComp),
183 Form(
"Error messages per GET4 channel in Comp %02u; GET4 channel # ; Error", uCompIndex),
211 fvhCompRawChCount.push_back(
new TH1I(Form(
"%sCompRawChCount_c%02u", sSystem.data(), uCompIndex),
212 Form(
"Channel counts comp. %02u raw; Channel; Hits",
216 fvhCompRawChRate.push_back(
new TH2D(Form(
"%sCompRawChRate_c%02u", sSystem.data(), uCompIndex),
217 Form(
"Raw channel rate comp. %02u; Time in run [s]; Channel; "
223 fvhCompRawChTot.push_back(
new TH2I(Form(
"%sCompRawChTot_c%02u", sSystem.data(), uCompIndex),
224 Form(
"Raw TOT comp. %02u, raw channel; Channel; TOT [bin]", uCompIndex),
229 fvhCompRemapChCount.push_back(
new TH1I(Form(
"%sCompRemapChCount_c%02u", sSystem.data(), uCompIndex),
230 Form(
"PADI Channel counts comp. %02u, remapped; PADI channel; Hits",
234 fvhCompRemapChRate.push_back(
new TH2D(Form(
"%sCompRemapChRate_c%02u", sSystem.data(), uCompIndex),
235 Form(
"PADI channel rate comp. %02u, remapped; Time in run [s]; PADI channel; "
241 fvhCompRemapChTot.push_back(
new TH2I(Form(
"%sCompRemapChTot_c%02u", sSystem.data(), uCompIndex),
242 Form(
"Raw TOT comp. %02u, remapped; PADI channel; TOT [bin]", uCompIndex),
269 std::string sSystem =
"tof";
277 new TCanvas(Form(
"c%sSummaryGet4s", sSystem.data()), Form(
"GET4s message stats, %s", sSystem.data()));
310 std::string sFolder =
"canvases";
314 for (UInt_t uComp = 0; uComp <
fuNbOfComps; ++uComp) {
316 fvcSumComp.push_back(
new TCanvas(Form(
"c%sSumComp%02u", sSystem.data(), uComp),
317 Form(
"Component %2u summary, %s", uComp, sSystem.data())));
384 TString sMsSizeName = Form(
"MsSize_c%02u", component);
385 TString sMsSizeTitle = Form(
"Size of MS for component %02u; Ms Size [bytes]", component);
386 fvhMsSize[component] =
new TH1F(sMsSizeName.Data(), sMsSizeTitle.Data(), 30000, 0., 30000.);
387 fvhMsSize[component]->SetCanExtend(TH2::kAllAxes);
391 TString sMsSizeName = Form(
"MsSizeTime_c%02u", component);
392 TString sMsSizeTitle = Form(
"Size of MS vs time for component %02u; Time[s] ; Ms Size [bytes]", component);
393 fvhMsSizeTime[component] =
new TProfile(sMsSizeName.Data(), sMsSizeTitle.Data(), 15000, 0., 300.);
418 for (UInt_t uComp = 0; uComp <
fuNbOfComps; ++uComp) {
454 uint32_t iNbBinsLog = 0;
457 double* dBinsLog = dBinsLogVector.data();
462 fhBmonCompMapAll =
new TH1I(
"hBmonCompMapAll",
"Map of hits on Bmon detector; Comp.; Hits Count []",
464 fhBmonCompGet4 =
new TH2I(
"hBmonCompGet4",
"Map of hits on Bmon detector; Comp.; GET4; Counts []",
467 fhBmonGet4Map =
new TH1I(
"hBmonGet4Map",
"Map of hits on Bmon detector; GET4; Hits Count []",
470 "Map of hits on Bmon detector vs time in run; GET4; "
471 "Time in run [s]; Hits Count []",
474 fhBmonChannelMapAll =
new TH1I(
"hChannelMapAll",
"Map of hits on Bmon detector; Strip; Hits Count []",
476 fhBmonChannelTotAll =
new TH2I(
"hChannelTotAll",
"Tot of hits on Bmon detector per channel; Strip; Tot; Hits Count []",
479 "Map of hits on Bmon detector vs time in run; Chan; "
480 "Time in run [s]; Hits Count []",
484 "Evolution of TOT in Bmon detector vs time in run; Time "
485 "in run [s]; TOT [ bin ]; Hits Count []",
487 fhBmonChanHitMapAll =
new TH1D(
"fhBmonChanHitMapAll",
"Map of hits on Bmon detector; Strip; Hits Count []",
490 "Map of hits on Bmon detector vs time in run; "
491 "Strip; Time in run [s]; Hits Count []",
495 fhBmonCompMap =
new TH1I(
"hBmonCompMap",
"Map of hits on Bmon detector; Comp.; Hits Count []",
497 fhBmonChannelMap =
new TH1I(
"hChannelMap",
"Map of hits on Bmon detector; Strip; Hits Count []",
500 "Map of hits on Bmon detector vs time in run; Chan; "
501 "Time in run [s]; Hits Count []",
504 "Evolution of TOT in Bmon detector vs time in run; Time "
505 "in run [s]; TOT [ bin ]; Hits Count []",
507 fhBmonChanHitMap =
new TH1D(
"fhBmonChanHitMap",
"Map of hits on Bmon detector; Strip; Hits Count []",
510 "Map of hits on Bmon detector vs time in run; "
511 "Strip; Time in run [s]; Hits Count []",
515 new TH1I(Form(
"hBmonCompMapSpill%02u", uSpill),
516 Form(
"Map of hits on Bmon detector in current spill %02u; Comp.; Hits Count []", uSpill),
519 Form(
"Map of hits on Bmon detector in current spill %02u; Strip; "
524 fhBmonHitsPerSpill =
new TH1I(
"hBmonHitsPerSpill",
"Hit count per spill; Spill; Hits Count []", 2000, 0., 2000);
527 "Evolution of Hit & error msgs counts vs time in run; "
528 "Time in run [s]; Msgs Count []",
531 "Evolution of Hit counts vs time in run; Time in run [s]; Hits Count []",
534 "Evolution of Error counts vs time in run; Time in run [s]; Error Count []",
537 "Evolution of LostEvent counts vs time in run; "
538 "Time in run [s]; LostEvent Count []",
542 "Evolution of Error Fraction vs time in run; "
543 "Time in run [s]; Error Fract []",
546 "Evolution of LostEvent Fraction vs time in "
547 "run; Time in run [s]; LostEvent Fract []",
551 "Evolution of Hit & error msgs counts, per MS vs time in run; "
552 "Time in run [s]; Hits Count/MS []; MS",
555 "Evolution of Hit counts, per MS vs time in run; "
556 "Time in run [s]; Hits Count/MS []; MS",
559 "Evolution of Error counts, per MS vs time in "
560 "run; Time in run [s]; Error Count/MS []; MS",
563 "Evolution of LostEvent, per MS counts vs time in run; Time in "
564 "run [s]; LostEvent Count/MS []; MS",
568 "Evolution of Error Fraction, per MS vs time in run; Time in run "
569 "[s]; Error Fract/MS []; MS",
572 "Evolution of LostEvent Fraction, per MS vs time in run; Time in "
573 "run [s]; LostEvent Fract/MS []; MS",
576 fhBmonChannelMapPulser =
new TH1I(
"fhBmonChannelMapPulser",
"Map of pulser hits on Bmon detector; Chan; Hits Count []",
579 "Map of hits on Bmon detector vs time in run; "
580 "Chan; Time in run [s]; Hits Count []",
585 std::string sFolder =
"All";
597 sFolder =
"NoPulser";
611 sFolder =
"GlobRates";
620 sFolder =
"GlobRatesMs";
633 sFolder =
"RatePerChan";
637 Form(
"Evolution of Messages counts vs time in run for channel "
638 "%02u; Time in run [s]; Messages Count []",
642 Form(
"Evolution of Hit counts per MS vs time in run for channel "
643 "%02u; Time in run [s]; Hits Count/MS []; MS",
648 Form(
"Evolution of Hit counts vs time in run for channel %02u; "
649 "Time in run [s]; Hits Count []",
653 Form(
"Evolution of Hit counts per MS vs time in run for channel "
654 "%02u; Time in run [s]; Hits Count/MS []; MS",
659 Form(
"Evolution of Error counts vs time in run for channel "
660 "%02u; Time in run [s]; Error Count []",
664 Form(
"Evolution of Error counts per MS vs time in run for "
665 "channel %02u; Time in run [s]; Error Count/MS []; MS",
670 Form(
"Evolution of LostEvent counts vs time in run for channel "
671 "%02u; Time in run [s]; LostEvent Count []",
675 Form(
"Evolution of LostEvent counts per MS vs time in run for "
676 "channel %02u; Time in run [s]; LostEvent Count/MS []; MS",
681 Form(
"Evolution of Error Fraction vs time in run for "
682 "channel %02u; Time in run [s]; Error Fract []",
686 Form(
"Evolution of Error Fraction, per MS vs time in run for "
687 "channel %02u; Time in run [s]; Error Fract/MS []; MS",
692 Form(
"Evolution of LostEvent Fraction vs time in run for "
693 "channel %02u; Time in run [s]; LostEvent Fract []",
697 new TH2I(Form(
"hBmonEvtLostFractPerMsEvoChan%02u", uChan),
698 Form(
"Evolution of LostEvent Fraction, per MS vs time in run for channel "
699 "%02u; Time in run [s]; LostEvent Fract/MS []; MS",
785 if (kTRUE == bResetTime) {
798 std::string sFolder =
"canvases";
802 fcBmonSummary =
new TCanvas(
"cBmonSummary",
"Hit maps, Hit rate, Error fraction");
834 fcBmonSummaryMap =
new TCanvas(
"cBmonSummaryMap",
"Hit maps, Hit rate, Error fraction");
887 new TCanvas(
"cBmonGenCntsPerMs",
"Messages and hit cnt per MS, Error and Evt Loss Fract. per MS ");
923 fcBmonSpillCounts =
new TCanvas(
"cBmonSpillCounts",
"Counts per spill, last 5 spills including current one");
947 fcBmonSpillCountsHori =
new TCanvas(
"cBmonSpillCountsHori",
"Counts per spill, last 5 spills including current one");
971 new TCanvas(
"cBmonSpillCompCountsHori",
"Counts in Comp. per spill, last 5 spills including current one");
998 uint32_t uNbBinsLog = 0;
1001 double* dBinsLog = dBinsLogVector.data();
1003 uint32_t uNbBinsLogFract = 0;
1004 std::vector<double> dBinsLogVectorFract =
GenerateLogBinArray(6, 9, 10, uNbBinsLogFract, -6,
true);
1005 double* dBinsLogFract = dBinsLogVectorFract.data();
1020 "Nb 10 us bins with hit count per TS; TS []; Hits nb. []; 10 us bins []",
1022 uNbBinsLog, dBinsLog);
1024 "Nb 10 us bins with error count per TS; TS []; Errors nb. []; 10 us bins []",
1026 uNbBinsLog, dBinsLog);
1029 "Mean nb hits per 10 us per TS; TS []; Hits nb. []",
1032 "Mean nb error per 10 us per TS; TS []; Errors nb. []",
1037 "Median nb hits per 10 us per TS; TS []; Hits nb. []",
1040 "Median nb error per 10 us per TS; TS []; Errors nb. []",
1044 "Nb 10us bins with hit ratio to mean per TS; TS []; Ratio; 10 us bins []",
1048 "Nb 10us bins with error ratio to mean per TS; TS []; Ratio; 10 us bins []",
1053 "Nb 10 us bins with hit fract. per TS; TS []; Fraction; 10 us bins []",
1055 uNbBinsLogFract, dBinsLogFract);
1057 "Nb 10 us bins with error count per TS; TS []; Fraction; 10 us bins []",
1059 uNbBinsLogFract, dBinsLogFract);
1063 std::string sFolder =
"Microspills";
1103 std::string sFolder =
"canvases";
1138 new TCanvas(
"BmonMicrospillsFraction",
"Nb 10 us bins with fraction of hit/err counts per TS/Total count per TS");
1161 new TCanvas(
"BmonMicrospillsRatios",
"Nb 10 us bins with ratio of hit/err counts per mean count per TS/bin");
1184 std::string sFolder =
"Q-Factors";
1186 uint32_t uMinNbBins = 10;
1187 uint32_t uMaxNbBins = 300000;
1210 if (uMinNbBins <= vuNbBinsHisto[uHistSz][uBinSz] ) {
1213 Form(
"Counts per %5.0f ns bin in cycle of range %9.0f ns, Bmon; Time in Cycle [ns]; Digis []",
1220 Form(
"Q Factor, %5.0f ns bin, %9.0f ns range, Bmon; Time in Run [TS]; Q Factor []",
1226 Form(
"Mean, %5.0f ns bin, %9.0f ns range, Bmon; Time in Run [TS]; Mean []",
fvdQfactorBinSizesNs[uBinSz],
1240 sFolder =
"BinCounts";
1245 10000, -0.5, 9999.5);
1250 Form(
"Counts per %5.0f ns bin Bmon; Time in Run [TS];Digis []; Bins []",
fvdQfactorBinSizesNs[uBinSz]),
1266 std::string sFolder =
"canvases";
1271 fcBmonQFactorVal =
new TCanvas(
"cBmonQFactorVal",
"Q-Factor values for various bins sizes and integration time");
1274 fcBmonQFactorMean =
new TCanvas(
"cBmonQFactorMean",
"Mean bin counts for various bins sizes and integration time");
1277 uint32_t uPadIdx = 1;
1324 const uint32_t& uGet4Id,
const uint32_t& uRawCh,
1325 const uint32_t& uRemapCh,
const uint32_t& uTot)
1348 const bool& bSyncFlag,
1349 const bool& bDataLoss,
1350 const bool& bEpochLoss,
1351 const bool& bMissmMatch
1367 const uint32_t& uCh,
1368 const uint32_t& uEdge,
1369 const uint32_t& uType
1392 const uint32_t& uType
1402 const uint32_t& uCh,
1403 const uint32_t& uType
1566 const uint32_t& uGet4Id,
const uint32_t& uTot)
1576 UInt_t uChannelBmon = (uGet4Id / 8) + 4 * uCurrCompIdx;
1630 const uint32_t& uGet4Id,
const bool& bErrEvtLost)
1650 UInt_t uChannelBmon = (uGet4Id / 8) + 4 * uCurrCompIdx;
1737 return (pHistoIn->GetBinContent(pHistoIn->GetMaximumBin())) / mean;
1746 if (pHistoIn->Integral() && 1 < pHistoIn->GetEntries()) {
1747 return (pHistoIn->Integral() / pHistoIn->GetNbinsX());
1776 double_t dTsFractional =
1784 for (uint32_t uBin = 1; uBin <=
fvhBmonQfactHisto[uHistSz][uBinSz]->GetNbinsX(); ++uBin) {
1790 if (0.0 < dQFactor) {
1812 if (vDigis && 0 < vDigis->size()) {
1813 for (
auto it = vDigis->begin(); it != vDigis->end(); ++it) {
1815 if ((0 != (*it).GetChannel() % 4) || ((*it).GetCharge() <
fuMinTotPulser)
1833 for (uint32_t uBin = 1; uBin <=
fvhBmonQfactHisto[uHistSz][uBinSz]->GetNbinsX(); ++uBin) {
1839 if (0.0 < dQFactor) {
1865 TFile* oldFile = gFile;
1866 TDirectory* oldDir = gDirectory;
1901 gDirectory = oldDir;
1904 std::vector<std::pair<TNamed*, std::string>> vHistos =
GetHistoVector();
1907 std::vector<std::pair<TCanvas*, std::string>> vCanvases =
GetCanvasVector();
1910 std::string sSystem =
"tof";
1917 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
1918 if (
nullptr != server) {
1919 for (UInt_t uCanvas = 0; uCanvas < vCanvases.size(); ++uCanvas) {
1920 server->Register(Form(
"/%s/%s", sSystem.data(), vCanvases[uCanvas].second.data()), vCanvases[uCanvas].first);
1922 for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) {
1923 server->Register(Form(
"/%s/%s", sSystem.data(), vHistos[uHisto].second.data()), vHistos[uHisto].first);
1939 std::vector<std::pair<TNamed*, std::string>> vHistos =
GetHistoVector();
1942 std::vector<std::pair<TCanvas*, std::string>> vCanvases =
GetCanvasVector();
1945 TFile* oldFile = gFile;
1946 TDirectory* oldDir = gDirectory;
1947 TFile* histoFile =
nullptr;
1954 for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) {
1956 TString sFolder = vHistos[uHisto].second.data();
1957 if (
nullptr == gDirectory->Get(sFolder)) gDirectory->mkdir(sFolder);
1958 gDirectory->cd(sFolder);
1961 vHistos[uHisto].first->Write();
1967 for (UInt_t uCanvas = 0; uCanvas < vCanvases.size(); ++uCanvas) {
1969 TString sFolder = vCanvases[uCanvas].second.data();
1970 if (
nullptr == gDirectory->Get(sFolder)) gDirectory->mkdir(sFolder);
1971 gDirectory->cd(sFolder);
1974 vCanvases[uCanvas].first->Write();
1981 gDirectory = oldDir;
1988 if (iter->first !=
nullptr) {
1994 if (iter->first !=
nullptr) {
ClassImp(CbmConverterManager)
Int_t GetNrOfGdpbs()
FIXME: replace with method returning the correspondign constants! see Star2019 parameter.
Bool_t fbSpillOn
Spill detection.
Bool_t CreateHistogramsMicroSpills()
TH1 * fhBmonMicrospillsTsMeanErrs
TH2 * fhBmonMicrospillsTsBinCntErrs
TCanvas * fcBmonSpillCounts
TCanvas * fcBmonQFactorMean
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
void FinalizeTsBmonQfactorHistos(uint64_t uTsTimeNs, std::vector< CbmBmonDigi > *vDigis)
Finalize Microspill histograms.
std::vector< TH1 * > fvhBmonEvtLostCntEvoChan
Bool_t ResetMsComponentSizeHistos(UInt_t component)
static const UInt_t kuNbChanBmon
Double_t fdBmonLastInterTime
Bool_t ResetHistogramsQFactors(Bool_t bResetTime)
TH2 * fhBmonChanHitMapEvo
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< double_t > fvdQfactorHistMax
Dimension: same as BinSizes vector!!
std::vector< TH1 * > fvhBmonHitCntEvoChan
std::vector< TH1 * > fvhCompRemapChCount
---> Per remapped (PADI) channel in Component
std::vector< uint32_t > fvuQfactorIdxHistoCycleinTS
void FillSysMonitoringHistos(const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const uint32_t &uType)
std::vector< double_t > fvdQfactorIntegrationNs
Hint: keep fractions of TS size + multiples of bin size and above 10 us.
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.
Bool_t CreateHistogramsQFactors(Bool_t bBmon=kTRUE)
std::vector< std::vector< TH1 * > > fvhBmonQfactHisto
TCanvas * fcBmonQFactorBinCntDist
void AddCanvasToVector(TCanvas *pointer, std::string sFolder="")
Bool_t ResetHistogramsMicroSpills(Bool_t bResetTime)
static constexpr UInt_t kuBmonChanMapScvd[kuNbChanBmonScvd]
2024 mapping: +4 channels scvd added
void DrawCanvasesMicroSpills()
TCanvas * fcBmonQFactorVal
---> BMon Q-Factors monitoring
std::vector< TH2 * > fvhBmonQfactBinCountDistributionEvo
std::vector< std::pair< TNamed *, std::string > > GetHistoVector()
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)
std::vector< uint32_t > fvuNbHistoCyclesPerTS
TH1 * fhBmonMicrospillsTsMeanHits
TH2 * fhBmonErrorFractPerMsEvo
TH2 * fhBmonErrorCntPerMsEvo
std::vector< TH2 * > fvhCompGet4MessType
---> Per GET4 in Component
void FillErrMonitoringHistos(const uint32_t &uCurrCompIdx, const uint32_t &uGet4Id, const uint32_t &uCh, const uint32_t &uType)
TH1 * fhBmonCompMapAll
---> Channels maps without cuts
std::vector< TH1 * > fvhBmonMsgCntEvoChan
std::vector< TH2 * > fvhBmonErrorCntPerMsEvoChan
TProfile * fhBmonLostEvtFractEvo
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
std::vector< double_t > fvdQfactorBinSizesNs
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
std::vector< TH2 * > fvhBmonErrorFractPerMsEvoChan
double_t ExtractQFactor(TH1 *pHistoIn)
Q-Factor helper methods.
std::vector< TCanvas * > fvcSumComp
std::vector< TH2 * > fvhBmonMsgCntPerMsEvoChan
TH1 * fhBmonMicrospillsDistErrs
std::vector< TH2 * > fvhCompRawChRate
UInt_t fuNbOfComps
Readout chain dimensions and mapping.
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
uint32_t fuQFactorMaxNbTs
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
uint16_t fuQfactorNbPlots
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.
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
std::vector< TH1 * > fvhBmonQfactBinCountDistribution
void SetBmonChannelMap(std::vector< uint32_t > vChanMapIn)
std::vector< TH2 * > fvhBmonEvtLostCntPerMsEvoChan
TH2 * fhBmonMicrospillsTsBinRatioHits
TCanvas * fcBmonMicrospillsFraction
static const UInt_t kuMaxNbFlibLinks
---> Constants
std::vector< TH1 * > fvhCompRawChCount
---> Per raw channel in Component
void FillHitBmonQfactorHistos(const double_t &dMsTime, const double_t &dTime)
Fill Microspill histograms.
UInt_t fuCurrentSpillPlot
std::vector< TH2 * > fvhBmonEvtLostFractPerMsEvoChan
std::vector< TProfile * > fvhBmonErrorFractEvoChan
Bool_t Init(CbmMcbm2018TofPar *digiParSet)
Init all required parameter informations and histograms.
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
std::vector< TProfile * > fvhBmonEvtLostFractEvoChan
UInt_t fuOffSpillCountLimit
TCanvas * fcBmonGenCntsPerMs
TH1 * fhBmonChannelMapPulser
---> Pulser
virtual ~CbmTofUnpackMonitor()
void FillHitBmonMicroSpillHistos(const double_t &dMsTime, const double_t &dTime)
Fill BMon Microspill histograms.
void DrawCanvasesQFactors(Bool_t bBmon=kTRUE)
TCanvas * fcBmonSpillCompCountsHori
UInt_t fuNbOfChannelsPerGet4
Max number of Get4 per component.
void Finish()
Write all histograms and canvases to file.
double_t ExtractMean(TH1 *pHistoIn)
UInt_t fuNbOfGet4InSyst
Number of channels per Component, recalculated.
TH2 * fhBmonLostEvtCntPerMsEvo
std::vector< UInt_t > fvuBmonHitCntChanMs
double_t fdBmonMicrospillsTsLengthSec
BMon micro-spills monitoring histograms.
Bool_t CreateBmonHistograms()
std::vector< std::vector< TH1 * > > fvhBmonQfactQval
std::vector< std::vector< TH1 * > > fvhBmonQfactMean
uint32_t fuBmonMicrospillsNbBinsTs
@ GET4_V2X_ERR_UNPAIR_FALL
@ GET4_V2X_ERR_CHAN_STATE
@ GET4_V2X_ERR_ADD_RIS_EDG
@ GET4_V2X_ERR_SEQUENCE_ER
@ GET4_V2X_ERR_TOK_RING_ST
@ GET4_V2X_ERR_TOT_OVERWRT
@ GET4_V2X_ERR_FIFO_WRITE
@ GET4_V2X_ERR_EP_CNT_SYNC
@ GET4_V2X_ERR_EPOCH_OVERF
@ GET4_V2X_ERR_EVT_DISCARD
@ GET4_V2X_ERR_READOUT_ERR