15#include "FairRootManager.h"
17#include "FairRunOnline.h"
18#include "FairRuntimeDb.h"
22#include "TClonesArray.h"
23#include "THttpServer.h"
49 , fvbMaskedComponents()
51 , fsHistoFilename(
"data/HistosMonitorMuch.root")
52 , fbPrintMessages(kFALSE)
53 , fPrintMessCtrl(
stsxyter::MessagePrintMask::msg_print_Human)
62 , fUnpackParMuch(NULL)
63 , fuCurrentEquipmentId(0)
66 , fiRunStartDateTimeSec(-1)
67 , fiBinSizeDatePlots(-1)
69 , fvuCurrentTsMsbCycle()
70 , fvuInitialHeaderDone()
71 , fvuInitialTsMsbCycleHeader()
73 , fvulChanLastHitTime()
74 , fvdChanLastHitTime()
77 , fvdChanLastHitTimeInMs()
78 , fvusChanLastHitAdcInMs()
81 , fiTimeIntervalRateUpdate(10)
82 , fviFebTimeSecLastRateUpdate()
83 , fviFebCountsSinceLastRateUpdate()
84 , fvdFebChanCountsSinceLastRateUpdate()
88 , fhMuchMessType(NULL)
89 , fhMuchSysMessType(NULL)
90 , fhMuchFebChanAdcRaw_combined(NULL)
91 , fhMuchMessTypePerDpb(NULL)
92 , fhMuchSysMessTypePerDpb(NULL)
93 , fhStatusMessType(NULL)
94 , fhMsStatusFieldType(NULL)
95 , fhMuchHitsElinkPerDpb(NULL)
100 , fhMuchFebChanCntRaw()
101 , fhMuchFebChanAdcRaw()
102 , fhMuchFebChanAdcRawProf()
103 , fhMuchFebChanRawTs()
104 , fhMuchFebChanHitRateEvo()
105 , fhMuchFebChanHitRateProf()
106 , fhMuchFebHitRateEvo()
107 , fhMuchFebHitRateEvo_mskch()
108 , fhMuchFebHitRateEvo_mskch_adccut()
109 , fhMuchFebHitRateEvo_WithoutDupli()
110 , fdMuchFebChanLastTimeForDist()
111 , fhMuchFebChanDistT()
112 , fhMuchFebDuplicateHitProf()
114 , fvMsComponentsList()
115 , fuMaxNbMicroslices(100)
116 , fvuChanNbHitsInMs()
117 , fhElinkIdxHit(NULL)
128 LOG(info) <<
"Initializing flib StsXyter unpacker for MUCH";
130 FairRootManager* ioman = FairRootManager::Instance();
131 if (ioman == NULL) { LOG(fatal) <<
"No FairRootManager instance"; }
141 LOG(info) <<
"-------------------------------------";
142 LOG(info) <<
"CbmMcbm2018MonitorAlgoMuchLite statistics are ";
149 LOG(info) <<
"-------------------------------------";
157 LOG(info) <<
"Init parameter containers for CbmMcbm2018MonitorAlgoMuchLite";
172 LOG(info) <<
"ReInit parameter containers for CbmMcbm2018MonitorAlgoMuchLite";
191 LOG(info) <<
"Much parameters could not be initialized";
196 LOG(info) <<
"Nr. of MUCH DPBs: " <<
fuNrOfDpbs;
199 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
201 LOG(info) <<
"Eq. ID for DPB #" << std::setw(2) << uDpb <<
" = 0x" << std::setw(4) << std::hex
206 LOG(info) <<
"Nr. of FEBs: " <<
fuNbFebs;
214 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
225 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
227 LOG(info) << Form(
"DPB #%02u CROB #%02u Active: ", uDpb, uCrobIdx) <<
fvbCrobActiveFlag[uDpb][uCrobIdx];
231 if (
fbBinningFw) LOG(info) <<
"Unpacking data in bin sorter FW mode";
233 LOG(info) <<
"Unpacking data in full time sorter FW mode (legacy)";
236 LOG(info) <<
"Internal status initialization";
242 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
248 LOG(info) <<
"ongoing internal status initialization";
265 for (UInt_t uXyterIdx = 0; uXyterIdx <
fuNbFebs; ++uXyterIdx) {
288 LOG(info) <<
"CbmMcbm2018MonitorAlgoMuchLite::ReInitContainers => Changed "
289 "fvuChanNbHitsInMs size "
291 LOG(info) <<
"CbmMcbm2018MonitorAlgoMuchLite::ReInitContainers => Changed "
292 "fvuChanNbHitsInMs size "
294 LOG(info) <<
"CbmMcbm2018MonitorAlgoMuchLite::ReInitContainers => Changed "
295 "fvuChanNbHitsInMs size "
303 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
369 LOG(error) <<
"CbmMcbm2018MonitorAlgoMuchLite::AddMsComponentToList => "
370 <<
"Ignored the addition of component " << component <<
" as it is above the hadcoded limit of "
373 <<
" To change this behavior check kiMaxNbFlibLinks in "
374 "CbmMcbm2018MonitorAlgoMuchLite.cxx";
381 LOG(info) <<
"CbmMcbm2018MonitorAlgoMuchLite::AddMsComponentToList => Added component: " << component;
384 if (NULL ==
fhMsSz[component]) {
385 TString sMsSzName = Form(
"MsSz_link_%02lu", component);
386 TString sMsSzTitle = Form(
"Size of MS for nDPB of link %02lu; Ms Size [bytes]", component);
387 fhMsSz[component] =
new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 160000, 0., 20000.);
390 sMsSzName = Form(
"MsSzTime_link_%02lu", component);
391 sMsSzTitle = Form(
"Size of MS vs time for gDPB of link %02lu; Time[s] ; Ms Size [bytes]", component);
392 fhMsSzTime[component] =
new TProfile(sMsSzName.Data(), sMsSzTitle.Data(), 15000, 0., 300.);
400 LOG(info) <<
"Added MS size histo for component: " << component <<
" (DPB)";
415 TString sHistName {
""};
418 sHistName =
"hMessageType";
419 title =
"Nb of message for each type; Type";
429 sHistName =
"hSysMessType";
430 title =
"Nb of system message for each type; System Type";
433 sHistName =
"hMuchFebChanAdcRaw_combined";
434 title =
"ADC hist combined";
438 LOG(debug) <<
"Initialized 1st Histo";
439 sHistName =
"hMessageTypePerDpb";
440 title =
"Nb of message of each type for each DPB; DPB; Type";
449 sHistName =
"hMuchMessTypePerElink";
450 title =
"Nb of message of each type for each Elink; Elink; Type";
461 fhElinkIdxHit =
new TH1I(
"ElinkIdxHit",
"Active Elink Ids for Hit Messages", 42, 0, 41);
463 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
465 sHistName = Form(
"HistPadDistr_Module_%01u", uModuleId);
466 title = Form(
"Pad distribution for, Module #%01u; ", uModuleId);
469 fHistPadDistr.push_back(
new TH2I(sHistName, title, 23, -0.5, 22.5, 97, -0.5, 96.5));
471 sHistName = Form(
"RealHistPadDistr_Module_%01u", uModuleId);
472 title = Form(
"Progressive Pad distribution for, Module #%01u; ", uModuleId);
474 fRealHistPadDistr.push_back(
new TH2D(sHistName, title, 500, -0.5, 499.5, 1000, -0.5, 999.5));
478 sHistName = Form(
"hMuchFebDuplicateHitProf_%01u", uModuleId);
479 title = Form(
"FEB wise Duplicate Hit for Module #%01u; FEB []; Hit []", uModuleId);
489 title =
"Rate in kHz";
490 fhRate =
new TH1I(sHistName, title, 10000, -0.5, 9999.5);
492 sHistName =
"hRateAdcCut";
493 title =
"Rate in kHz with Adc cut";
494 fhRateAdcCut =
new TH1I(sHistName, title, 10000, -0.5, 9999.5);
497 sHistName =
"hFEBcount";
498 title =
"Count vs FEB number; FEB Number; Count";
499 fhFEBcount =
new TH1I(sHistName, title, 40, -0.5, 39.5);
502 sHistName =
"hSysMessTypePerDpb";
503 title =
"Nb of system message of each type for each DPB; DPB; System Type";
506 sHistName =
"hStatusMessType";
507 title =
"Nb of status message of each type for each DPB; ASIC; Status Type";
511 sHistName =
"hMsStatusFieldType";
512 title =
"For each flag in the MS header, ON/OFF counts; Flag bit []; ON/OFF; MS []";
516 sHistName =
"hMuchHitsElinkPerDpb";
517 title =
"Nb of hit messages per eLink for each DPB; DPB; eLink; Hits nb []";
521 LOG(debug) <<
"Initialized 2nd Histo";
557 LOG(debug) <<
"Initialized 3rd Histo";
578 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
580 sHistName = Form(
"hMuchFebChanCntRaw_%03u", uFebIdx);
581 title = Form(
"Hits Count per channel, FEB #%03u; Channel; Hits []", uFebIdx);
590 sHistName = Form(
"fhMuchFebSpill_%03u", uFebIdx);
591 title = Form(
"Time distribution of hits, FEB #%03u; Time ; Counts ", uFebIdx);
592 fhMuchFebSpill.push_back(
new TH1I(sHistName, title, 2000, 0, 2000));
595 sHistName = Form(
"hMuchChannelTime_FEB%03u", uFebIdx);
596 title = Form(
"Time vs Channel, FEB #%03u; TIME(s) ; CHANNEL ", uFebIdx);
597 fhMuchChannelTime.push_back(
new TH2I(sHistName, title, 1000, 0, 1000, 129, -0.5, 128.5));
600 sHistName = Form(
"hMuchFebADC_%03u", uFebIdx);
601 title = Form(
"CHANNEL vs ADC, FEB #%03u; CHANNEL ; ADC ", uFebIdx);
602 fhMuchFebADC.push_back(
new TH2I(sHistName, title, 129, -0.5, 128.5, 34, -0.5, 33.5));
606 sHistName = Form(
"hMuchFebChanAdcRaw_%03u", uFebIdx);
607 title = Form(
"Raw Adc distribution per channel, FEB #%03u; Channel []; Adc "
615 sHistName = Form(
"hMuchFebChanAdcRawProfc_%03u", uFebIdx);
616 title = Form(
"Raw Adc prodile per channel, FEB #%03u; Channel []; Adc []", uFebIdx);
634 sHistName = Form(
"hMuchFebChanRawTs_%03u", uFebIdx);
635 title = Form(
"Raw Timestamp distribution per channel, FEB #%03u; Channel "
636 "[]; Ts []; Hits []",
643 sHistName = Form(
"hMuchFebChanRateEvo_%03u", uFebIdx);
644 title = Form(
"Hits per second & channel in FEB #%03u; Time [s]; Channel []; Hits []", uFebIdx);
649 sHistName = Form(
"hMuchFebChanRateProf_%03u", uFebIdx);
650 title = Form(
"Hits per second for each channel in FEB #%03u; Channel []; Hits/s []", uFebIdx);
661 sHistName = Form(
"hMuchFebRateEvo_%03u", uFebIdx);
662 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
667 sHistName = Form(
"hMuchFebRateEvo_mskch_%03u", uFebIdx);
668 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
672 sHistName = Form(
"hMuchFebRateEvo_mskch_adcut_%03u", uFebIdx);
673 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
677 sHistName = Form(
"hMuchFebRateEvo_WithoutDupli_%03u", uFebIdx);
678 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
702 sHistName = Form(
"hMuchFebChanDistT_%03u", uFebIdx);
703 title = Form(
"Time distance between hits on same channel in between FEB "
704 "#%03u; Time difference [ns]; Channel []; ",
713 new TH2I(
"fhDpbMsErrors",
"; DPB []; Error type []; Counts []",
fuNrOfDpbs, 0,
fuNrOfDpbs, 4, -0.5, 3.5);
722 LOG(debug) <<
"Initialized 6th Histo before FairRunOnlne Instance";
725 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
756 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
780 LOG(debug) <<
"Initialized fhMuchFebHitRateEvo_WithoutDupli number " << uFebIdx;
801 LOG(debug) <<
"Initialized All Histos 8th Histo";
805 LOG(debug) <<
"Initialized 7th Histo before Summary per FEB";
807 TCanvas* cChannel =
new TCanvas(Form(
"CHANNELS"),
810 cChannel->Divide(4, 9);
812 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
814 cChannel->cd(uFebIdx + 1);
827 TCanvas* cspill =
new TCanvas(Form(
"SPILLS"), Form(
"SPILLS"));
828 cspill->Divide(4, 9);
830 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
832 UInt_t flPad = 1 + uFebIdx;
844 TCanvas* cadc =
new TCanvas(Form(
"ADC"), Form(
"ADC"), w,
h);
847 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
849 UInt_t flPad = 1 + uFebIdx;
859 TCanvas* cChanneltime =
new TCanvas(Form(
"ChannelvsTime"), Form(
"ChannelvsTime"), w,
h);
860 cChanneltime->Divide(4, 9);
862 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
864 UInt_t flPad = 1 + uFebIdx;
865 cChanneltime->cd(flPad);
875 LOG(debug) <<
"Initialized Last Histo before exiting CreateHistograms";
880 fcMsSizeAll =
dynamic_cast<TCanvas*
>(gROOT->FindObject(
"cMsSizeAll"));
883 "Evolution of MS size in last 300 s");
885 LOG(info) <<
"Created MS size canvas in Much monitor";
890 LOG(info) <<
"Recovered MS size canvas in Much monitor";
900 fdTsStartTime =
static_cast<Double_t
>(ts.descriptor(0, 0).idx);
912 <<
" Overlap MS, for a core duration of " <<
fdTsCoreSizeInNs <<
" ns and a full duration of "
918 LOG(info) <<
"In each TS " <<
fuNbMsLoop <<
" MS will be looped over";
939 std::sort( fvmHitsInMs.begin(), fvmHitsInMs.end() );
942 for( auto itHitIn = fvmHitsInMs.begin(); itHitIn < fvmHitsInMs.end(); ++itHitIn )
944 UInt_t uFebIdx = itHitIn->GetAsic() / fUnpackPar->GetNbAsicsPerFeb()
945 + ( itHitIn->GetDpb() * fUnpackPar->GetNbCrobsPerDpb() + itHitIn->GetCrob() )
946 * fUnpackPar->GetNbFebsPerCrob();
947 UInt_t uChanInFeb = itHitIn->GetChan()
948 + fUnpackPar->GetNbChanPerAsic() * (itHitIn->GetAsic() % fUnpackPar->GetNbAsicsPerFeb());
950 ULong64_t ulTimeInNs = static_cast< ULong64_t >( itHitIn->GetTs() * stsxyter::kdClockCycleNs - fdTimeOffsetNs );
952 fDigiVect.push_back( CbmTofDigi( fviFebAddress[ uFebIdx ], uChanInFeb, ulTimeInNs, itHitIn->GetAdc() ) );
953 } // for( auto itHitIn = fvmHitsInMs.begin(); itHitIn < fvmHitsInMs.end(); ++itHitIn )
981 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
983 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsComp, uMsIdx));
1003 LOG(warning) <<
"Could not find the sDPB index for AFCK id 0x" << std::hex <<
fuCurrentEquipmentId << std::dec
1004 <<
" component " << uMsComp <<
"\n"
1005 <<
"If valid this index has to be added in the TOF parameter file in "
1006 "the RocIdArray field"
1008 <<
"For now we remove it from the list of components analyzed";
1016 uint32_t uSize = msDescriptor.size;
1020 <<
" has size: " << uSize;
1028 fhMsSz[uMsComp]->Fill(uSize);
1033 if (
static_cast<Int_t
>(
fvdPrevMsTime[uMsComp]) <
static_cast<Int_t
>(dMsTime)) {
1037 UInt_t uFebIdxInSyst = uFebIdxOffset + uFebIdx;
1072 uint16_t uMsHeaderFlags = msDescriptor.flags;
1073 for (UInt_t uBit = 0; uBit < 16; ++uBit)
1103 LOG(error) <<
"The input microslice buffer does NOT "
1104 <<
"contain only complete nDPB messages!";
1110 const uint32_t* pInBuff =
reinterpret_cast<const uint32_t*
>(msContent);
1112 for (uint32_t uIdx = 0; uIdx < uNbMessages; ++uIdx) {
1114 uint32_t ulData =
static_cast<uint32_t
>(pInBuff[uIdx]);
1142 LOG(debug) <<
" usElinkIdx " << usElinkIdx <<
" uCrobIdx " << uCrobIdx <<
" uFebIdx " << uFebIdx
1143 <<
" MessageTypeValue " <<
static_cast<uint16_t
>(typeMess);
1144 if (kTRUE ==
fbMuchMode) uFebIdx = usElinkIdx;
1147 static_cast<uint16_t
>(typeMess));
1148 if (-1 == uFebIdx) {
1149 LOG(warning) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1150 <<
"Wrong elink Idx! Elink raw " << Form(
"%d remap %d", usElinkIdx, uFebIdx);
1164 static_cast<uint16_t
>(typeMess));
1172 static_cast<uint16_t
>(typeMess));
1178 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1179 <<
"EPOCH message at unexpected position in MS: message " << uIdx <<
" VS message 0 expected!";
1199 static_cast<uint16_t
>(typeMess));
1212 static_cast<uint16_t
>(typeMess));
1225 LOG(fatal) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1226 <<
"Unknown message type, should never happen, stopping "
1227 "here! Type found was: "
1228 <<
static_cast<int>(typeMess);
1238 const UInt_t& uAsicIdx,
const UInt_t& )
1248 UInt_t uFebIdx = uAsicIdx;
1275 if (constime < 10000000) {
1353 TFile* oldFile = gFile;
1354 TDirectory* oldDir = gDirectory;
1356 TFile* histoFile = NULL;
1357 if (
"" != sFileName) {
1359 histoFile =
new TFile(sFileName,
"RECREATE");
1364 gDirectory->mkdir(
"Much_Raw");
1365 gDirectory->cd(
"Much_Raw");
1367 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
1384 gDirectory->cd(
"..");
1388 gDirectory->mkdir(
"Much_Feb");
1389 gDirectory->cd(
"Much_Feb");
1390 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
1419 gDirectory->cd(
"..");
1424 gDirectory->mkdir(
"Flib_Raw");
1425 gDirectory->cd(
"Flib_Raw");
1427 TString sMsSzName = Form(
"MsSz_link_%02u", uLinks);
1428 if (
fHM->
Exists(sMsSzName.Data()))
fHM->
H1(sMsSzName.Data())->Write();
1430 sMsSzName = Form(
"MsSzTime_link_%02u", uLinks);
1431 if (
fHM->
Exists(sMsSzName.Data()))
fHM->
P1(sMsSzName.Data())->Write();
1436 if (
"" != sFileName) {
1443 gDirectory = oldDir;
1448 LOG(info) <<
"Reseting all Much histograms.";
1450 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
1468 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
1500 TString sMsSzName = Form(
"MsSz_link_%02u", uLinks);
1501 if (
fHM->
Exists(sMsSzName.Data()))
fHM->
H1(sMsSzName.Data())->Reset();
1503 sMsSzName = Form(
"MsSzTime_link_%02u", uLinks);
1504 if (
fHM->
Exists(sMsSzName.Data()))
fHM->
P1(sMsSzName.Data())->Reset();
1513 TDatime* fRunStartDateTime =
new TDatime(dateIn, timeIn);
1517 LOG(info) <<
"Assigned new MUCH Run Start Date-Time: " << fRunStartDateTime->AsString();
1523 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
1525 LOG(info) << Form(
" ------------------ Noisy channels scan for FEB %2d ------------", uFebIdx);
1530 LOG(info) << Form(
"Noisy Channel ASIC %d channel %3d (%4d) level %6.0f", uAsicIdx, uChanIdx, uChanInFeb,
1535 LOG(info) <<
" ---------------------------------------------------------------";
ClassImp(CbmConverterManager)
TProfile * P1(const std::string &name) const
Return pointer to TProfile.
Bool_t Exists(const std::string &name) const
Check existence of object in manager.
void Add(const std::string &name, TNamed *object)
Add new named object to manager.
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
Bool_t ProcessTs(const fles::Timeslice &ts)
void FillHitInfo(stsxyter::Message mess, const UShort_t &usElinkIdx, const UInt_t &uAsicIdx, const UInt_t &uMsIdx)
Long64_t prevtime_new
Starting state book-keeping.
std::vector< UInt_t > fvuInitialHeaderDone
Current TS MSB cycle for DPB.
Int_t fiTimeIntervalRateUpdate
Mean Rate per channel plots.
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
std::vector< TH2 * > fhMuchFebChanHitRateEvo
UInt_t fuNbFebs
Array to hold the active flag for all CROBs, [ NbDpb ][ NbCrobPerDpb ].
std::map< UInt_t, UInt_t > fDpbIdIndexMap
Total number of STS DPBs in system.
std::vector< TH2 * > fhMuchFebADC
void FillTsMsbInfo(stsxyter::Message mess, UInt_t uMessIdx=0, UInt_t uMsIdx=0)
std::vector< TH1 * > fhMuchFebChanCntRaw
TH1 * fhElinkIdxHit
Number of hits in each MS for each Channel.
UInt_t fuCurrentEquipmentId
Current data properties.
UInt_t fuNbStsXyters
Number of StsXyter ASICs.
UInt_t fuMaxNbMicroslices
Coincidence histos.
std::vector< std::vector< Double_t > > fvdChanLastHitTime
Last hit time in bins for each Channel.
static const Int_t kiMaxNbFlibLinks
/** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **/
std::vector< Double_t > fvdPrevMsTime
Last hit time in ns for each Channel.
std::vector< TH2 * > fhMuchFebChanAdcRaw
ULong64_t fulCurrentMsIdx
TS/MS info.
Double_t fdTsStopTimeCore
Time in ns of current TS from the index of the first MS first component.
std::vector< stsxyter::FinalHit > fvmHitsInMs
Hits time-sorting.
std::vector< Bool_t > fvbMaskedComponents
~CbmMcbm2018MonitorAlgoMuchLite()
void FillEpochInfo(stsxyter::Message mess)
Bool_t fbMuchMode
Switch ON the filling of a minimal set of histograms.
Int_t fiBinSizeDatePlots
Start of run time since "epoch" in s, for the plots with date as X axis.
void SaveAllHistos(TString sFileName="")
std::vector< std::vector< stsxyter::FinalHit > > fvmAsicHitsInMs
Last hit ADC in bins in each MS for each Channel.
TH2 * fhMuchSysMessTypePerDpb
std::vector< TH1 * > fhMuchFebHitRateEvo_mskch
static const UInt_t kuBytesPerMessage
TH1 * fhMuchMessType
Histogram manager.
std::vector< TH1 * > fhMuchFebHitRateEvo_mskch_adccut
Bool_t InitMuchParameters()
std::vector< TH1 * > fhMuchFebSpill
std::vector< std::vector< std::vector< UShort_t > > > fvusChanLastHitAdcInMs
Last hit time in bins in each MS for each Channel.
Bool_t CreateHistograms()
std::vector< std::vector< std::vector< UInt_t > > > fvuChanNbHitsInMs
std::vector< size_t > fvMsComponentsList
std::vector< TH1 * > fhMuchFebHitRateEvo
TH2 * fhMsStatusFieldType
std::vector< ULong64_t > fvulCurrentTsMsb
Bin size in s for the plots with date as X axis.
Int_t fiRunStartDateTimeSec
Index of the DPB from which the MS currently unpacked is coming.
std::vector< TProfile * > fhMuchFebChanAdcRawProf
Bool_t ScanForNoisyChannels(Double_t dNoiseThreshold=1e3)
---------------------------------------------------------------—///
std::vector< UInt_t > fvuElinkLastTsHit
TS MSB cycle from MS header in 1st MS for DPB.
UInt_t fuMsIndex
End Time in ns of current TS Core from the index of the first MS first component.
CbmHistManager * fHM
Coincidences in sorted hits.
std::vector< TH2 * > fHistPadDistr
Plots per FEB-8.
TH2 * fhMuchMessTypePerDpb
TH2 * fhMuchHitsElinkPerDpb
std::vector< UInt_t > fvuInitialTsMsbCycleHeader
Flag set after seeing MS header in 1st MS for DPB.
UInt_t Counter
Rate evolution histos.
std::vector< std::vector< Double_t > > fvdFebChanCountsSinceLastRateUpdate
std::map< stsxyter::MessType, UInt_t > fmMsgCounter
Number of StsXyter ASICs.
Bool_t fbBinningFw
=> Quick and dirty hack for binning FW!!!
std::vector< TH2 * > fhMuchFebChanDistT
CbmMcbm2018MonitorAlgoMuchLite()
std::vector< std::vector< std::vector< Double_t > > > fvdChanLastHitTimeInMs
Header time of each MS.
std::vector< std::vector< ULong64_t > > fvulChanLastHitTime
TH2 * fhMuchMessTypePerElink
std::vector< Double_t > fvdMsTime
Header time of previous MS per link.
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
void SetRunStart(Int_t dateIn, Int_t timeIn, Int_t iBinSize=5)
std::vector< TH2 * > fhMuchFebChanRawTs
std::vector< UInt_t > fvuCurrentTsMsbCycle
Current TS MSB for each DPB.
std::vector< TH2 * > fRealHistPadDistr
TH1 * fhMsSz[kiMaxNbFlibLinks]
std::vector< std::vector< Double_t > > fdMuchFebChanLastTimeForDist
std::vector< std::vector< stsxyter::FinalHit > > fvmFebHitsInMs
All hits (time in bins, ADC in bins, asic, channel) in last TS, per ASIC, sorted with "<" operator.
std::vector< TProfile * > fhMuchFebChanHitRateProf
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
Bool_t ProcessMs(const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
stsxyter::MessagePrintMask fPrintMessCtrl
Bool_t fbPrintMessages
Task configuration values.
TProfile * fhMsSzTime[kiMaxNbFlibLinks]
std::vector< std::vector< Bool_t > > fvbCrobActiveFlag
Map of DPB Identifier to DPB index.
std::vector< Int_t > fviFebCountsSinceLastRateUpdate
ULong64_t fulCurrentTsIdx
Bool_t ReInitContainers()
std::vector< Int_t > fviFebTimeSecLastRateUpdate
std::vector< TProfile * > fhMuchFebDuplicateHitProf
CbmMcbm2018MuchPar * fUnpackParMuch
TH1 * fhMuchFebChanAdcRaw_combined
std::vector< TH2 * > fhMuchChannelTime
std::vector< TH1 * > fhMuchFebHitRateEvo_WithoutDupli
TH2 * fhDpbMsErrors
Binning FW error flag.
Int_t ElinkIdxToFebIdx(UInt_t uElink)
static constexpr UInt_t GetNbElinkPerCrob()
static constexpr UInt_t GetNbChanPerAsic()
static constexpr UInt_t GetNbAsicsPerCrob()
static constexpr UInt_t GetNbChanPerFeb()
UInt_t GetDpbId(UInt_t uDpbIdx)
UInt_t ElinkIdxToAsicIdx(UInt_t uElink)
Bool_t IsCrobActive(UInt_t uDpbIdx, UInt_t uCrobIdx)
Bool_t IsFebActive(UInt_t uFebInSystIdx)
static constexpr UInt_t GetNbFebsPerDpb()
static constexpr UInt_t GetNbCrobsPerDpb()
static constexpr UInt_t GetNbAsicsPerFeb()
Double_t fdTsCoreSizeInNs
void AddHistoToVector(TNamed *pointer, std::string sFolder="")
void AddCanvasToVector(TCanvas *pointer, std::string sFolder="")
Double_t fdTsFullSizeInNs
Data class with information on a STS local track.
XPU_D uint32_t GetTsMsbValBinning() const
For TS MSB data: Returns the TS MSB 29 bit field)
XPU_D uint16_t GetHitAdc() const
For Hit data: Returns ADC value (5 bit field)
XPU_D uint16_t GetHitChannel() const
For Hit data: Returns StsXYTER channel number (7 bit field)
bool PrintMess(std::ostream &os, MessagePrintMask ctrl=MessagePrintMask::msg_print_Human, bool bBinning=true) const
XPU_D uint16_t GetLinkIndex() const
For all data: Returns the (global) index of the eLink on which the message was received (n bit field)
XPU_D MessType GetMessType() const
Returns the message type, see enum MessType.
XPU_D uint16_t GetLinkIndexHitBinning() const
XPU_D uint16_t GetHitTime() const
For Hit data: Returns timestamp (8 bit field, 2 MSB bits overlap removed)
XPU_D uint32_t GetTsMsbVal() const
For TS MSB data: Returns the TS MSB 22 bit field)
XPU_D uint16_t GetHitTimeBinning() const
XPU_D uint16_t GetMsErrorType() const
For End of MS data: Returns the MS error type field (2 bit field)
XPU_D bool IsMsErrorFlagOn() const
For End of MS data: Returns the MS error flag (1 bit field)
static constexpr uint32_t kuHitNbTsBinsBinning
static constexpr uint64_t kulTsCycleNbBins
static constexpr uint64_t kulTsCycleNbBinsBinning
static constexpr uint32_t kuHitNbTsBins
static constexpr uint32_t kuHitNbAdcBins
Status/properties constants.
static constexpr double kdClockCycleNs