24#include "FairRootManager.h"
26#include "FairRunOnline.h"
27#include "FairRuntimeDb.h"
31#include "TClonesArray.h"
32#include "THttpServer.h"
57 , fvbMaskedComponents()
58 , fvMsComponentsList()
63 fbIgnoreOverlapMs(kFALSE)
64 , fUnpackParMuch(NULL)
80 fsHistoFileFullname(
"data/HistosMonitorMuch.root")
81 , fbPrintMessages(kFALSE)
82 , fPrintMessCtrl(
stsxyter::MessagePrintMask::msg_print_Human)
86 , fuCurrentEquipmentId(0)
89 , fiRunStartDateTimeSec(-1)
90 , fiBinSizeDatePlots(-1)
92 , fvuCurrentTsMsbCycle()
93 , fvuInitialHeaderDone()
94 , fvuInitialTsMsbCycleHeader()
96 , fvulChanLastHitTime()
97 , fvdChanLastHitTime()
100 , fvuChanNbHitsInMs()
101 , fvdChanLastHitTimeInMs()
102 , fvusChanLastHitAdcInMs()
110 , fdStartTimeMsSz(-1.0)
111 , ftStartTimeUnix(
std::chrono::steady_clock::now())
115 , fuMaxNbMicroslices(100)
116 , fiTimeIntervalRateUpdate(10)
117 , fviFebTimeSecLastRateUpdate()
118 , fviFebCountsSinceLastRateUpdate()
119 , fvdFebChanCountsSinceLastRateUpdate()
128 , fhMuchMessType(NULL)
129 , fhMuchSysMessType(NULL)
130 , fhMuchFebChanAdcRaw_combined(NULL)
131 , fhMuchMessTypePerDpb(NULL)
132 , fhMuchSysMessTypePerDpb(NULL)
133 , fhStatusMessType(NULL)
134 , fhMsStatusFieldType(NULL)
135 , fhMuchHitsElinkPerDpb(NULL)
139 , fRealHistPadDistr()
140 , fhMuchFebChanCntRaw()
143 fhMuchFebChanAdcRaw()
144 , fhMuchFebChanAdcRawProf()
145 , fhMuchFebChanRawTs()
146 , fhMuchFebChanHitRateEvo()
147 , fhMuchFebChanHitRateProf()
150 fhMuchFebHitRateEvo()
151 , fhMuchFebHitRateEvo_mskch()
152 , fhMuchFebHitRateEvo_mskch_adccut()
153 , fhMuchFebHitRateEvo_WithoutDupli()
154 , fdMuchFebChanLastTimeForDist()
155 , fhMuchFebChanDistT()
156 , fhMuchFebDuplicateHitProf()
167 LOG(info) <<
"Initializing flib StsXyter unpacker for MUCH";
169 FairRootManager* ioman = FairRootManager::Instance();
170 if (ioman == NULL) { LOG(fatal) <<
"No FairRootManager instance"; }
177 LOG(info) <<
"Setting parameter containers for " << GetName();
183 LOG(info) <<
"Init parameter containers for " << GetName();
193 LOG(info) <<
"ReInit parameter containers for " << GetName();
203 LOG(info) <<
"Nr. of MUCH DPBs: " <<
fuNrOfDpbs;
206 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
208 LOG(info) <<
"Eq. ID for DPB #" << std::setw(2) << uDpb <<
" = 0x" << std::setw(4) << std::hex
213 LOG(info) <<
"Nr. of FEBs: " <<
fuNbFebs;
221 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
232 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
234 LOG(info) << Form(
"DPB #%02u CROB #%02u Active: ", uDpb, uCrobIdx) <<
fvbCrobActiveFlag[uDpb][uCrobIdx];
238 if (
fbBinningFw) LOG(info) <<
"Unpacking data in bin sorter FW mode";
240 LOG(info) <<
"Unpacking data in full time sorter FW mode (legacy)";
248 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
270 for (UInt_t uXyterIdx = 0; uXyterIdx <
fuNbFebs; ++uXyterIdx) {
293 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::ReInitContainers => Changed "
294 "fvuChanNbHitsInMs size "
296 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::ReInitContainers => Changed "
297 "fvuChanNbHitsInMs size "
299 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::ReInitContainers => Changed "
300 "fvuChanNbHitsInMs size "
308 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
329 LOG(error) <<
"CbmMcbm2018MonitorMuchLite::AddMsComponentToList => "
330 <<
"Ignored the addition of component " << component <<
" as it is above the hadcoded limit of "
333 <<
" To change this behavior check kiMaxNbFlibLinks in "
334 "CbmMcbm2018MonitorMuchLite.cxx";
341 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::AddMsComponentToList => Added component: " << component;
344 if (NULL ==
fhMsSz[component]) {
345 TString sMsSzName = Form(
"MsSz_link_%02lu", component);
346 TString sMsSzTitle = Form(
"Size of MS for nDPB of link %02lu; Ms Size [bytes]", component);
347 fhMsSz[component] =
new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 160000, 0., 20000.);
350 sMsSzName = Form(
"MsSzTime_link_%02lu", component);
351 sMsSzTitle = Form(
"Size of MS vs time for gDPB of link %02lu; Time[s] ; Ms Size [bytes]", component);
352 fhMsSzTime[component] =
new TProfile(sMsSzName.Data(), sMsSzTitle.Data(), 15000, 0., 300.);
360 LOG(info) <<
"Added MS size histo for component: " << component <<
" (DPB)";
362 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
364 server->Register(
"/FlibRaw",
fhMsSz[component]);
365 server->Register(
"/FlibRaw",
fhMsSzTime[component]);
384 for (UInt_t uXyterIdx = 0; uXyterIdx <
fuNbStsXyters; ++uXyterIdx) {
399 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => Changed "
400 "fvuChanNbHitsInMs size "
402 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => Changed "
403 "fvuChanNbHitsInMs size "
405 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => Changed "
406 "fvuChanNbHitsInMs size "
413 TString sHistName {
""};
416 sHistName =
"hMessageType";
417 title =
"Nb of message for each type; Type";
427 sHistName =
"hSysMessType";
428 title =
"Nb of system message for each type; System Type";
431 sHistName =
"hMuchFebChanAdcRaw_combined";
432 title =
"ADC hist combined";
436 LOG(debug) <<
"Initialized 1st Histo";
437 sHistName =
"hMessageTypePerDpb";
438 title =
"Nb of message of each type for each DPB; DPB; Type";
447 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
449 sHistName = Form(
"HistPadDistr_Module_%01u", uModuleId);
450 title = Form(
"Pad distribution for, Module #%01u; ", uModuleId);
453 fHistPadDistr.push_back(
new TH2I(sHistName, title, 23, -0.5, 22.5, 97, -0.5, 96.5));
455 sHistName = Form(
"RealHistPadDistr_Module_%01u", uModuleId);
456 title = Form(
"Progressive Pad distribution for, Module #%01u; ", uModuleId);
458 fRealHistPadDistr.push_back(
new TH2D(sHistName, title, 500, -0.5, 499.5, 1000, -0.5, 999.5));
462 sHistName = Form(
"hMuchFebDuplicateHitProf_%01u", uModuleId);
463 title = Form(
"FEB wise Duplicate Hit for Module #%01u; FEB []; Hit []", uModuleId);
473 title =
"Rate in kHz";
474 fhRate =
new TH1I(sHistName, title, 10000, -0.5, 9999.5);
476 sHistName =
"hRateAdcCut";
477 title =
"Rate in kHz with Adc cut";
478 fhRateAdcCut =
new TH1I(sHistName, title, 10000, -0.5, 9999.5);
481 sHistName =
"hFEBcount";
482 title =
"Count vs FEB number; FEB Number; Count";
483 fhFEBcount =
new TH1I(sHistName, title, 40, -0.5, 39.5);
486 sHistName =
"hSysMessTypePerDpb";
487 title =
"Nb of system message of each type for each DPB; DPB; System Type";
490 sHistName =
"hStatusMessType";
491 title =
"Nb of status message of each type for each DPB; ASIC; Status Type";
495 sHistName =
"hMsStatusFieldType";
496 title =
"For each flag in the MS header, ON/OFF counts; Flag bit []; ON/OFF; MS []";
500 sHistName =
"hMuchHitsElinkPerDpb";
501 title =
"Nb of hit messages per eLink for each DPB; DPB; eLink; Hits nb []";
504 LOG(debug) <<
"Initialized 2nd Histo";
540 LOG(debug) <<
"Initialized 3rd Histo";
561 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
563 sHistName = Form(
"hMuchFebChanCntRaw_%03u", uFebIdx);
564 title = Form(
"Hits Count per channel, FEB #%03u; Channel; Hits []", uFebIdx);
573 sHistName = Form(
"fhMuchFebSpill_%03u", uFebIdx);
574 title = Form(
"Time distribution of hits, FEB #%03u; Time ; Counts ", uFebIdx);
575 fhMuchFebSpill.push_back(
new TH1I(sHistName, title, 1000, 0, 1000));
578 sHistName = Form(
"hMuchChannelTime_FEB%03u", uFebIdx);
579 title = Form(
"Time vs Channel, FEB #%03u; TIME(s) ; CHANNEL ", uFebIdx);
580 fhMuchChannelTime.push_back(
new TH2I(sHistName, title, 1000, 0, 1000, 129, -0.5, 128.5));
583 sHistName = Form(
"hMuchFebADC_%03u", uFebIdx);
584 title = Form(
"CHANNEL vs ADC, FEB #%03u; CHANNEL ; ADC ", uFebIdx);
585 fhMuchFebADC.push_back(
new TH2I(sHistName, title, 129, -0.5, 128.5, 34, -0.5, 33.5));
589 sHistName = Form(
"hMuchFebChanAdcRaw_%03u", uFebIdx);
590 title = Form(
"Raw Adc distribution per channel, FEB #%03u; Channel []; Adc "
598 sHistName = Form(
"hMuchFebChanAdcRawProfc_%03u", uFebIdx);
599 title = Form(
"Raw Adc prodile per channel, FEB #%03u; Channel []; Adc []", uFebIdx);
617 sHistName = Form(
"hMuchFebChanRawTs_%03u", uFebIdx);
618 title = Form(
"Raw Timestamp distribution per channel, FEB #%03u; Channel "
619 "[]; Ts []; Hits []",
626 sHistName = Form(
"hMuchFebChanRateEvo_%03u", uFebIdx);
627 title = Form(
"Hits per second & channel in FEB #%03u; Time [s]; Channel []; Hits []", uFebIdx);
632 sHistName = Form(
"hMuchFebChanRateProf_%03u", uFebIdx);
633 title = Form(
"Hits per second for each channel in FEB #%03u; Channel []; Hits/s []", uFebIdx);
644 sHistName = Form(
"hMuchFebRateEvo_%03u", uFebIdx);
645 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
650 sHistName = Form(
"hMuchFebRateEvo_mskch_%03u", uFebIdx);
651 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
655 sHistName = Form(
"hMuchFebRateEvo_mskch_adcut_%03u", uFebIdx);
656 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
660 sHistName = Form(
"hMuchFebRateEvo_WithoutDupli_%03u", uFebIdx);
661 title = Form(
"Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
685 sHistName = Form(
"hMuchFebChanDistT_%03u", uFebIdx);
686 title = Form(
"Time distance between hits on same channel in between FEB "
687 "#%03u; Time difference [ns]; Channel []; ",
696 new TH2I(
"fhDpbMsErrors",
"; DPB []; Error type []; Counts []",
fuNrOfDpbs, 0,
fuNrOfDpbs, 4, -0.5, 3.5);
705 LOG(debug) <<
"Initialized 6th Histo before FairRunOnlne Instance";
706 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
708 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
725 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
745 LOG(debug) <<
"Initialized fhMuchFebHitRateEvo_WithoutDupli number " << uFebIdx;
755 LOG(debug) <<
"Initialized FEB 8th Histo";
756 server->RegisterCommand(
"/Reset_All",
"bMcbm2018ResetMuchLite=kTRUE");
757 server->RegisterCommand(
"/Write_All",
"bMcbm2018WriteMuchLite=kTRUE");
758 server->RegisterCommand(
"/ScanNoisyCh",
"bMcbm2018ScanNoisyMuchLite=kTRUE");
759 server->Restrict(
"/Reset_All",
"allow=admin");
760 server->Restrict(
"/Write_All",
"allow=admin");
761 server->Restrict(
"/ScanNoisyCh",
"allow=admin");
764 LOG(debug) <<
"Initialized All Histos 8th Histo";
768 LOG(debug) <<
"Initialized 7th Histo before Summary per FEB";
770 TCanvas* cChannel =
new TCanvas(Form(
"CHANNELS"),
773 cChannel->Divide(4, 9);
775 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
777 cChannel->cd(uFebIdx + 1);
786 server->Register(
"/canvases", cChannel);
789 TCanvas* cspill =
new TCanvas(Form(
"SPILLS"), Form(
"SPILLS"));
790 cspill->Divide(4, 9);
792 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
794 UInt_t flPad = 1 + uFebIdx;
803 server->Register(
"/canvases", cspill);
805 TCanvas* cadc =
new TCanvas(Form(
"ADC"), Form(
"ADC"), w,
h);
808 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
810 UInt_t flPad = 1 + uFebIdx;
818 server->Register(
"/canvases", cadc);
820 TCanvas* cChanneltime =
new TCanvas(Form(
"ChannelvsTime"), Form(
"ChannelvsTime"), w,
h);
821 cChanneltime->Divide(4, 9);
823 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
825 UInt_t flPad = 1 + uFebIdx;
826 cChanneltime->cd(flPad);
833 server->Register(
"/canvases", cChanneltime);
835 LOG(debug) <<
"Initialized Last Histo before exiting CreateHistograms";
840 fcMsSizeAll =
dynamic_cast<TCanvas*
>(gROOT->FindObject(
"cMsSizeAll"));
843 "Evolution of MS size in last 300 s");
845 LOG(info) <<
"Created MS size canvas in Much monitor";
849 LOG(info) <<
"Recovered MS size canvas in Much monitor";
870 LOG(debug) <<
"Timeslice contains " << ts.num_microslices(component) <<
" microslices.";
879 for (UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx++) {
885 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
896 uint32_t uEqId =
static_cast<uint32_t
>(msDescriptor.eq_id & 0xFFFF);
899 LOG(warning) <<
"Could not find the sDPB index for AFCK id 0x" << std::hex << uEqId << std::dec
900 <<
" component " << uMsCompIdx <<
"\n"
901 <<
"If valid this index has to be added in the TOF parameter file "
902 "in the RocIdArray field"
904 <<
"For now we remove it from the list of components analyzed";
914 if (kFALSE ==
ProcessMuchMs(ts, uMsComp, uMsIdx))
return kFALSE;
925 std::vector<stsxyter::FinalHit>::iterator itA;
934 UShort_t usAsicIdx = (*itA).GetAsic();
959 if (0 == ts.index() % 1000) {
960 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
961 Double_t dTsMsbTime =
974 LOG(info) <<
"End of TS " << std::setw(7) << ts.index() <<
" eDPB " << std::setw(2) << uDpb
977 <<
" current TS MSB time is " << std::setw(12) << dTsMsbTime <<
" s";
989 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
991 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsComp, uMsIdx));
1011 LOG(warning) <<
"Could not find the sDPB index for AFCK id 0x" << std::hex <<
fuCurrentEquipmentId << std::dec
1012 <<
" component " << uMsComp <<
"\n"
1013 <<
"If valid this index has to be added in the TOF parameter file in "
1014 "the RocIdArray field"
1016 <<
"For now we remove it from the list of components analyzed";
1024 uint32_t uSize = msDescriptor.size;
1028 <<
" has size: " << uSize;
1036 fhMsSz[uMsComp]->Fill(uSize);
1045 UInt_t uFebIdxInSyst = uFebIdxOffset + uFebIdx;
1080 uint16_t uMsHeaderFlags = msDescriptor.flags;
1081 for (UInt_t uBit = 0; uBit < 16; ++uBit)
1111 LOG(error) <<
"The input microslice buffer does NOT "
1112 <<
"contain only complete nDPB messages!";
1118 const uint32_t* pInBuff =
reinterpret_cast<const uint32_t*
>(msContent);
1120 for (uint32_t uIdx = 0; uIdx < uNbMessages; ++uIdx) {
1122 uint32_t ulData =
static_cast<uint32_t
>(pInBuff[uIdx]);
1150 if (kTRUE ==
fbMuchMode) uFebIdx = usElinkIdx;
1152 if (-1 == uFebIdx) {
1153 LOG(warning) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1154 <<
"Wrong elink Idx! Elink raw " << Form(
"%d remap %d", usElinkIdx, uFebIdx);
1174 LOG(info) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1175 <<
"EPOCH message at unexpected position in MS: message " << uIdx <<
" VS message 0 expected!";
1212 LOG(fatal) <<
"CbmMcbm2018MonitorMuchLite::DoUnpack => "
1213 <<
"Unknown message type, should never happen, stopping "
1214 "here! Type found was: "
1215 <<
static_cast<int>(typeMess);
1225 const UInt_t& uAsicIdx,
const UInt_t& uMsIdx)
1240 UInt_t uFebIdx = uAsicIdx;
1255 ActualX = 1000 - ActualX;
1256 channel = 96 - channel;
1258 LOG(debug) <<
"Module Nr " << ModuleNr <<
" Sector Nr " << sector <<
" Channel Nr " << channel <<
"Actual X "
1259 << ActualX <<
"Actual Y " << ActualY <<
"uAsicIdx " << uAsicIdx;
1334 if (constime < 10000000) {
1418 LOG(info) <<
"-------------------------------------";
1419 LOG(info) <<
"CbmMcbm2018MonitorMuchLite statistics are ";
1426 LOG(info) <<
"-------------------------------------";
1436 TFile* oldFile = gFile;
1437 TDirectory* oldDir = gDirectory;
1439 TFile* histoFile = NULL;
1440 if (
"" != sFileName) {
1442 histoFile =
new TFile(sFileName,
"RECREATE");
1447 gDirectory->mkdir(
"Much_Raw");
1448 gDirectory->cd(
"Much_Raw");
1450 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
1467 gDirectory->cd(
"..");
1471 gDirectory->mkdir(
"Much_Feb");
1472 gDirectory->cd(
"Much_Feb");
1473 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
1502 gDirectory->cd(
"..");
1507 gDirectory->mkdir(
"Flib_Raw");
1508 gDirectory->cd(
"Flib_Raw");
1510 TString sMsSzName = Form(
"MsSz_link_%02u", uLinks);
1511 if (
fHM->
Exists(sMsSzName.Data()))
fHM->
H1(sMsSzName.Data())->Write();
1513 sMsSzName = Form(
"MsSzTime_link_%02u", uLinks);
1514 if (
fHM->
Exists(sMsSzName.Data()))
fHM->
P1(sMsSzName.Data())->Write();
1519 if (
"" != sFileName) {
1526 gDirectory = oldDir;
1531 LOG(info) <<
"Reseting all Much histograms.";
1533 for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
1551 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
1583 TString sMsSzName = Form(
"MsSz_link_%02u", uLinks);
1584 if (
fHM->
Exists(sMsSzName.Data()))
fHM->
H1(sMsSzName.Data())->Reset();
1586 sMsSzName = Form(
"MsSzTime_link_%02u", uLinks);
1587 if (
fHM->
Exists(sMsSzName.Data()))
fHM->
P1(sMsSzName.Data())->Reset();
1596 TDatime* fRunStartDateTime =
new TDatime(dateIn, timeIn);
1600 LOG(info) <<
"Assigned new MUCH Run Start Date-Time: " << fRunStartDateTime->AsString();
1606 for (UInt_t uFebIdx = 0; uFebIdx <
fuNbFebs; ++uFebIdx) {
1608 LOG(info) << Form(
" ------------------ Noisy channels scan for FEB %2d ------------", uFebIdx);
1613 LOG(info) << Form(
"Noisy Channel ASIC %d channel %3d (%4d) level %6.0f", uAsicIdx, uChanIdx, uChanInFeb,
1618 LOG(info) <<
" ---------------------------------------------------------------";
ClassImp(CbmConverterManager)
Bool_t bMcbm2018ScanNoisyMuchLite
Bool_t bMcbm2018ResetMuchLite
Bool_t bMcbm2018WriteMuchLite
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.
std::vector< TH1 * > fhMuchFebHitRateEvo_mskch_adccut
std::vector< TH2 * > fhMuchFebChanRawTs
Bool_t ReInitContainers()
Int_t fiBinSizeDatePlots
Start of run time since "epoch" in s, for the plots with date as X axis.
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
std::vector< std::vector< std::vector< UShort_t > > > fvusChanLastHitAdcInMs
Last hit time in bins in each MS for each Channel.
virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId)
std::vector< stsxyter::FinalHit > fvmHitsInMs
Hits time-sorting.
void SetRunStart(Int_t dateIn, Int_t timeIn, Int_t iBinSize=5)
std::vector< TProfile * > fhMuchFebDuplicateHitProf
CbmHistManager * fHM
Coincidences in sorted hits.
TH2 * fhMuchHitsElinkPerDpb
std::map< UInt_t, UInt_t > fDpbIdIndexMap
Total number of STS DPBs in system.
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
TH2 * fhMuchMessTypePerDpb
std::vector< std::vector< ULong64_t > > fvulChanLastHitTime
stsxyter::MessagePrintMask fPrintMessCtrl
CbmMcbm2018MonitorMuchLite()
ULong64_t fulCurrentTsIdx
TS/MS info.
TH2 * fhMuchSysMessTypePerDpb
std::map< stsxyter::MessType, UInt_t > fmMsgCounter
Current data properties.
std::vector< UInt_t > fvuInitialTsMsbCycleHeader
Flag set after seeing MS header in 1st MS for DPB.
Int_t fiRunStartDateTimeSec
Index of the DPB from which the MS currently unpacked is coming.
TH1 * fhMuchFebChanAdcRaw_combined
std::vector< TH2 * > fhMuchChannelTime
ULong64_t fulCurrentMsIdx
std::vector< TH2 * > fHistPadDistr
Plots per FEB-8.
std::vector< TH1 * > fhMuchFebChanCntRaw
void FillEpochInfo(stsxyter::Message mess)
std::vector< UInt_t > fvuInitialHeaderDone
Current TS MSB cycle for DPB.
Int_t fiTimeIntervalRateUpdate
Mean Rate per channel plots.
std::vector< TH2 * > fhMuchFebADC
virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
std::vector< Double_t > fvdMsTime
Header time of previous MS per link.
std::vector< std::vector< std::vector< Double_t > > > fvdChanLastHitTimeInMs
Number of hits in each MS for each Channel.
std::vector< TH1 * > fhMuchFebSpill
std::vector< std::vector< Bool_t > > fvbCrobActiveFlag
Map of DPB Identifier to DPB index.
TString fsHistoFileFullname
void SaveAllHistos(TString sFileName="")
std::vector< TProfile * > fhMuchFebChanAdcRawProf
std::vector< UInt_t > fvuElinkLastTsHit
TS MSB cycle from MS header in 1st MS for DPB.
void FillTsMsbInfo(stsxyter::Message mess, UInt_t uMessIdx=0, UInt_t uMsIdx=0)
TH1 * fhMuchMessType
Histogram manager.
UInt_t Counter
Rate evolution histos.
TH2 * fhMsStatusFieldType
std::vector< std::vector< std::vector< UInt_t > > > fvuChanNbHitsInMs
Header time of each MS.
std::vector< TH1 * > fhMuchFebHitRateEvo
std::vector< TH1 * > fhMuchFebHitRateEvo_mskch
std::vector< TH2 * > fhMuchFebChanAdcRaw
std::vector< Bool_t > fvbMaskedComponents
TProfile * fhMsSzTime[kiMaxNbFlibLinks]
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.
Bool_t ScanForNoisyChannels(Double_t dNoiseThreshold=1e3)
---------------------------------------------------------------—///
Bool_t fbBinningFw
=> Quick and dirty hack for binning FW!!!
UInt_t fuCurrentEquipmentId
std::vector< UInt_t > fvuCurrentTsMsbCycle
Current TS MSB for each DPB.
static const UInt_t kuBytesPerMessage
std::vector< TH1 * > fhMuchFebHitRateEvo_WithoutDupli
Bool_t InitMuchParameters()
std::vector< Double_t > fvdPrevMsTime
Last hit time in ns for each Channel.
UInt_t fuMaxNbMicroslices
std::vector< std::vector< Double_t > > fdMuchFebChanLastTimeForDist
std::vector< Int_t > fviFebTimeSecLastRateUpdate
UInt_t fuNbStsXyters
Number of StsXyter ASICs.
std::vector< ULong64_t > fvulCurrentTsMsb
Bin size in s for the plots with date as X axis.
std::vector< std::vector< stsxyter::FinalHit > > fvmAsicHitsInMs
All hits (time in bins, ADC in bins, asic, channel) in last TS, sorted with "<" operator.
std::vector< size_t > fvMsComponentsList
std::vector< std::vector< Double_t > > fvdFebChanCountsSinceLastRateUpdate
static const Int_t kiMaxNbFlibLinks
Number of StsXyter ASICs.
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
virtual ~CbmMcbm2018MonitorMuchLite()
std::vector< Int_t > fviFebCountsSinceLastRateUpdate
TH2 * fhDpbMsErrors
Binning FW error flag.
std::vector< std::vector< Double_t > > fvdChanLastHitTime
Last hit time in bins for each Channel.
std::vector< TH2 * > fRealHistPadDistr
TH1 * fhMsSz[kiMaxNbFlibLinks]
std::vector< TProfile * > fhMuchFebChanHitRateProf
Long64_t prevtime_new
Last hit ADC in bins in each MS for each Channel.
std::vector< TH2 * > fhMuchFebChanDistT
Bool_t ProcessMuchMs(const fles::Timeslice &ts, size_t uMsComp, UInt_t uMsIdx)
CbmMcbm2018MuchPar * fUnpackParMuch
/** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **/
std::vector< TH2 * > fhMuchFebChanHitRateEvo
Bool_t fbPrintMessages
Task configuration values.
UInt_t fuNbFebs
Array to hold the active flag for all CROBs, [ NbDpb ][ NbCrobPerDpb ].
void FillHitInfo(stsxyter::Message mess, const UShort_t &usElinkIdx, const UInt_t &uAsicIdx, const UInt_t &uMsIdx)
Int_t ElinkIdxToFebIdx(UInt_t uElink)
static constexpr UInt_t GetNbElinkPerCrob()
Double_t GetRealPadSize(Int_t)
Short_t GetPadXA(UShort_t febid, UShort_t channelid)
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)
Short_t GetPadYA(UShort_t febid, UShort_t channelid)
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()
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