412 TString sHistName {
""};
415 sHistName =
"hMessageType";
416 title =
"Nb of message for each type; Type";
426 sHistName =
"hSysMessType";
427 title =
"Nb of system message for each type; System Type";
430 sHistName =
"hMuchFebChanAdcRaw_combined";
431 title =
"ADC hist combined";
435 LOG(debug) <<
"Initialized 1st Histo";
436 sHistName =
"hMessageTypePerDpb";
437 title =
"Nb of message of each type for each DPB; DPB; Type";
446 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
448 sHistName = Form(
"HistPadDistr_Module_%01u", uModuleId);
449 title = Form(
"Pad distribution for, Module #%01u; ", uModuleId);
452 fHistPadDistr.push_back(
new TH2I(sHistName, title, 23, -0.5, 22.5, 97, -0.5, 96.5));
454 sHistName = Form(
"RealHistPadDistr_Module_%01u", uModuleId);
455 title = Form(
"Progressive Pad distribution for, Module #%01u; ", uModuleId);
457 fRealHistPadDistr.push_back(
new TH2D(sHistName, title, 500, -0.5, 499.5, 1000, -0.5, 999.5));
461 sHistName = Form(
"hMuchFebDuplicateHitProf_%01u", uModuleId);
462 title = Form(
"FEB wise Duplicate Hit for Module #%01u; FEB []; Hit []", uModuleId);
472 title =
"Rate in kHz";
473 fhRate =
new TH1I(sHistName, title, 10000, -0.5, 9999.5);
475 sHistName =
"hRateAdcCut";
476 title =
"Rate in kHz with Adc cut";
477 fhRateAdcCut =
new TH1I(sHistName, title, 10000, -0.5, 9999.5);
480 sHistName =
"hFEBcount";
481 title =
"Count vs FEB number; FEB Number; Count";
482 fhFEBcount =
new TH1I(sHistName, title, 40, -0.5, 39.5);
485 sHistName =
"hSysMessTypePerDpb";
486 title =
"Nb of system message of each type for each DPB; DPB; System Type";
489 sHistName =
"hStatusMessType";
490 title =
"Nb of status message of each type for each DPB; ASIC; Status Type";
494 sHistName =
"hMsStatusFieldType";
495 title =
"For each flag in the MS header, ON/OFF counts; Flag bit []; ON/OFF; MS []";
499 sHistName =
"hMuchHitsElinkPerDpb";
500 title =
"Nb of hit messages per eLink for each DPB; DPB; eLink; Hits nb []";
503 LOG(debug) <<
"Initialized 2nd Histo";
539 LOG(debug) <<
"Initialized 3rd Histo";
560 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
562 sHistName = Form(
"hMuchFebChanCntRaw_%03u", uFebIdx);
563 title = Form(
"Hits Count per channel, FEB #%03u; Channel; Hits []", uFebIdx);
572 sHistName = Form(
"fhMuchFebSpill_%03u", uFebIdx);
573 title = Form(
"Time distribution of hits, FEB #%03u; Time ; Counts ", uFebIdx);
574 fhMuchFebSpill.push_back(
new TH1I(sHistName, title, 1000, 0, 1000));
577 sHistName = Form(
"hMuchChannelTime_FEB%03u", uFebIdx);
578 title = Form(
"Time vs Channel, FEB #%03u; TIME(s) ; CHANNEL ", uFebIdx);
579 fhMuchChannelTime.push_back(
new TH2I(sHistName, title, 1000, 0, 1000, 129, -0.5, 128.5));
582 sHistName = Form(
"hMuchFebADC_%03u", uFebIdx);
583 title = Form(
"CHANNEL vs ADC, FEB #%03u; CHANNEL ; ADC ", uFebIdx);
584 fhMuchFebADC.push_back(
new TH2I(sHistName, title, 129, -0.5, 128.5, 34, -0.5, 33.5));
588 sHistName = Form(
"hMuchFebChanAdcRaw_%03u", uFebIdx);
589 title = Form(
"Raw Adc distribution per channel, FEB #%03u; Channel []; Adc "
597 sHistName = Form(
"hMuchFebChanAdcRawProfc_%03u", uFebIdx);
598 title = Form(
"Raw Adc prodile per channel, FEB #%03u; Channel []; Adc []", uFebIdx);
616 sHistName = Form(
"hMuchFebChanRawTs_%03u", uFebIdx);
617 title = Form(
"Raw Timestamp distribution per channel, FEB #%03u; Channel "
618 "[]; Ts []; Hits []",
625 sHistName = Form(
"hMuchFebChanRateEvo_%03u", uFebIdx);
626 title = Form(
"Hits per second & channel in FEB #%03u; Time [s]; Channel []; Hits []", uFebIdx);
631 sHistName = Form(
"hMuchFebChanRateProf_%03u", uFebIdx);
632 title = Form(
"Hits per second for each channel in FEB #%03u; Channel []; Hits/s []", uFebIdx);
643 sHistName = Form(
"hMuchFebRateEvo_%03u", uFebIdx);
644 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
649 sHistName = Form(
"hMuchFebRateEvo_mskch_%03u", uFebIdx);
650 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
654 sHistName = Form(
"hMuchFebRateEvo_mskch_adcut_%03u", uFebIdx);
655 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
659 sHistName = Form(
"hMuchFebRateEvo_WithoutDupli_%03u", uFebIdx);
660 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
684 sHistName = Form(
"hMuchFebChanDistT_%03u", uFebIdx);
685 title = Form(
"Time distance between hits on same channel in between FEB "
686 "#%03u; Time difference [ns]; Channel []; ",
695 new TH2I(
"fhDpbMsErrors",
"; DPB []; Error type []; Counts []",
fuNrOfDpbs, 0,
fuNrOfDpbs, 4, -0.5, 3.5);
704 LOG(debug) <<
"Initialized 6th Histo before FairRunOnlne Instance";
705 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
707 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
724 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
744 LOG(debug) <<
"Initialized fhMuchFebHitRateEvo_WithoutDupli number " << uFebIdx;
754 LOG(debug) <<
"Initialized FEB 8th Histo";
755 server->RegisterCommand(
"/Reset_All",
"bMcbm2018ResetMuchLite=kTRUE");
756 server->RegisterCommand(
"/Write_All",
"bMcbm2018WriteMuchLite=kTRUE");
757 server->RegisterCommand(
"/ScanNoisyCh",
"bMcbm2018ScanNoisyMuchLite=kTRUE");
758 server->Restrict(
"/Reset_All",
"allow=admin");
759 server->Restrict(
"/Write_All",
"allow=admin");
760 server->Restrict(
"/ScanNoisyCh",
"allow=admin");
763 LOG(debug) <<
"Initialized All Histos 8th Histo";
767 LOG(debug) <<
"Initialized 7th Histo before Summary per FEB";
769 TCanvas* cChannel =
new TCanvas(Form(
"CHANNELS"),
772 cChannel->Divide(4, 9);
774 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
776 cChannel->cd(uFebIdx + 1);
785 server->Register(
"/canvases", cChannel);
788 TCanvas* cspill =
new TCanvas(Form(
"SPILLS"), Form(
"SPILLS"));
789 cspill->Divide(4, 9);
791 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
793 UInt_t flPad = 1 + uFebIdx;
802 server->Register(
"/canvases", cspill);
804 TCanvas* cadc =
new TCanvas(Form(
"ADC"), Form(
"ADC"), w,
h);
807 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
809 UInt_t flPad = 1 + uFebIdx;
817 server->Register(
"/canvases", cadc);
819 TCanvas* cChanneltime =
new TCanvas(Form(
"ChannelvsTime"), Form(
"ChannelvsTime"), w,
h);
820 cChanneltime->Divide(4, 9);
822 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
824 UInt_t flPad = 1 + uFebIdx;
825 cChanneltime->cd(flPad);
832 server->Register(
"/canvases", cChanneltime);
834 LOG(debug) <<
"Initialized Last Histo before exiting CreateHistograms";
839 fcMsSizeAll =
dynamic_cast<TCanvas*
>(gROOT->FindObject(
"cMsSizeAll"));
842 "Evolution of MS size in last 300 s");
844 LOG(info) <<
"Created MS size canvas in Much monitor";
848 LOG(info) <<
"Recovered MS size canvas in Much monitor";
988 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
990 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsComp, uMsIdx));
1010 LOG(warning) <<
"Could not find the sDPB index for AFCK id 0x" << std::hex <<
fuCurrentEquipmentId << std::dec
1011 <<
" component " << uMsComp <<
"\n"
1012 <<
"If valid this index has to be added in the TOF parameter file in "
1013 "the RocIdArray field"
1015 <<
"For now we remove it from the list of components analyzed";
1023 uint32_t uSize = msDescriptor.size;
1027 <<
" has size: " << uSize;
1035 fhMsSz[uMsComp]->Fill(uSize);
1043 for (UInt_t uFebIdx = 0; uFebIdx <
fUnpackParMuch->GetNbFebsPerDpb(); ++uFebIdx) {
1044 UInt_t uFebIdxInSyst = uFebIdxOffset + uFebIdx;
1050 for (UInt_t uChan = 0; uChan <
fUnpackParMuch->GetNbChanPerFeb(); ++uChan)
1063 for (UInt_t uChan = 0; uChan <
fUnpackParMuch->GetNbChanPerFeb(); ++uChan) {
1079 uint16_t uMsHeaderFlags = msDescriptor.flags;
1080 for (UInt_t uBit = 0; uBit < 16; ++uBit)
1110 LOG(error) <<
"The input microslice buffer does NOT "
1111 <<
"contain only complete nDPB messages!";
1117 const uint32_t* pInBuff =
reinterpret_cast<const uint32_t*
>(msContent);
1119 for (uint32_t uIdx = 0; uIdx < uNbMessages; ++uIdx) {
1121 uint32_t ulData =
static_cast<uint32_t
>(pInBuff[uIdx]);
1145 UInt_t uCrobIdx = usElinkIdx /
fUnpackParMuch->GetNbElinkPerCrob();
1149 if (kTRUE ==
fbMuchMode) uFebIdx = usElinkIdx;
1151 if (-1 == uFebIdx) {
1152 LOG(warning) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1153 <<
"Wrong elink Idx! Elink raw " << Form(
"%d remap %d", usElinkIdx, uFebIdx);
1173 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1174 <<
"EPOCH message at unexpected position in MS: message " << uIdx <<
" VS message 0 expected!";
1211 LOG(fatal) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1212 <<
"Unknown message type, should never happen, stopping "
1213 "here! Type found was: "
1214 <<
static_cast<int>(typeMess);