414 TString sHistName {
""};
417 sHistName =
"hMessageType";
418 title =
"Nb of message for each type; Type";
428 sHistName =
"hSysMessType";
429 title =
"Nb of system message for each type; System Type";
432 sHistName =
"hMuchFebChanAdcRaw_combined";
433 title =
"ADC hist combined";
437 LOG(debug) <<
"Initialized 1st Histo";
438 sHistName =
"hMessageTypePerDpb";
439 title =
"Nb of message of each type for each DPB; DPB; Type";
448 sHistName =
"hMuchMessTypePerElink";
449 title =
"Nb of message of each type for each Elink; Elink; Type";
460 fhElinkIdxHit =
new TH1I(
"ElinkIdxHit",
"Active Elink Ids for Hit Messages", 42, 0, 41);
462 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
464 sHistName = Form(
"HistPadDistr_Module_%01u", uModuleId);
465 title = Form(
"Pad distribution for, Module #%01u; ", uModuleId);
468 fHistPadDistr.push_back(
new TH2I(sHistName, title, 23, -0.5, 22.5, 97, -0.5, 96.5));
470 sHistName = Form(
"RealHistPadDistr_Module_%01u", uModuleId);
471 title = Form(
"Progressive Pad distribution for, Module #%01u; ", uModuleId);
473 fRealHistPadDistr.push_back(
new TH2D(sHistName, title, 500, -0.5, 499.5, 1000, -0.5, 999.5));
477 sHistName = Form(
"hMuchFebDuplicateHitProf_%01u", uModuleId);
478 title = Form(
"FEB wise Duplicate Hit for Module #%01u; FEB []; Hit []", uModuleId);
488 title =
"Rate in kHz";
489 fhRate =
new TH1I(sHistName, title, 10000, -0.5, 9999.5);
491 sHistName =
"hRateAdcCut";
492 title =
"Rate in kHz with Adc cut";
493 fhRateAdcCut =
new TH1I(sHistName, title, 10000, -0.5, 9999.5);
496 sHistName =
"hFEBcount";
497 title =
"Count vs FEB number; FEB Number; Count";
498 fhFEBcount =
new TH1I(sHistName, title, 40, -0.5, 39.5);
501 sHistName =
"hSysMessTypePerDpb";
502 title =
"Nb of system message of each type for each DPB; DPB; System Type";
505 sHistName =
"hStatusMessType";
506 title =
"Nb of status message of each type for each DPB; ASIC; Status Type";
510 sHistName =
"hMsStatusFieldType";
511 title =
"For each flag in the MS header, ON/OFF counts; Flag bit []; ON/OFF; MS []";
515 sHistName =
"hMuchHitsElinkPerDpb";
516 title =
"Nb of hit messages per eLink for each DPB; DPB; eLink; Hits nb []";
520 LOG(debug) <<
"Initialized 2nd Histo";
556 LOG(debug) <<
"Initialized 3rd Histo";
577 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
579 sHistName = Form(
"hMuchFebChanCntRaw_%03u", uFebIdx);
580 title = Form(
"Hits Count per channel, FEB #%03u; Channel; Hits []", uFebIdx);
589 sHistName = Form(
"fhMuchFebSpill_%03u", uFebIdx);
590 title = Form(
"Time distribution of hits, FEB #%03u; Time ; Counts ", uFebIdx);
591 fhMuchFebSpill.push_back(
new TH1I(sHistName, title, 2000, 0, 2000));
594 sHistName = Form(
"hMuchChannelTime_FEB%03u", uFebIdx);
595 title = Form(
"Time vs Channel, FEB #%03u; TIME(s) ; CHANNEL ", uFebIdx);
596 fhMuchChannelTime.push_back(
new TH2I(sHistName, title, 1000, 0, 1000, 129, -0.5, 128.5));
599 sHistName = Form(
"hMuchFebADC_%03u", uFebIdx);
600 title = Form(
"CHANNEL vs ADC, FEB #%03u; CHANNEL ; ADC ", uFebIdx);
601 fhMuchFebADC.push_back(
new TH2I(sHistName, title, 129, -0.5, 128.5, 34, -0.5, 33.5));
605 sHistName = Form(
"hMuchFebChanAdcRaw_%03u", uFebIdx);
606 title = Form(
"Raw Adc distribution per channel, FEB #%03u; Channel []; Adc "
614 sHistName = Form(
"hMuchFebChanAdcRawProfc_%03u", uFebIdx);
615 title = Form(
"Raw Adc prodile per channel, FEB #%03u; Channel []; Adc []", uFebIdx);
633 sHistName = Form(
"hMuchFebChanRawTs_%03u", uFebIdx);
634 title = Form(
"Raw Timestamp distribution per channel, FEB #%03u; Channel "
635 "[]; Ts []; Hits []",
642 sHistName = Form(
"hMuchFebChanRateEvo_%03u", uFebIdx);
643 title = Form(
"Hits per second & channel in FEB #%03u; Time [s]; Channel []; Hits []", uFebIdx);
648 sHistName = Form(
"hMuchFebChanRateProf_%03u", uFebIdx);
649 title = Form(
"Hits per second for each channel in FEB #%03u; Channel []; Hits/s []", uFebIdx);
660 sHistName = Form(
"hMuchFebRateEvo_%03u", uFebIdx);
661 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
666 sHistName = Form(
"hMuchFebRateEvo_mskch_%03u", uFebIdx);
667 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
671 sHistName = Form(
"hMuchFebRateEvo_mskch_adcut_%03u", uFebIdx);
672 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
676 sHistName = Form(
"hMuchFebRateEvo_WithoutDupli_%03u", uFebIdx);
677 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
701 sHistName = Form(
"hMuchFebChanDistT_%03u", uFebIdx);
702 title = Form(
"Time distance between hits on same channel in between FEB "
703 "#%03u; Time difference [ns]; Channel []; ",
712 new TH2I(
"fhDpbMsErrors",
"; DPB []; Error type []; Counts []",
fuNrOfDpbs, 0,
fuNrOfDpbs, 4, -0.5, 3.5);
721 LOG(debug) <<
"Initialized 6th Histo before FairRunOnlne Instance";
724 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
755 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
779 LOG(debug) <<
"Initialized fhMuchFebHitRateEvo_WithoutDupli number " << uFebIdx;
800 LOG(debug) <<
"Initialized All Histos 8th Histo";
804 LOG(debug) <<
"Initialized 7th Histo before Summary per FEB";
806 TCanvas* cChannel =
new TCanvas(Form(
"CHANNELS"),
809 cChannel->Divide(4, 9);
811 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
813 cChannel->cd(uFebIdx + 1);
826 TCanvas* cspill =
new TCanvas(Form(
"SPILLS"), Form(
"SPILLS"));
827 cspill->Divide(4, 9);
829 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
831 UInt_t flPad = 1 + uFebIdx;
843 TCanvas* cadc =
new TCanvas(Form(
"ADC"), Form(
"ADC"), w,
h);
846 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
848 UInt_t flPad = 1 + uFebIdx;
858 TCanvas* cChanneltime =
new TCanvas(Form(
"ChannelvsTime"), Form(
"ChannelvsTime"), w,
h);
859 cChanneltime->Divide(4, 9);
861 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
863 UInt_t flPad = 1 + uFebIdx;
864 cChanneltime->cd(flPad);
874 LOG(debug) <<
"Initialized Last Histo before exiting CreateHistograms";
879 fcMsSizeAll =
dynamic_cast<TCanvas*
>(gROOT->FindObject(
"cMsSizeAll"));
882 "Evolution of MS size in last 300 s");
884 LOG(info) <<
"Created MS size canvas in Much monitor";
889 LOG(info) <<
"Recovered MS size canvas in Much monitor";
980 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
982 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsComp, uMsIdx));
1002 LOG(warning) <<
"Could not find the sDPB index for AFCK id 0x" << std::hex <<
fuCurrentEquipmentId << std::dec
1003 <<
" component " << uMsComp <<
"\n"
1004 <<
"If valid this index has to be added in the TOF parameter file in "
1005 "the RocIdArray field"
1007 <<
"For now we remove it from the list of components analyzed";
1015 uint32_t uSize = msDescriptor.size;
1019 <<
" has size: " << uSize;
1027 fhMsSz[uMsComp]->Fill(uSize);
1035 for (UInt_t uFebIdx = 0; uFebIdx <
fUnpackParMuch->GetNbFebsPerDpb(); ++uFebIdx) {
1036 UInt_t uFebIdxInSyst = uFebIdxOffset + uFebIdx;
1042 for (UInt_t uChan = 0; uChan <
fUnpackParMuch->GetNbChanPerFeb(); ++uChan)
1055 for (UInt_t uChan = 0; uChan <
fUnpackParMuch->GetNbChanPerFeb(); ++uChan) {
1071 uint16_t uMsHeaderFlags = msDescriptor.flags;
1072 for (UInt_t uBit = 0; uBit < 16; ++uBit)
1102 LOG(error) <<
"The input microslice buffer does NOT "
1103 <<
"contain only complete nDPB messages!";
1109 const uint32_t* pInBuff =
reinterpret_cast<const uint32_t*
>(msContent);
1111 for (uint32_t uIdx = 0; uIdx < uNbMessages; ++uIdx) {
1113 uint32_t ulData =
static_cast<uint32_t
>(pInBuff[uIdx]);
1138 UInt_t uCrobIdx = usElinkIdx /
fUnpackParMuch->GetNbElinkPerCrob();
1141 LOG(debug) <<
" usElinkIdx " << usElinkIdx <<
" uCrobIdx " << uCrobIdx <<
" uFebIdx " << uFebIdx
1142 <<
" MessageTypeValue " <<
static_cast<uint16_t
>(typeMess);
1143 if (kTRUE ==
fbMuchMode) uFebIdx = usElinkIdx;
1146 static_cast<uint16_t
>(typeMess));
1147 if (-1 == uFebIdx) {
1148 LOG(warning) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1149 <<
"Wrong elink Idx! Elink raw " << Form(
"%d remap %d", usElinkIdx, uFebIdx);
1163 static_cast<uint16_t
>(typeMess));
1171 static_cast<uint16_t
>(typeMess));
1177 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1178 <<
"EPOCH message at unexpected position in MS: message " << uIdx <<
" VS message 0 expected!";
1198 static_cast<uint16_t
>(typeMess));
1211 static_cast<uint16_t
>(typeMess));
1224 LOG(fatal) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1225 <<
"Unknown message type, should never happen, stopping "
1226 "here! Type found was: "
1227 <<
static_cast<int>(typeMess);