CbmRoot
CbmMcbm2018MonitorMuchLite.cxx
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmMcbm2018MonitorMuchLite -----
4 // ----- Created 11/05/18 by P.-A. Loizeau -----
5 // ----- Modified 11/05/18 by Ajit kumar -----
6 // ----- Modified 05/03/19 by Vikas Singhal -----
7 // ----- -----
8 // -----------------------------------------------------------------------------
9 
11 
12 // Data
13 
14 // CbmRoot
16 #include "CbmHistManager.h"
17 #include "CbmMcbm2018MuchPar.h"
18 
19 // FairRoot
20 #include "FairLogger.h"
21 #include "FairRootManager.h"
22 #include "FairRun.h"
23 #include "FairRunOnline.h"
24 #include "FairRuntimeDb.h"
25 
26 // Root
27 #include "TClonesArray.h"
28 #include "THttpServer.h"
29 #include "TMath.h"
30 #include "TROOT.h"
31 #include "TRandom.h"
32 #include "TString.h"
33 #include "TStyle.h"
34 #include <TFile.h>
35 
36 // C++11
37 #include <bitset>
38 
39 // C/C++
40 #include <iomanip>
41 #include <iostream>
42 #include <stdint.h>
43 
44 Bool_t bMcbm2018ResetMuchLite = kFALSE;
45 Bool_t bMcbm2018WriteMuchLite = kFALSE;
47 
48 
50  : CbmMcbmUnpack()
51  , fbMuchMode(kFALSE)
52  , fvbMaskedComponents()
53  , fvMsComponentsList()
54  , fuNbCoreMsPerTs(0)
55  , fuNbOverMsPerTs(0)
56  ,
57  //uTimeBin(1e-9),
58  fbIgnoreOverlapMs(kFALSE)
59  , fUnpackParMuch(NULL)
60  , fuNrOfDpbs(0)
61  , fDpbIdIndexMap()
62  , fvbCrobActiveFlag()
63  , fuNbFebs(0)
64  , fuNbStsXyters(0)
65  ,
66  //fvdFebAdcGain(),
67  //fvdFebAdcOffs(),
68  /*
69  fuNrOfDpbs(0),
70  fDpbIdIndexMap(),
71  fuNbStsXyters(0),
72  fUnpackParMuch->GetNbChanPerAsic()(0),
73  fuNbFebs(0),
74  */
75  fsHistoFileFullname("data/HistosMonitorMuch.root")
76  , fbPrintMessages(kFALSE)
77  , fPrintMessCtrl(stsxyter::MessagePrintMask::msg_print_Human)
78  , fulCurrentTsIdx(0)
79  , fulCurrentMsIdx(0)
80  , fmMsgCounter()
81  , fuCurrentEquipmentId(0)
82  , fuCurrDpbId(0)
83  , fuCurrDpbIdx(0)
84  , fiRunStartDateTimeSec(-1)
85  , fiBinSizeDatePlots(-1)
86  , fvulCurrentTsMsb()
87  , fvuCurrentTsMsbCycle()
88  , fvuInitialHeaderDone()
89  , fvuInitialTsMsbCycleHeader()
90  , fvuElinkLastTsHit()
91  , fvulChanLastHitTime()
92  , fvdChanLastHitTime()
93  , fvdPrevMsTime()
94  , fvdMsTime()
95  , fvuChanNbHitsInMs()
96  , fvdChanLastHitTimeInMs()
97  , fvusChanLastHitAdcInMs()
98  ,
99  // fvmChanHitsInTs(),
100  prevtime_new(0.0)
101  , prevTime(0.0)
102  , prevAsic(0.0)
103  , prevChan(0.0)
104  , fdStartTime(-1.0)
105  , fdStartTimeMsSz(-1.0)
106  , ftStartTimeUnix(std::chrono::steady_clock::now())
107  , fvmHitsInMs()
108  , fvmAsicHitsInMs()
109  , fvmFebHitsInMs()
110  , fuMaxNbMicroslices(100)
111  , fiTimeIntervalRateUpdate(10)
112  , fviFebTimeSecLastRateUpdate()
113  , fviFebCountsSinceLastRateUpdate()
114  , fvdFebChanCountsSinceLastRateUpdate()
115  ,
116  /*fbLongHistoEnable( kFALSE ),
117  fuLongHistoNbSeconds( 0 ),
118  fuLongHistoBinSizeSec( 0 ),
119  fuLongHistoBinNb( 0 ),*/
120  Counter(0)
121  , Counter1(0)
122  , fHM(new CbmHistManager())
123  , fhMuchMessType(NULL)
124  , fhMuchSysMessType(NULL)
125  , fhMuchFebChanAdcRaw_combined(NULL)
126  , fhMuchMessTypePerDpb(NULL)
127  , fhMuchSysMessTypePerDpb(NULL)
128  , fhStatusMessType(NULL)
129  , fhMsStatusFieldType(NULL)
130  , fhMuchHitsElinkPerDpb(NULL)
131  , fhRate(NULL)
132  , fhRateAdcCut(NULL)
133  , fHistPadDistr()
134  , fRealHistPadDistr()
135  , fhMuchFebChanCntRaw()
136  ,
137  //fhMuchFebChanCntRawGood(),
138  fhMuchFebChanAdcRaw()
139  , fhMuchFebChanAdcRawProf()
140  , fhMuchFebChanRawTs()
141  , fhMuchFebChanHitRateEvo()
142  , fhMuchFebChanHitRateProf()
143  ,
144  //fhMuchFebAsicHitRateEvo(),
145  fhMuchFebHitRateEvo()
146  , fhMuchFebHitRateEvo_mskch()
147  , fhMuchFebHitRateEvo_mskch_adccut()
148  , fhMuchFebHitRateEvo_WithoutDupli()
149  , fdMuchFebChanLastTimeForDist()
150  , fhMuchFebChanDistT()
151  , fhMuchFebDuplicateHitProf()
152  , fcMsSizeAll(NULL) {}
153 
154 
156 
157 
159  LOG(info) << "Initializing flib StsXyter unpacker for MUCH";
160 
161  FairRootManager* ioman = FairRootManager::Instance();
162  if (ioman == NULL) { LOG(fatal) << "No FairRootManager instance"; }
163 
164  return kTRUE;
165 }
166 
168  LOG(info) << "Setting parameter containers for " << GetName();
170  (CbmMcbm2018MuchPar*) (FairRun::Instance()->GetRuntimeDb()->getContainer(
171  "CbmMcbm2018MuchPar"));
172 }
173 
175  LOG(info) << "Init parameter containers for " << GetName();
176 
177  Bool_t bInit = InitMuchParameters();
178  if (kTRUE == bInit) CreateHistograms();
179 
180  return bInit;
181 }
182 
184  LOG(info) << "ReInit parameter containers for " << GetName();
185 
186  return InitMuchParameters();
187 }
188 
189 
191 
193  LOG(info) << "Nr. of MUCH DPBs: " << fuNrOfDpbs;
194 
195  fDpbIdIndexMap.clear();
196  for (UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb) {
197  fDpbIdIndexMap[fUnpackParMuch->GetDpbId(uDpb)] = uDpb;
198  LOG(info) << "Eq. ID for DPB #" << std::setw(2) << uDpb << " = 0x"
199  << std::setw(4) << std::hex << fUnpackParMuch->GetDpbId(uDpb)
200  << std::dec << " => "
202  } // for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
203 
205  LOG(info) << "Nr. of FEBs: " << fuNbFebs;
206 
208  LOG(info) << "Nr. of StsXyter ASICs: " << fuNbStsXyters;
209 
211  //fvdFebAdcGain.resize( fuNrOfDpbs );
212  //fvdFebAdcOffs.resize( fuNrOfDpbs );
213  for (UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb) {
215  //fvdFebAdcGain[ uDpb ].resize( fUnpackParMuch->GetNbCrobsPerDpb() );
216  //fvdFebAdcOffs[ uDpb ].resize( fUnpackParMuch->GetNbCrobsPerDpb() );
217  for (UInt_t uCrobIdx = 0; uCrobIdx < fUnpackParMuch->GetNbCrobsPerDpb();
218  ++uCrobIdx) {
219  fvbCrobActiveFlag[uDpb][uCrobIdx] =
220  fUnpackParMuch->IsCrobActive(uDpb, uCrobIdx);
221  // fvdFebAdcGain[ uDpb ][ uCrobIdx ].resize( fUnpackParMuch->GetNbFebsPerCrob(), 0.0 );
222  //fvdFebAdcOffs[ uDpb ][ uCrobIdx ].resize( fUnpackParMuch->GetNbFebsPerCrob(), 0.0 );
223  } // for( UInt_t uCrobIdx = 0; uCrobIdx < fUnpackParMuch->GetNbCrobsPerDpb(); ++uCrobIdx )
224  } // for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
225 
226  for (UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb) {
227  for (UInt_t uCrobIdx = 0; uCrobIdx < fUnpackParMuch->GetNbCrobsPerDpb();
228  ++uCrobIdx) {
229  LOG(info) << Form("DPB #%02u CROB #%02u Active: ", uDpb, uCrobIdx)
230  << fvbCrobActiveFlag[uDpb][uCrobIdx];
231  } // for( UInt_t uCrobIdx = 0; uCrobIdx < fUnpackParMuch->GetNbCrobsPerDpb(); ++uCrobIdx )
232  } // for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
233 
234  if (fbBinningFw)
235  LOG(info) << "Unpacking data in bin sorter FW mode";
236  else
237  LOG(info) << "Unpacking data in full time sorter FW mode (legacy)";
238 
239  // Internal status initialization
245  for (UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb) {
246  fvulCurrentTsMsb[uDpb] = 0;
247  fvuCurrentTsMsbCycle[uDpb] = 0;
248  fvuInitialHeaderDone[uDpb] = kFALSE;
249  fvuInitialTsMsbCycleHeader[uDpb] = 0;
250  } // for( UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb )
251 
256  fvuChanNbHitsInMs.resize(fuNbFebs);
259  fvmAsicHitsInMs.resize(fuNbFebs);
260 
261  //fvdMsTime.resize( fuMaxNbMicroslices );
262  //fvuChanNbHitsInMs.resize( fuNbStsXyters );
263  //fvdChanLastHitTimeInMs.resize( fuNbStsXyters );
264  //fvusChanLastHitAdcInMs.resize( fuNbStsXyters );
265  //fvmAsicHitsInMs.resize( fuNbStsXyters );
266 
267  for (UInt_t uXyterIdx = 0; uXyterIdx < fuNbFebs; ++uXyterIdx) {
269  fvdChanLastHitTime[uXyterIdx].resize(fUnpackParMuch->GetNbChanPerAsic());
270  fvuChanNbHitsInMs[uXyterIdx].resize(fUnpackParMuch->GetNbChanPerAsic());
271  fvdChanLastHitTimeInMs[uXyterIdx].resize(
273  fvusChanLastHitAdcInMs[uXyterIdx].resize(
275  fvmAsicHitsInMs[uXyterIdx].clear();
276 
277  for (UInt_t uChan = 0; uChan < fUnpackParMuch->GetNbChanPerAsic();
278  ++uChan) {
279  fvulChanLastHitTime[uXyterIdx][uChan] = 0;
280  fvdChanLastHitTime[uXyterIdx][uChan] = -1.0;
281 
282  fvuChanNbHitsInMs[uXyterIdx][uChan].resize(fuMaxNbMicroslices);
283  fvdChanLastHitTimeInMs[uXyterIdx][uChan].resize(fuMaxNbMicroslices);
284  fvusChanLastHitAdcInMs[uXyterIdx][uChan].resize(fuMaxNbMicroslices);
285  for (UInt_t uMsIdx = 0; uMsIdx < fuMaxNbMicroslices; ++uMsIdx) {
286  fvuChanNbHitsInMs[uXyterIdx][uChan][uMsIdx] = 0;
287  fvdChanLastHitTimeInMs[uXyterIdx][uChan][uMsIdx] = -1.0;
288  fvusChanLastHitAdcInMs[uXyterIdx][uChan][uMsIdx] = 0;
289  } // for( UInt_t uMsIdx = 0; uMsIdx < fuMaxNbMicroslices; ++uMsIdx )
290  } // for( UInt_t uChan = 0; uChan < fUnpackParMuch->GetNbChanPerAsic(); ++uChan )
291  } // for( UInt_t uXyterIdx = 0; uXyterIdx < fuNbStsXyters; ++uXyterIdx )
292 
293  LOG(info) << "CbmMcbm2018MonitorMuchLite::ReInitContainers => Changed "
294  "fvuChanNbHitsInMs size "
295  << fvuChanNbHitsInMs.size() << " VS " << fuNbFebs;
296  LOG(info) << "CbmMcbm2018MonitorMuchLite::ReInitContainers => Changed "
297  "fvuChanNbHitsInMs size "
298  << fvuChanNbHitsInMs[0].size() << " VS "
300  LOG(info) << "CbmMcbm2018MonitorMuchLite::ReInitContainers => Changed "
301  "fvuChanNbHitsInMs size "
302  << fvuChanNbHitsInMs[0][0].size() << " VS " << fuMaxNbMicroslices;
303 
304  fvmFebHitsInMs.resize(fuNbFebs);
309  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
310  fvmFebHitsInMs[uFebIdx].clear();
311  fvdFebChanCountsSinceLastRateUpdate[uFebIdx].resize(
313  fdMuchFebChanLastTimeForDist[uFebIdx].resize(
315  } // for( UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx )
316 
318  // SmxErrInitializeVariables();
320 
321  return kTRUE;
322 }
323 
325  size_t component,
326  UShort_t /*usDetectorId*/) {
328  for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
329  if (component == fvMsComponentsList[uCompIdx]) return;
330 
332  if (kiMaxNbFlibLinks <= component) {
333  LOG(error) << "CbmMcbm2018MonitorMuchLite::AddMsComponentToList => "
334  << "Ignored the addition of component " << component
335  << " as it is above the hadcoded limit of "
336  << static_cast<const Int_t>(kiMaxNbFlibLinks) << " !!!!!!!!! "
337  << "\n"
338  << " To change this behavior check kiMaxNbFlibLinks in "
339  "CbmMcbm2018MonitorMuchLite.cxx";
340  return;
341  } // if( kiMaxNbFlibLinks <= component )
342 
343 
345  fvMsComponentsList.push_back(component);
346  LOG(info)
347  << "CbmMcbm2018MonitorMuchLite::AddMsComponentToList => Added component: "
348  << component;
349 
351  if (NULL == fhMsSz[component]) {
352  TString sMsSzName = Form("MsSz_link_%02lu", component);
353  TString sMsSzTitle =
354  Form("Size of MS for nDPB of link %02lu; Ms Size [bytes]", component);
355  fhMsSz[component] =
356  new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 160000, 0., 20000.);
357  fHM->Add(sMsSzName.Data(), fhMsSz[component]);
358 
359  sMsSzName = Form("MsSzTime_link_%02lu", component);
360  sMsSzTitle = Form(
361  "Size of MS vs time for gDPB of link %02lu; Time[s] ; Ms Size [bytes]",
362  component);
363  fhMsSzTime[component] =
364  new TProfile(sMsSzName.Data(), sMsSzTitle.Data(), 15000, 0., 300.);
365  fHM->Add(sMsSzName.Data(), fhMsSzTime[component]);
366 
367  if (NULL != fcMsSizeAll) {
368  fcMsSizeAll->cd(1 + component);
369  gPad->SetLogy();
370  fhMsSzTime[component]->Draw("hist le0");
371  } // if( NULL != fcMsSizeAll )
372  LOG(info) << "Added MS size histo for component: " << component << " (DPB)";
373 
374  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
375  if (server) {
376  server->Register("/FlibRaw", fhMsSz[component]);
377  server->Register("/FlibRaw", fhMsSzTime[component]);
378  } // if( server )
379  } // if( NULL == fhMsSz[ component ] )
380 }
381 
383  size_t uOverlapMsNb) {
384  fuNbCoreMsPerTs = uCoreMsNb;
385  fuNbOverMsPerTs = uOverlapMsNb;
386  //LOG(info) <<" fuNbCoreMsPerTs "<<fuNbCoreMsPerTs<<" fuNbOverMsPerTs "<<fuNbOverMsPerTs;
387  UInt_t uNbMsTotal = fuNbCoreMsPerTs + fuNbOverMsPerTs;
388 
389  if (fuMaxNbMicroslices < uNbMsTotal) {
390  fuMaxNbMicroslices = uNbMsTotal;
391 
396  for (UInt_t uXyterIdx = 0; uXyterIdx < fuNbStsXyters; ++uXyterIdx) {
397  fvuChanNbHitsInMs[uXyterIdx].resize(fUnpackParMuch->GetNbChanPerAsic());
398  fvdChanLastHitTimeInMs[uXyterIdx].resize(
400  fvusChanLastHitAdcInMs[uXyterIdx].resize(
402  for (UInt_t uChan = 0; uChan < fUnpackParMuch->GetNbChanPerAsic();
403  ++uChan) {
404  fvuChanNbHitsInMs[uXyterIdx][uChan].resize(fuMaxNbMicroslices);
405  fvdChanLastHitTimeInMs[uXyterIdx][uChan].resize(fuMaxNbMicroslices);
406  fvusChanLastHitAdcInMs[uXyterIdx][uChan].resize(fuMaxNbMicroslices);
407  for (UInt_t uMsIdx = 0; uMsIdx < fuMaxNbMicroslices; ++uMsIdx) {
408  fvuChanNbHitsInMs[uXyterIdx][uChan][uMsIdx] = 0;
409  fvdChanLastHitTimeInMs[uXyterIdx][uChan][uMsIdx] = -1.0;
410  fvusChanLastHitAdcInMs[uXyterIdx][uChan][uMsIdx] = 0;
411  } // for( UInt_t uMsIdx = 0; uMsIdx < fuMaxNbMicroslices; ++uMsIdx )
412  } // for( UInt_t uChan = 0; uChan < fUnpackParMuch->GetNbChanPerAsic(); ++uChan )
413  } // for( UInt_t uXyterIdx = 0; uXyterIdx < fuNbStsXyters; ++uXyterIdx )
414  LOG(info) << "CbmMcbm2018MonitorMuchLite::DoUnpack => Changed "
415  "fvuChanNbHitsInMs size "
416  << fvuChanNbHitsInMs.size() << " VS " << fuNbStsXyters;
417  LOG(info) << "CbmMcbm2018MonitorMuchLite::DoUnpack => Changed "
418  "fvuChanNbHitsInMs size "
419  << fvuChanNbHitsInMs[0].size() << " VS "
421  LOG(info) << "CbmMcbm2018MonitorMuchLite::DoUnpack => Changed "
422  "fvuChanNbHitsInMs size "
423  << fvuChanNbHitsInMs[0][0].size() << " VS " << fuMaxNbMicroslices;
424  } // if( fuMaxNbMicroslices < uNbMsTotal )
425 }
426 
428  TString sHistName {""};
429  TString title {""};
430 
431  sHistName = "hMessageType";
432  title = "Nb of message for each type; Type";
433  fhMuchMessType = new TH1I(sHistName, title, 6, 0., 6.);
434  fhMuchMessType->GetXaxis()->SetBinLabel(1, "Dummy");
435  fhMuchMessType->GetXaxis()->SetBinLabel(2, "Hit");
436  fhMuchMessType->GetXaxis()->SetBinLabel(3, "TsMsb");
437  fhMuchMessType->GetXaxis()->SetBinLabel(4, "Epoch");
438  fhMuchMessType->GetXaxis()->SetBinLabel(5, "Status");
439  fhMuchMessType->GetXaxis()->SetBinLabel(6, "Empty");
440 
441 
442  sHistName = "hSysMessType";
443  title = "Nb of system message for each type; System Type";
444  fhMuchSysMessType = new TH1I(sHistName, title, 17, 0., 17.);
445 
446  sHistName = "hMuchFebChanAdcRaw_combined";
447  title = "ADC hist combined";
448  fhMuchFebChanAdcRaw_combined = new TH1I(sHistName,
449  title,
451  -0.5,
453 
454  LOG(debug) << "Initialized 1st Histo";
455  sHistName = "hMessageTypePerDpb";
456  title = "Nb of message of each type for each DPB; DPB; Type";
458  new TH2I(sHistName, title, fuNrOfDpbs, 0, fuNrOfDpbs, 6, 0., 6.);
459  fhMuchMessTypePerDpb->GetYaxis()->SetBinLabel(1, "Dummy");
460  fhMuchMessTypePerDpb->GetYaxis()->SetBinLabel(2, "Hit");
461  fhMuchMessTypePerDpb->GetYaxis()->SetBinLabel(3, "TsMsb");
462  fhMuchMessTypePerDpb->GetYaxis()->SetBinLabel(4, "Epoch");
463  fhMuchMessTypePerDpb->GetYaxis()->SetBinLabel(5, "Status");
464  fhMuchMessTypePerDpb->GetYaxis()->SetBinLabel(6, "Empty");
465 
466  for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
468  sHistName = Form("HistPadDistr_Module_%01u", uModuleId);
469  title = Form("Pad distribution for, Module #%01u; ", uModuleId);
470 
471  //Below for Rectangular Module shape VS
472  fHistPadDistr.push_back(
473  new TH2I(sHistName, title, 23, -0.5, 22.5, 97, -0.5, 96.5));
474 
475  sHistName = Form("RealHistPadDistr_Module_%01u", uModuleId);
476  title = Form("Progressive Pad distribution for, Module #%01u; ", uModuleId);
477  //Below for Progressive Geometry Module shape VS
478  fRealHistPadDistr.push_back(
479  new TH2D(sHistName, title, 500, -0.5, 499.5, 1000, -0.5, 999.5));
480 
481 
483  sHistName = Form("hMuchFebDuplicateHitProf_%01u", uModuleId);
484  title = Form("FEB wise Duplicate Hit for Module #%01u; FEB []; Hit []",
485  uModuleId);
486  if (uModuleId == 0)
487  //fhMuchFebDuplicateHitProf.push_back( new TProfile(sHistName, title,fUnpackParMuch->GetNrOfFebsInGemA(), -0.5, fUnpackParMuch->GetNrOfFebsInGemA() - 0.5 ) );
488  fhMuchFebDuplicateHitProf.push_back(
489  new TProfile(sHistName, title, 18, -0.5, 18 - 0.5));
490  if (uModuleId == 1)
491  //fhMuchFebDuplicateHitProf.push_back( new TProfile(sHistName, title,fUnpackParMuch->GetNrOfFebsInGemB(), -0.5, fUnpackParMuch->GetNrOfFebsInGemB() - 0.5 ) );
492  fhMuchFebDuplicateHitProf.push_back(
493  new TProfile(sHistName, title, 18, -0.5, 18 - 0.5));
494  }
495 
496  sHistName = "hRate";
497  title = "Rate in kHz";
498  fhRate = new TH1I(sHistName, title, 10000, -0.5, 9999.5);
499 
500  sHistName = "hRateAdcCut";
501  title = "Rate in kHz with Adc cut";
502  fhRateAdcCut = new TH1I(sHistName, title, 10000, -0.5, 9999.5);
503 
504 
505  sHistName = "hFEBcount";
506  title = "Count vs FEB number; FEB Number; Count";
507  fhFEBcount = new TH1I(sHistName, title, 40, -0.5, 39.5);
508 
509 
510  sHistName = "hSysMessTypePerDpb";
511  title = "Nb of system message of each type for each DPB; DPB; System Type";
513  new TH2I(sHistName, title, fuNrOfDpbs, 0, fuNrOfDpbs, 17, 0., 17.);
514 
515  sHistName = "hStatusMessType";
516  title = "Nb of status message of each type for each DPB; ASIC; Status Type";
518  new TH2I(sHistName, title, fuNbStsXyters, 0, fuNbStsXyters, 16, 0., 16.);
519 
520 
521  sHistName = "hMsStatusFieldType";
522  title =
523  "For each flag in the MS header, ON/OFF counts; Flag bit []; ON/OFF; MS []";
525  new TH2I(sHistName, title, 16, -0.5, 15.5, 2, -0.5, 1.5);
526 
527  //For mCBM March 2019 data taking we will have only one eLink enable for each FEB
528  sHistName = "hMuchHitsElinkPerDpb";
529  title = "Nb of hit messages per eLink for each DPB; DPB; eLink; Hits nb []";
531  new TH2I(sHistName, title, fuNrOfDpbs, 0, fuNrOfDpbs, 42, 0., 42.);
532 
533  LOG(debug) << "Initialized 2nd Histo";
534  /*
535  // Number of rate bins =
536  // 9 for the sub-unit decade
537  // + 9 for each unit of each decade * 10 for the subdecade range
538  // + 1 for the closing bin top edge
539  const Int_t iNbDecadesRate = 9;
540  const Int_t iNbStepsDecade = 9;
541  const Int_t iNbSubStepsInStep = 10;
542  const Int_t iNbBinsRate = iNbStepsDecade
543  + iNbStepsDecade * iNbSubStepsInStep * iNbDecadesRate
544  + 1;
545  Double_t dBinsRate[iNbBinsRate];
546  // First fill sub-unit decade
547  for( Int_t iSubU = 0; iSubU < iNbStepsDecade; iSubU ++ )
548  dBinsRate[ iSubU ] = 0.1 * ( 1 + iSubU );
549  std::cout << std::endl;
550  // Then fill the main decades
551  Double_t dSubstepSize = 1.0 / iNbSubStepsInStep;
552  for( Int_t iDecade = 0; iDecade < iNbDecadesRate; iDecade ++)
553  {
554  Double_t dBase = std::pow( 10, iDecade );
555  Int_t iDecadeIdx = iNbStepsDecade
556  + iDecade * iNbStepsDecade * iNbSubStepsInStep;
557  for( Int_t iStep = 0; iStep < iNbStepsDecade; iStep++ )
558  {
559  Int_t iStepIdx = iDecadeIdx + iStep * iNbSubStepsInStep;
560  for( Int_t iSubStep = 0; iSubStep < iNbSubStepsInStep; iSubStep++ )
561  {
562  dBinsRate[ iStepIdx + iSubStep ] = dBase * (1 + iStep)
563  + dBase * dSubstepSize * iSubStep;
564  } // for( Int_t iSubStep = 0; iSubStep < iNbSubStepsInStep; iSubStep++ )
565  } // for( Int_t iStep = 0; iStep < iNbStepsDecade; iStep++ )
566  } // for( Int_t iDecade = 0; iDecade < iNbDecadesRate; iDecade ++)
567  dBinsRate[ iNbBinsRate - 1 ] = std::pow( 10, iNbDecadesRate );
568 */
569  LOG(debug) << "Initialized 3rd Histo";
571  //UInt_t uAlignedLimit = fuLongHistoNbSeconds - (fuLongHistoNbSeconds % fuLongHistoBinSizeSec);
572  // UInt_t uAlignedLimit = 0;
573 
574  // UInt_t uNbBinEvo = (32768 + 1) * 2;
575  // Double_t dMaxEdgeEvo = stsxyter::kdClockCycleNs
576  // * static_cast< Double_t >( uNbBinEvo ) / 2.0;
577  // Double_t dMinEdgeEvo = dMaxEdgeEvo * -1.0;
578 
579  //UInt_t uNbBinDt = static_cast<UInt_t>( (fdCoincMax - fdCoincMin )/stsxyter::kdClockCycleNs );
580 
581  // Miscroslice properties histos
582  for (Int_t component = 0; component < kiMaxNbFlibLinks; component++) {
583  fhMsSz[component] = NULL;
584  fhMsSzTime[component] = NULL;
585  } // for( Int_t component = 0; component < kiMaxNbFlibLinks; component ++ )
586 
588  // fhMuchFebChanDtCoinc.resize( fuNbFebs );
589  // fhMuchFebChanCoinc.resize( fuNbFebs );
590  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
592  sHistName = Form("hMuchFebChanCntRaw_%03u", uFebIdx);
593  title =
594  Form("Hits Count per channel, FEB #%03u; Channel; Hits []", uFebIdx);
595  fhMuchFebChanCntRaw.push_back(
596  new TH1I(sHistName,
597  title,
599  -0.5,
600  fUnpackParMuch->GetNbChanPerFeb() - 0.5));
601 
602  //sHistName = Form( "hMuchFebChanCntRawGood_%03u", uFebIdx );
603  //title = Form( "Hits Count per channel in good MS (SX2 bug flag off), FEB #%03u; Channel; Hits []", uFebIdx );
604  //fhMuchFebChanCntRawGood.push_back( new TH1I(sHistName, title,
605  // fUnpackParMuch->GetNbChanPerFeb(), -0.5, fUnpackParMuch->GetNbChanPerFeb() - 0.5 ) );
606 
607  sHistName = Form("fhMuchFebSpill_%03u", uFebIdx);
608  title =
609  Form("Time distribution of hits, FEB #%03u; Time ; Counts ", uFebIdx);
610  fhMuchFebSpill.push_back(new TH1I(sHistName, title, 1000, 0, 1000));
611 
612 
613  sHistName = Form("hMuchChannelTime_FEB%03u", uFebIdx);
614  title = Form("Time vs Channel, FEB #%03u; TIME(s) ; CHANNEL ", uFebIdx);
615  fhMuchChannelTime.push_back(
616  new TH2I(sHistName, title, 1000, 0, 1000, 129, -0.5, 128.5));
617 
618 
619  sHistName = Form("hMuchFebADC_%03u", uFebIdx);
620  title = Form("CHANNEL vs ADC, FEB #%03u; CHANNEL ; ADC ", uFebIdx);
621  fhMuchFebADC.push_back(
622  new TH2I(sHistName, title, 129, -0.5, 128.5, 34, -0.5, 33.5));
623 
624 
626  sHistName = Form("hMuchFebChanAdcRaw_%03u", uFebIdx);
627  title = Form("Raw Adc distribution per channel, FEB #%03u; Channel []; Adc "
628  "[]; Hits []",
629  uFebIdx);
630  fhMuchFebChanAdcRaw.push_back(
631  new TH2I(sHistName,
632  title,
634  -0.5,
637  -0.5,
638  stsxyter::kuHitNbAdcBins - 0.5));
639 
641  sHistName = Form("hMuchFebChanAdcRawProfc_%03u", uFebIdx);
642  title = Form("Raw Adc prodile per channel, FEB #%03u; Channel []; Adc []",
643  uFebIdx);
644  fhMuchFebChanAdcRawProf.push_back(
645  new TProfile(sHistName,
646  title,
648  -0.5,
649  fUnpackParMuch->GetNbChanPerFeb() - 0.5));
650 
652  //sHistName = Form( "hMuchFebChanAdcCal_%03u", uFebIdx );
653  //title = Form( "Cal. Adc distribution per channel, FEB #%03u; Channel []; Adc [e-]; Hits []", uFebIdx );
654  //fhMuchFebChanAdcCal.push_back( new TH2I(sHistName, title,
655  // fUnpackParMuch->GetNbChanPerFeb(), -0.5, fUnpackParMuch->GetNbChanPerFeb() - 0.5,
656  // 50, 0., 100000. ) );
657 
659  //sHistName = Form( "hMuchFebChanAdcCalProfc_%03u", uFebIdx );
660  //title = Form( "Cal. Adc prodile per channel, FEB #%03u; Channel []; Adc [e-]", uFebIdx );
661  //fhMuchFebChanAdcCalProf.push_back( new TProfile(sHistName, title,
662  // fUnpackParMuch->GetNbChanPerFeb(), -0.5, fUnpackParMuch->GetNbChanPerFeb() - 0.5 ) );
663 
665  sHistName = Form("hMuchFebChanRawTs_%03u", uFebIdx);
666  title = Form("Raw Timestamp distribution per channel, FEB #%03u; Channel "
667  "[]; Ts []; Hits []",
668  uFebIdx);
669  fhMuchFebChanRawTs.push_back(
670  new TH2I(sHistName,
671  title,
673  -0.5,
676  -0.5,
677  stsxyter::kuHitNbTsBins - 0.5));
678 
680  sHistName = Form("hMuchFebChanRateEvo_%03u", uFebIdx);
681  title = Form(
682  "Hits per second & channel in FEB #%03u; Time [s]; Channel []; Hits []",
683  uFebIdx);
684  fhMuchFebChanHitRateEvo.push_back(
685  new TH2I(sHistName,
686  title,
687  1800,
688  0,
689  1800,
691  -0.5,
692  fUnpackParMuch->GetNbChanPerFeb() - 0.5));
693 
695  sHistName = Form("hMuchFebChanRateProf_%03u", uFebIdx);
696  title = Form(
697  "Hits per second for each channel in FEB #%03u; Channel []; Hits/s []",
698  uFebIdx);
699  fhMuchFebChanHitRateProf.push_back(
700  new TProfile(sHistName,
701  title,
703  -0.5,
704  fUnpackParMuch->GetNbChanPerFeb() - 0.5));
705 
707  // sHistName = Form( "hMuchFebAsicRateEvo_%03u", uFebIdx );
708  // title = Form( "Hits per second & StsXyter in FEB #%03u; Time [s]; Asic []; Hits []", uFebIdx );
709  // fhMuchFebAsicHitRateEvo.push_back( new TH2I( sHistName, title, 1800, 0, 1800,
710  // fUnpackParMuch->GetNbAsicsPerFeb(), -0.5, fUnpackParMuch->GetNbAsicsPerFeb() - 0.5 ) );
711 
713  sHistName = Form("hMuchFebRateEvo_%03u", uFebIdx);
714  title = Form("Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
715  fhMuchFebHitRateEvo.push_back(new TH1I(sHistName, title, 1800, 0, 1800));
716 
717 
719  sHistName = Form("hMuchFebRateEvo_mskch_%03u", uFebIdx);
720  title = Form("Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
721  fhMuchFebHitRateEvo_mskch.push_back(
722  new TH1I(sHistName, title, 1800, 0, 1800));
723 
725  sHistName = Form("hMuchFebRateEvo_mskch_adcut_%03u", uFebIdx);
726  title = Form("Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
728  new TH1I(sHistName, title, 1800, 0, 1800));
729 
731  sHistName = Form("hMuchFebRateEvo_WithoutDupli_%03u", uFebIdx);
732  title = Form("Hits per second in FEB #%03u; Time [s]; Hits []", uFebIdx);
734  new TH1I(sHistName, title, 50000, 0, 5000));
735 
737  //sHistName = Form( "hMuchFebChanRateEvoLong_%03u", uFebIdx );
738  //title = Form( "Hits per second & channel in FEB #%03u; Time [min]; Channel []; Hits []", uFebIdx );
739  //fhMuchFebChanHitRateEvoLong.push_back( new TH2D( sHistName, title,
740  // fuLongHistoBinNb, -0.5, uAlignedLimit - 0.5,
741  // fUnpackParMuch->GetNbChanPerFeb(), -0.5, fUnpackParMuch->GetNbChanPerFeb() - 0.5 ) );
742 
744  //sHistName = Form( "hMuchFebAsicRateEvoLong_%03u", uFebIdx );
745  //title = Form( "Hits per second & StsXyter in FEB #%03u; Time [min]; Asic []; Hits []", uFebIdx );
746  //fhMuchFebAsicHitRateEvoLong.push_back( new TH2D( sHistName, title,
747  // fuLongHistoBinNb, -0.5, uAlignedLimit - 0.5,
748  // fUnpackParMuch->GetNbAsicsPerFeb(), -0.5, fUnpackParMuch->GetNbAsicsPerFeb() - 0.5 ) );
749 
751  //sHistName = Form( "hMuchFebRateEvoLong_%03u", uFebIdx );
752  //title = Form( "Hits per second in FEB #%03u; Time [min]; Hits []", uFebIdx );
753  //fhMuchFebHitRateEvoLong.push_back( new TH1D(sHistName, title,
754  // fuLongHistoBinNb, -0.5, uAlignedLimit - 0.5 ) );
755 
757  sHistName = Form("hMuchFebChanDistT_%03u", uFebIdx);
758  title = Form("Time distance between hits on same channel in between FEB "
759  "#%03u; Time difference [ns]; Channel []; ",
760  uFebIdx);
761  fhMuchFebChanDistT.push_back(
762  new TH2I(sHistName,
763  title,
764  1000,
765  -0.5,
766  6250.0 - 0.5,
768  -0.5,
769  fUnpackParMuch->GetNbChanPerFeb() - 0.5));
770 
771  } // for( UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx )
772 
774  fhDpbMsErrors = new TH2I("fhDpbMsErrors",
775  "; DPB []; Error type []; Counts []",
776  fuNrOfDpbs,
777  0,
778  fuNrOfDpbs,
779  4,
780  -0.5,
781  3.5);
783 
784  // Miscroslice properties histos
785  for (Int_t component = 0; component < kiMaxNbFlibLinks; component++) {
786  fhMsSz[component] = NULL;
787  fhMsSzTime[component] = NULL;
788  } // for( Int_t component = 0; component < kiMaxNbFlibLinks; component ++ )
789 
790  LOG(debug) << "Initialized 6th Histo before FairRunOnlne Instance";
791  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
792  if (server) {
793  for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
794  // server->Register("/MuchRaw", fHistPadDistr[uModuleId] );
795  // server->Register("/MuchRaw", fRealHistPadDistr[uModuleId] );
796  // server->Register("/MuchFeb", fhMuchFebDuplicateHitProf[uModuleId] );
797  }
798 
799  // server->Register("/MuchRaw", fhRate );
800  // server->Register("/MuchRaw", fhRateAdcCut );
801  server->Register("/MuchRaw", fhFEBcount);
802  server->Register("/MuchRaw", fhMuchMessType);
803  // server->Register("/MuchRaw", fhMuchSysMessType );
804  server->Register("/MuchRaw", fhMuchMessTypePerDpb);
805  server->Register("/MuchRaw", fhMuchSysMessTypePerDpb);
806  // server->Register("/MuchRaw", fhStatusMessType );
807  server->Register("/MuchRaw", fhMsStatusFieldType);
808  server->Register("/MuchRaw", fhMuchHitsElinkPerDpb);
809  server->Register("/MuchRaw", fhMuchFebChanAdcRaw_combined);
810  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
811  if (kTRUE == fUnpackParMuch->IsFebActive(uFebIdx)) {
812  server->Register("/MuchFeb", fhMuchFebChanCntRaw[uFebIdx]);
813  server->Register("/MuchFeb", fhMuchFebSpill[uFebIdx]);
814  server->Register("/MuchFeb", fhMuchFebADC[uFebIdx]);
815  server->Register("/MuchFeb", fhMuchChannelTime[uFebIdx]);
816 
817  //server->Register("/MuchFeb", fhMuchFebChanCntRawGood[ uFebIdx ] );
819  // server->Register("/MuchFeb", fhMuchFebChanAdcRawProf[ uFebIdx ] );
820  //server->Register("/MuchFeb", fhMuchFebChanAdcCal[ uFebIdx ] );
821  //server->Register("/MuchFeb", fhMuchFebChanAdcCalProf[ uFebIdx ] );
823  //server->Register("/MuchFeb", fhMuchFebChanHitRateEvo[ uFebIdx ] );
824  // server->Register("/MuchFeb", fhMuchFebChanHitRateProf[ uFebIdx ] );
825  //server->Register("/MuchFeb", fhMuchFebAsicHitRateEvo[ uFebIdx ] );
826  // server->Register("/MuchFeb", fhMuchFebHitRateEvo[ uFebIdx ] );
828  // server->Register("/MuchFeb", fhMuchFebHitRateEvo_mskch_adccut[ uFebIdx ] );
829  // server->Register("/MuchFeb", fhMuchFebHitRateEvo_WithoutDupli[ uFebIdx ] );
830  LOG(debug) << "Initialized fhMuchFebHitRateEvo_WithoutDupli number "
831  << uFebIdx;
832  /*server->Register("/MuchFeb", fhMuchFebChanHitRateEvoLong[ uFebIdx ] );
833  server->Register("/MuchFeb", fhMuchFebAsicHitRateEvoLong[ uFebIdx ] );
834  server->Register("/MuchFeb", fhMuchFebHitRateEvoLong[ uFebIdx ] );
835  server->Register("/MuchFeb", fhMuchFebChanDistT[ uFebIdx ] );*/
836 
837  } // if( kTRUE == fUnpackParMuch->IsFebActive( uFebIdx ) )
838  server->Register("/MuchRaw", fhDpbMsErrors);
839  } // for( UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx )
840 
841  LOG(debug) << "Initialized FEB 8th Histo";
842  server->RegisterCommand("/Reset_All", "bMcbm2018ResetMuchLite=kTRUE");
843  server->RegisterCommand("/Write_All", "bMcbm2018WriteMuchLite=kTRUE");
844  server->RegisterCommand("/ScanNoisyCh", "bMcbm2018ScanNoisyMuchLite=kTRUE");
845  server->Restrict("/Reset_All", "allow=admin");
846  server->Restrict("/Write_All", "allow=admin");
847  server->Restrict("/ScanNoisyCh", "allow=admin");
848  } // if( server )
849 
850  LOG(debug) << "Initialized All Histos 8th Histo";
852  Double_t w = 10;
853  Double_t h = 10;
854  LOG(debug) << "Initialized 7th Histo before Summary per FEB";
855 
856  TCanvas* cChannel = new TCanvas(Form("CHANNELS"),
857  Form("CHANNELS")); //,
858  // w, h);
859  cChannel->Divide(4, 9);
860  // Summary per FEB
861  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
862  if (kTRUE == fUnpackParMuch->IsFebActive(uFebIdx)) {
863  cChannel->cd(uFebIdx + 1);
865  // gPad->SetGridy();
866  gPad->SetLogy();
867  fhMuchFebChanCntRaw[uFebIdx]->Draw();
868 
869  } // if( kTRUE == fUnpackParMuch->IsFebActive( uFebIdx ) )
870  } // for( UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx )
871 
872  server->Register("/canvases", cChannel);
873  //All Feb hit rate together on one Canvas
874 
875  TCanvas* cspill = new TCanvas(Form("SPILLS"), Form("SPILLS")); //,w, h);
876  cspill->Divide(4, 9);
877 
878  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
879  if (kTRUE == fUnpackParMuch->IsFebActive(uFebIdx)) {
880  UInt_t flPad = 1 + uFebIdx;
881  cspill->cd(flPad);
882  //gPad->SetGridx();
883  //gPad->SetGridy();
884  // gPad->SetLogy();
885  fhMuchFebSpill[uFebIdx]->Draw();
886  }
887  // server->Register("/canvases", cspill);
888  }
889  server->Register("/canvases", cspill);
890 
891  TCanvas* cadc = new TCanvas(Form("ADC"), Form("ADC"), w, h);
892  cadc->Divide(4, 9);
893 
894  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
895  if (kTRUE == fUnpackParMuch->IsFebActive(uFebIdx)) {
896  UInt_t flPad = 1 + uFebIdx;
897  cadc->cd(flPad);
898  //gPad->SetGridx();
899  //gPad->SetGridy();
900  //gPad->SetLogy();
901  fhMuchFebADC[uFebIdx]->Draw("colz");
902  }
903  }
904  server->Register("/canvases", cadc);
905 
906  TCanvas* cChanneltime =
907  new TCanvas(Form("ChannelvsTime"), Form("ChannelvsTime"), w, h);
908  cChanneltime->Divide(4, 9);
909 
910  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
911  if (kTRUE == fUnpackParMuch->IsFebActive(uFebIdx)) {
912  UInt_t flPad = 1 + uFebIdx;
913  cChanneltime->cd(flPad);
914  //gPad->SetGridx();
915  //gPad->SetGridy();
916  //gPad->SetLogy();
917  fhMuchChannelTime[uFebIdx]->Draw("colz");
918  }
919  }
920  server->Register("/canvases", cChanneltime);
921  //====================================================================//
922  LOG(debug) << "Initialized Last Histo before exiting CreateHistograms";
923  //====================================================================//
925  // Try to recover canvas in case it was created already by another monitor
926  // If not existing, create it
927  fcMsSizeAll = dynamic_cast<TCanvas*>(gROOT->FindObject("cMsSizeAll"));
928  if (NULL == fcMsSizeAll) {
929  fcMsSizeAll = new TCanvas("cMsSizeAll",
930  "Evolution of MS size in last 300 s"); //, w, h);
931  fcMsSizeAll->Divide(1, 8);
932  LOG(info) << "Created MS size canvas in Much monitor";
933  server->Register("/canvases", fcMsSizeAll);
934  } // if( NULL == fcMsSizeAll )
935  else
936  LOG(info) << "Recovered MS size canvas in Much monitor";
937  //====================================================================//
938 
939  /*****************************/
940 }
941 
942 Bool_t CbmMcbm2018MonitorMuchLite::DoUnpack(const fles::Timeslice& ts,
943  size_t component) {
945  ResetAllHistos();
946  bMcbm2018ResetMuchLite = kFALSE;
947  } // if( bMcbm2018ResetMuchLite )
950  bMcbm2018WriteMuchLite = kFALSE;
951  } // if( bMcbm2018WriteMuchLite )
955  } // if( bMcbm2018WriteMuchLite )
956 
957  LOG(debug) << "Timeslice contains " << ts.num_microslices(component)
958  << " microslices.";
959  fulCurrentTsIdx = ts.index();
960 
961  // Ignore overlap ms if flag set by user
962  UInt_t uNbMsLoop = fuNbCoreMsPerTs;
963  if (kFALSE == fbIgnoreOverlapMs) uNbMsLoop += fuNbOverMsPerTs;
964 
965  //LOG(info) <<" uNbMsLoop "<<uNbMsLoop;
966  // Loop over core microslices (and overlap ones if chosen)
967  for (UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx++) {
968  // Double_t dMsTime = (1e-9) * static_cast<double>( ts.descriptor( fvMsComponentsList[ 0 ], uMsIdx ).idx );
969 
970  if (0 == fulCurrentTsIdx && 0 == uMsIdx) {
971  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
972  ++uMsCompIdx) {
973  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
974  auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
975  /*
976  LOG(info) << "hi hv eqid flag si sv idx/start crc size offset";
977  LOG(info) << Form( "%02x %02x %04x %04x %02x %02x %016llx %08x %08x %016llx",
978  static_cast<unsigned int>(msDescriptor.hdr_id),
979  static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
980  static_cast<unsigned int>(msDescriptor.sys_id),
981  static_cast<unsigned int>(msDescriptor.sys_ver), msDescriptor.idx, msDescriptor.crc,
982  msDescriptor.size, msDescriptor.offset );
983 */
984  LOG(info) << FormatMsHeaderPrintout(msDescriptor);
985  uint32_t uEqId = static_cast<uint32_t>(msDescriptor.eq_id & 0xFFFF);
986  auto it = fDpbIdIndexMap.find(uEqId);
987  if (fDpbIdIndexMap.end() == it) {
988  LOG(warning)
989  << "Could not find the sDPB index for AFCK id 0x" << std::hex
990  << uEqId << std::dec << " component " << uMsCompIdx << "\n"
991  << "If valid this index has to be added in the TOF parameter file "
992  "in the RocIdArray field"
993  << "\n"
994  << "For now we remove it from the list of components analyzed";
995  } // if( fDpbIdIndexMap.end() == it )
996  } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
997  } // if( 0 == fulCurrentTsIndex && 0 == uMsIdx )
998 
999 
1000  // Loop over registered components
1001  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
1002  ++uMsCompIdx) {
1003  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
1004 
1005  if (kFALSE == ProcessMuchMs(ts, uMsComp, uMsIdx)) return kFALSE;
1006 
1007  } // for( UInt_t uMsComp = 0; uMsComp < fvMsComponentsList.size(); ++uMsComp )
1008 
1010  // Sort the buffer of hits
1011  std::sort(fvmHitsInMs.begin(), fvmHitsInMs.end());
1012 
1013  // Time differences plotting using the fully time sorted hits
1014  if (0 < fvmHitsInMs.size()) {
1015  // ULong64_t ulLastHitTime = ( *( fvmHitsInMs.rbegin() ) ).GetTs();
1016  std::vector<stsxyter::FinalHit>::iterator itA;
1017  std::vector<stsxyter::FinalHit>::iterator itB;
1018 
1019  // std::chrono::steady_clock::time_point tNow = std::chrono::steady_clock::now();
1020  // Double_t dUnixTimeInRun = std::chrono::duration_cast< std::chrono::seconds >(tNow - ftStartTimeUnix).count();
1021  //LOG(info) <<" ulLastHitTime "<<ulLastHitTime<<" dUnixTimeInRun "<<dUnixTimeInRun;
1022  for (
1023  itA = fvmHitsInMs.begin(); itA != fvmHitsInMs.end();
1024  // itA != fvmHitsInMs.end() && (*itA).GetTs() < ulLastHitTime - 320; // 320 * 3.125 ns = 1000 ns
1025  ++itA) {
1026  UShort_t usAsicIdx = (*itA).GetAsic();
1027  // UShort_t usChanIdx = (*itA).GetChan();
1028  // ULong64_t ulHitTs = (*itA).GetTs();
1029  // UShort_t usHitAdc = (*itA).GetAdc();
1030  UShort_t usFebIdx = usAsicIdx / fUnpackParMuch->GetNbAsicsPerFeb();
1031  // UShort_t usAsicInFeb = usAsicIdx % fUnpackParMuch->GetNbAsicsPerFeb();
1032  //LOG(info) <<" usAsicIdx "<<usAsicIdx<<" usChanIdx "<<usChanIdx<<" ulHitTs "<<ulHitTs<<" usHitAdc "<<usHitAdc<<" usFebIdx "<<usFebIdx<<" usAsicInFeb "<<usAsicInFeb;
1033  // Double_t dTimeSinceStartSec = (ulHitTs * stsxyter::kdClockCycleNs - fdStartTime)* 1e-9;
1034  //LOG(info) <<" dTimeSinceStartSec "<<dTimeSinceStartSec;
1035  fvmAsicHitsInMs[usAsicIdx].push_back((*itA));
1036  fvmFebHitsInMs[usFebIdx].push_back((*itA));
1037  } // loop on time sorted hits and split per asic/feb
1038 
1039  // Remove all hits which were already used
1040  fvmHitsInMs.erase(fvmHitsInMs.begin(), itA);
1042  // fvmFebHitsInMs[ uFebIdx ].clear();
1043  //} // for( UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx )
1044  } // if( 0 < fvmHitsInMs.size() )
1045  } // for( UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx ++ )
1046 
1047  for (UInt_t uMsIdx = 0; uMsIdx < fuMaxNbMicroslices; ++uMsIdx) {
1048  fvdMsTime[uMsIdx] = 0.0;
1049  } // for( UInt_t uMsIdx = 0; uMsIdx < fuMaxNbMicroslices; ++uMsIdx )
1050 
1051  if (0 == ts.index() % 1000) {
1052  for (UInt_t uDpb = 0; uDpb < fuNrOfDpbs; ++uDpb) {
1053  Double_t dTsMsbTime =
1054  static_cast<ULong64_t>(stsxyter::kuHitNbTsBins)
1055  * static_cast<ULong64_t>(fvulCurrentTsMsb[fuCurrDpbIdx])
1056  + static_cast<ULong64_t>(stsxyter::kulTsCycleNbBins)
1057  * static_cast<ULong64_t>(fvuCurrentTsMsbCycle[fuCurrDpbIdx]);
1058 
1060  if (kTRUE == fbBinningFw)
1061  dTsMsbTime =
1062  static_cast<ULong64_t>(stsxyter::kuHitNbTsBinsBinning)
1063  * static_cast<ULong64_t>(fvulCurrentTsMsb[fuCurrDpbIdx])
1064  + static_cast<ULong64_t>(stsxyter::kulTsCycleNbBinsBinning)
1065  * static_cast<ULong64_t>(fvuCurrentTsMsbCycle[fuCurrDpbIdx]);
1066  dTsMsbTime *= stsxyter::kdClockCycleNs * 1e-9;
1067 
1068  LOG(info) << "End of TS " << std::setw(7) << ts.index() << " eDPB "
1069  << std::setw(2) << uDpb << " current TS MSB counter is "
1070  << std::setw(12) << fvulCurrentTsMsb[uDpb]
1071  << " current TS MSB cycle counter is " << std::setw(12)
1072  << fvuCurrentTsMsbCycle[uDpb] << " current TS MSB time is "
1073  << std::setw(12) << dTsMsbTime << " s";
1074  }
1075  } // if( 0 == ts.index() % 1000 )
1076  //If Needed store Histos after 10000 TS.
1077  //if( 0 == ts.index() % 10000 )
1078  //SaveAllHistos( "data/PeriodicHistosSave.root");
1079 
1080  return kTRUE;
1081 }
1082 
1083 Bool_t CbmMcbm2018MonitorMuchLite::ProcessMuchMs(const fles::Timeslice& ts,
1084  size_t uMsComp,
1085  UInt_t uMsIdx) {
1086  auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
1087  fuCurrentEquipmentId = msDescriptor.eq_id;
1088  const uint8_t* msContent =
1089  reinterpret_cast<const uint8_t*>(ts.content(uMsComp, uMsIdx));
1090 
1091  fulCurrentTsIdx = ts.index();
1092  if (0 == fvbMaskedComponents.size())
1093  fvbMaskedComponents.resize(ts.num_components(), kFALSE);
1094 
1095  if (0 == fulCurrentTsIdx && 0 == uMsIdx) {
1096  /*
1097  LOG(info) << "hi hv eqid flag si sv idx/start crc size offset";
1098  LOG(info) << Form( "%02x %02x %04x %04x %02x %02x %016llx %08x %08x %016llx",
1099  static_cast<unsigned int>(msDescriptor.hdr_id),
1100  static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
1101  static_cast<unsigned int>(msDescriptor.sys_id),
1102  static_cast<unsigned int>(msDescriptor.sys_ver), msDescriptor.idx, msDescriptor.crc,
1103  msDescriptor.size, msDescriptor.offset );
1104 */
1105  LOG(info) << FormatMsHeaderPrintout(msDescriptor);
1106  } // if( 0 == fulCurrentTsIndex && 0 == uMsIdx )
1107  if (kFALSE == fvbMaskedComponents[uMsComp] && 0 == uMsIdx) {
1108  auto it = fDpbIdIndexMap.find(fuCurrentEquipmentId);
1109  if (fDpbIdIndexMap.end() == it) {
1110  LOG(warning)
1111  << "Could not find the sDPB index for AFCK id 0x" << std::hex
1112  << fuCurrentEquipmentId << std::dec << " component " << uMsComp << "\n"
1113  << "If valid this index has to be added in the TOF parameter file in "
1114  "the RocIdArray field"
1115  << "\n"
1116  << "For now we remove it from the list of components analyzed";
1117  fvbMaskedComponents[uMsComp] = kTRUE;
1118  } // if( fDpbIdIndexMap.end() == it )
1119 
1120  } // if( kFALSE == fvbMaskedComponents[ uMsComp ] && 0 == uMsIdx )
1121 
1122  if (kTRUE == fvbMaskedComponents[uMsComp]) return kTRUE;
1123 
1124  uint32_t uSize = msDescriptor.size;
1125  fulCurrentMsIdx = msDescriptor.idx;
1126  Double_t dMsTime = (1e-9) * static_cast<double>(fulCurrentMsIdx);
1127  LOG(debug) << "Microslice: " << fulCurrentMsIdx << " from EqId " << std::hex
1128  << fuCurrentEquipmentId << std::dec << " has size: " << uSize;
1129 
1130  fuCurrDpbId = static_cast<uint32_t>(fuCurrentEquipmentId & 0xFFFF);
1132  //LOG(info) <<" fuCurrDpbIdx "<<fuCurrDpbIdx<<" fuCurrDpbId "<<fuCurrDpbId;
1133 
1134  if (uMsComp < kiMaxNbFlibLinks) {
1135  if (fdStartTimeMsSz < 0) fdStartTimeMsSz = dMsTime;
1136  fhMsSz[uMsComp]->Fill(uSize);
1137  fhMsSzTime[uMsComp]->Fill(dMsTime - fdStartTimeMsSz, uSize);
1138  } // if( uMsComp < kiMaxNbFlibLinks )
1139 
1141  if (static_cast<Int_t>(fvdPrevMsTime[uMsComp])
1142  < static_cast<Int_t>(dMsTime)) {
1144  UInt_t uFebIdxOffset = fUnpackParMuch->GetNbFebsPerDpb() * fuCurrDpbIdx;
1145  for (UInt_t uFebIdx = 0; uFebIdx < fUnpackParMuch->GetNbFebsPerDpb();
1146  ++uFebIdx) {
1147  UInt_t uFebIdxInSyst = uFebIdxOffset + uFebIdx;
1148 
1150  if (0 == fviFebTimeSecLastRateUpdate[uFebIdxInSyst]) {
1151  fviFebTimeSecLastRateUpdate[uFebIdxInSyst] =
1152  static_cast<Int_t>(dMsTime);
1153  fviFebCountsSinceLastRateUpdate[uFebIdxInSyst] = 0;
1154  for (UInt_t uChan = 0; uChan < fUnpackParMuch->GetNbChanPerFeb();
1155  ++uChan)
1156  fvdFebChanCountsSinceLastRateUpdate[uFebIdxInSyst][uChan] = 0.0;
1157  continue;
1158  } // if( 0 == fviFebTimeSecLastRateUpdate[uFebIdxInSyst] )
1159 
1160  Int_t iTimeInt = static_cast<Int_t>(dMsTime)
1161  - fviFebTimeSecLastRateUpdate[uFebIdxInSyst];
1162  if (fiTimeIntervalRateUpdate <= iTimeInt) {
1164  if (0 == fviFebCountsSinceLastRateUpdate[uFebIdxInSyst]) {
1165  fviFebTimeSecLastRateUpdate[uFebIdxInSyst] =
1166  static_cast<Int_t>(dMsTime);
1167  continue;
1168  } // if( 0 == fviFebCountsSinceLastRateUpdate[uFebIdxInSyst] )
1169 
1170  for (UInt_t uChan = 0; uChan < fUnpackParMuch->GetNbChanPerFeb();
1171  ++uChan) {
1172  fhMuchFebChanHitRateProf[uFebIdxInSyst]->Fill(
1173  uChan,
1174  fvdFebChanCountsSinceLastRateUpdate[uFebIdxInSyst][uChan]
1175  / iTimeInt);
1176  fvdFebChanCountsSinceLastRateUpdate[uFebIdxInSyst][uChan] = 0.0;
1177  } // for( UInt_t uChan = 0; uChan < fUnpackParMuch->GetNbChanPerFeb(); ++uChan )
1178 
1179  fviFebTimeSecLastRateUpdate[uFebIdxInSyst] =
1180  static_cast<Int_t>(dMsTime);
1181  fviFebCountsSinceLastRateUpdate[uFebIdxInSyst] = 0;
1182  } // if( fiTimeIntervalRateUpdate <= iTimeInt )
1183  } // for( UInt_t uFebIdx = 0; uFebIdx < fUnpackParMuch->GetNbFebsPerDpb(); ++uFebIdx )
1184  } // if( static_cast<Int_t>( fvdMsTime[ uMsCompIdx ] ) < static_cast<Int_t>( dMsTime ) )
1185 
1186  // Store MS time for coincidence plots
1187  fvdPrevMsTime[uMsComp] = dMsTime;
1188 
1190  uint16_t uMsHeaderFlags = msDescriptor.flags;
1191  for (UInt_t uBit = 0; uBit < 16; ++uBit)
1192  fhMsStatusFieldType->Fill(uBit, (uMsHeaderFlags >> uBit) & 0x1);
1193 
1195  UInt_t uTsMsbCycleHeader =
1196  std::floor(fulCurrentMsIdx
1199 
1201  if (kTRUE == fbBinningFw)
1202  uTsMsbCycleHeader = std::floor(fulCurrentMsIdx
1206 
1207  if (kFALSE == fvuInitialHeaderDone[fuCurrDpbIdx]) {
1208  fvuInitialTsMsbCycleHeader[fuCurrDpbIdx] = uTsMsbCycleHeader;
1210  } // if( kFALSE == fvuInitialHeaderDone[ fuCurrDpbIdx ] )
1211  else if (uTsMsbCycleHeader != fvuCurrentTsMsbCycle[fuCurrDpbIdx]
1212  && 4194303 != fvulCurrentTsMsb[fuCurrDpbIdx]) {
1213  /*
1214  LOG(warning) << "TS MSB cycle from MS header does not match current cycle from data "
1215  << "for TS " << std::setw( 12 ) << fulCurrentTsIdx
1216  << " MS " << std::setw( 12 ) << fulCurrentMsIdx
1217  << " MsInTs " << std::setw( 3 ) << uMsIdx
1218  << " ====> " << fvuCurrentTsMsbCycle[ fuCurrDpbIdx ]
1219  << " VS " << uTsMsbCycleHeader;
1220 */
1221  fvuCurrentTsMsbCycle[fuCurrDpbIdx] = uTsMsbCycleHeader;
1222  }
1223 
1224  // If not integer number of message in input buffer, print warning/error
1225  if (0 != (uSize % kuBytesPerMessage))
1226  LOG(error) << "The input microslice buffer does NOT "
1227  << "contain only complete nDPB messages!";
1228 
1229  // Compute the number of complete messages in the input microslice buffer
1230  uint32_t uNbMessages =
1231  (uSize - (uSize % kuBytesPerMessage)) / kuBytesPerMessage;
1232 
1233  // Prepare variables for the loop on contents
1234  const uint32_t* pInBuff = reinterpret_cast<const uint32_t*>(msContent);
1235 
1236  for (uint32_t uIdx = 0; uIdx < uNbMessages; ++uIdx) {
1237  // Fill message
1238  uint32_t ulData = static_cast<uint32_t>(pInBuff[uIdx]);
1239 
1240  stsxyter::Message mess(static_cast<uint32_t>(ulData & 0xFFFFFFFF));
1241 
1242  // Print message if requested
1243  if (fbPrintMessages) mess.PrintMess(std::cout, fPrintMessCtrl);
1244  /*
1245  if( 1000 == fulCurrentTsIdx )
1246  {
1247  mess.PrintMess( std::cout, fPrintMessCtrl );
1248  } // if( 0 == fulCurrentTsIdx )
1249 */
1250  stsxyter::MessType typeMess = mess.GetMessType();
1251  fmMsgCounter[typeMess]++;
1252  // fhMuchMessType->Fill( static_cast< uint16_t > (typeMess) );
1253  // fhMuchMessTypePerDpb->Fill( fuCurrDpbIdx, static_cast< uint16_t > (typeMess) );
1254 
1255  switch (typeMess) {
1256  case stsxyter::MessType::Hit: {
1257  // Extract the eLink and Asic indices => Should GO IN the fill method now that obly hits are link/asic specific!
1258  UShort_t usElinkIdx = mess.GetLinkIndex();
1260  if (kTRUE == fbBinningFw) usElinkIdx = mess.GetLinkIndexHitBinning();
1261 
1262  UInt_t uCrobIdx = usElinkIdx / fUnpackParMuch->GetNbElinkPerCrob();
1263  Int_t uFebIdx = fUnpackParMuch->ElinkIdxToFebIdx(usElinkIdx);
1264  // if(usElinkIdx!=0)
1265  //LOG(info) <<" usElinkIdx "<<usElinkIdx<<" uCrobIdx "<<uCrobIdx<<" uFebIdx "<<uFebIdx;
1266  if (kTRUE == fbMuchMode) uFebIdx = usElinkIdx;
1267  fhMuchHitsElinkPerDpb->Fill(fuCurrDpbIdx, usElinkIdx);
1268  if (-1 == uFebIdx) {
1269  LOG(warning) << "CbmMcbm2018MonitorMuchLite::DoUnpack => "
1270  << "Wrong elink Idx! Elink raw "
1271  << Form("%d remap %d", usElinkIdx, uFebIdx);
1272  continue;
1273  } // if( -1 == uFebIdx )
1274  //LOG(info) << " uCrobIdx "<<uCrobIdx<<" fUnpackParMuch->ElinkIdxToAsicIdx( usElinkIdx ) "<<fUnpackParMuch->ElinkIdxToAsicIdx( usElinkIdx )<<" usElinkIdx "<<usElinkIdx;
1275  UInt_t uAsicIdx =
1276  (fuCurrDpbIdx * fUnpackParMuch->GetNbCrobsPerDpb() + uCrobIdx)
1278  + fUnpackParMuch->ElinkIdxToAsicIdx(usElinkIdx);
1279 
1280  FillHitInfo(mess, usElinkIdx, uAsicIdx, uMsIdx);
1281  break;
1282  } // case stsxyter::MessType::Hit :
1284  FillTsMsbInfo(mess, uIdx, uMsIdx);
1285  break;
1286  } // case stsxyter::MessType::TsMsb :
1288  // The first message in the TS is a special ones: EPOCH
1289  FillEpochInfo(mess);
1290 
1291  if (0 < uIdx)
1292  LOG(info) << "CbmMcbm2018MonitorMuchLite::DoUnpack => "
1293  << "EPOCH message at unexpected position in MS: message "
1294  << uIdx << " VS message 0 expected!";
1295  break;
1296  } // case stsxyter::MessType::TsMsb :
1298  // UShort_t usElinkIdx = mess.GetStatusLink(); // commented 03.07.20 FU unused
1299  // UInt_t uCrobIdx = usElinkIdx / fUnpackParMuch->GetNbElinkPerCrob(); // commented 03.07.20 FU unused
1300  // Int_t uFebIdx = fUnpackParMuch->ElinkIdxToFebIdx( usElinkIdx );
1301  // UInt_t uAsicIdx = ( fuCurrDpbIdx * fUnpackParMuch->GetNbCrobsPerDpb() + uCrobIdx // commented 03.07.20 FU unused
1302  // ) * fUnpackParMuch->GetNbAsicsPerCrob()
1303  // + fUnpackParMuch->ElinkIdxToAsicIdx( usElinkIdx );
1304 
1305  // UShort_t usStatusField = mess.GetStatusStatus(); // commented 03.07.20 FU unused
1306 
1307  // fhStatusMessType->Fill( uAsicIdx, usStatusField );
1309  if (fbPrintMessages) {
1310  std::cout << Form("DPB %2u TS %12llu MS %12llu mess %5u ",
1311  fuCurrDpbIdx,
1314  uIdx);
1315  mess.PrintMess(std::cout, fPrintMessCtrl);
1316  } // if( fbPrintMessages )
1317  // FillTsMsbInfo( mess );
1318  break;
1319  } // case stsxyter::MessType::Status
1321  // FillTsMsbInfo( mess );
1322  break;
1323  } // case stsxyter::MessType::Empty :
1325  if (mess.IsMsErrorFlagOn()) {
1326  fhDpbMsErrors->Fill(fuCurrDpbIdx, mess.GetMsErrorType());
1327  } // if( pMess[uIdx].IsMsErrorFlagOn() )
1328  break;
1329  } // case stsxyter::MessType::EndOfMs :
1331  break;
1332  } // case stsxyter::MessType::Dummy / ReadDataAck / Ack :
1333  default: {
1334  LOG(fatal) << "CbmMcbm2018MonitorMuchLite::DoUnpack => "
1335  << "Unknown message type, should never happen, stopping "
1336  "here! Type found was: "
1337  << static_cast<int>(typeMess);
1338  }
1339  } // switch( mess.GetMessType() )
1340  } // for( uint32_t uIdx = 0; uIdx < uNbMessages; ++uIdx )
1341 
1342  return kTRUE;
1343 }
1344 
1345 
1347  const UShort_t& /*usElinkIdx*/,
1348  const UInt_t& uAsicIdx,
1349  const UInt_t& uMsIdx) {
1350  UShort_t usChan = mess.GetHitChannel();
1351  UShort_t usRawAdc = mess.GetHitAdc();
1352  // UShort_t usFullTs = mess.GetHitTimeFull();
1353  // UShort_t usTsOver = mess.GetHitTimeOver();
1354  UShort_t usRawTs = mess.GetHitTime();
1355  //Below FebID is according to FEB Position in Module GEM A or Module GEM B (Carefully write MUCH Par file)
1356  Int_t FebId = fUnpackParMuch->GetFebId(uAsicIdx);
1357 
1359  if (kTRUE == fbBinningFw) usRawTs = mess.GetHitTimeBinning();
1360 
1361  // UInt_t uFebIdx = uAsicIdx / fUnpackParMuch->GetNbAsicsPerFeb();
1362  //For MUCH each FEB has one StsXyter
1363  UInt_t uFebIdx = uAsicIdx;
1364  // UInt_t uCrobIdx = usElinkIdx / fUnpackParMuch->GetNbElinkPerCrob();
1365  // UInt_t uAsicInFeb = uAsicIdx % fUnpackParMuch->GetNbAsicsPerFeb();
1366  UInt_t uChanInFeb = usChan
1368  * (uAsicIdx % fUnpackParMuch->GetNbAsicsPerFeb());
1369  Int_t ModuleNr = fUnpackParMuch->GetModule(uAsicIdx);
1370  Int_t sector = fUnpackParMuch->GetPadXA(FebId, usChan);
1371  Int_t channel = fUnpackParMuch->GetPadYA(FebId, usChan);
1372 
1373  //Convert into Real X Y Position
1374  // Double_t ActualX = fUnpackParMuch->GetRealX(channel+97*sector);
1375  // Double_t ActualY = fUnpackParMuch->GetRealPadSize(channel+97*sector);
1376  Double_t ActualX = fUnpackParMuch->GetRealX(channel, sector);
1377  Double_t ActualY = fUnpackParMuch->GetRealPadSize(channel, sector);
1378 
1379  //Converting Module (Small side up)
1380  ActualX = 1000 - ActualX;
1381  channel = 96 - channel;
1382 
1383  LOG(debug) << "Module Nr " << ModuleNr << " Sector Nr " << sector
1384  << " Channel Nr " << channel << "Actual X " << ActualX
1385  << "Actual Y " << ActualY << "uAsicIdx " << uAsicIdx;
1386 
1387 
1388  // fHistPadDistr[ModuleNr]->Fill(sector, channel);
1389  // fRealHistPadDistr[ModuleNr]->Fill(ActualY, ActualX);
1390 
1391  //Double_t dCalAdc = fvdFebAdcOffs[ fuCurrDpbIdx ][ uCrobIdx ][ uFebIdx ]
1392  // + (usRawAdc - 1)* fvdFebAdcGain[ fuCurrDpbIdx ][ uCrobIdx ][ uFebIdx ];
1393  fhFEBcount->Fill(uFebIdx);
1394  // fhMuchFebSpill[uFebIdx] ->Fill(usRawTs);
1395  fhMuchFebChanCntRaw[uFebIdx]->Fill(uChanInFeb);
1396  // fhMuchFebChanAdcRaw[ uFebIdx ]->Fill( uChanInFeb, usRawAdc );
1397  // fhMuchFebChanAdcRawProf[ uFebIdx ]->Fill( uChanInFeb, usRawAdc );
1398  //fhMuchFebChanAdcCal[ uFebIdx ]->Fill( uChanInFeb, dCalAdc );
1399  //fhMuchFebChanAdcCalProf[ uFebIdx ]->Fill( uChanInFeb, dCalAdc );
1400  // fhMuchFebChanRawTs[ uFebIdx ]->Fill( usChan, usRawTs );
1401  //fhMuchFebChanMissEvt[ uFebIdx ]->Fill( usChan, mess.IsHitMissedEvts() );
1402  // fhMuchFebChanAdcRaw_combined->Fill(usRawAdc);
1403 
1404 
1405  fhMuchFebADC[uFebIdx]->Fill(usChan, usRawAdc);
1406  // Compute the Full time stamp
1407  // ULong64_t ulOldHitTime = fvulChanLastHitTime[ uAsicIdx ][ usChan ]; // commented 03.07.20 FU unused
1408  // Long64_t dOldHitTime = fvdChanLastHitTime[ uAsicIdx ][ usChan ];
1409 
1410  // Use TS w/o overlap bits as they will anyway come from the TS_MSB
1411  fvulChanLastHitTime[uAsicIdx][usChan] = usRawTs;
1412 
1413  fvulChanLastHitTime[uAsicIdx][usChan] +=
1414  static_cast<ULong64_t>(stsxyter::kuHitNbTsBins)
1415  * static_cast<ULong64_t>(fvulCurrentTsMsb[fuCurrDpbIdx])
1416  + static_cast<ULong64_t>(stsxyter::kulTsCycleNbBins)
1417  * static_cast<ULong64_t>(fvuCurrentTsMsbCycle[fuCurrDpbIdx]);
1418 
1420  if (kTRUE == fbBinningFw)
1421  fvulChanLastHitTime[uAsicIdx][usChan] =
1422  usRawTs
1423  + static_cast<ULong64_t>(stsxyter::kuHitNbTsBinsBinning)
1424  * static_cast<ULong64_t>(fvulCurrentTsMsb[fuCurrDpbIdx])
1425  + static_cast<ULong64_t>(stsxyter::kulTsCycleNbBinsBinning)
1426  * static_cast<ULong64_t>(fvuCurrentTsMsbCycle[fuCurrDpbIdx]);
1427 
1428 
1429  // Convert the Hit time in bins to Hit time in ns
1430  Long64_t dHitTimeNs =
1431  fvulChanLastHitTime[uAsicIdx][usChan] * stsxyter::kdClockCycleNs;
1432 
1433  // Store new value of Hit time in ns
1434  fvdChanLastHitTime[uAsicIdx][usChan] =
1435  fvulChanLastHitTime[uAsicIdx][usChan] * stsxyter::kdClockCycleNs;
1436  // For StsXyter2.0 Duplicate Hit Error
1437  //Int_t ModuleNr = fUnpackParMuch->GetModule(uAsicIdx);
1438  /*
1439  fhMuchFebDuplicateHitProf[ModuleNr]->Fill(FebId,0);
1440  if( ulOldHitTime == fvulChanLastHitTime[uAsicIdx][usChan] )
1441  fhMuchFebDuplicateHitProf[ModuleNr]->Fill(FebId,1);
1442 */
1443 
1444  /*
1445  LOG(info) << " Asic " << std::setw( 2 ) << uAsicIdx
1446  << " Channel " << std::setw( 3 ) << usChan
1447  << " Diff to last hit " << std::setw( 12 ) << ( fvulChanLastHitTime[ uAsicIdx ][ usChan ] - ulOldHitTime)
1448  << " in s " << std::setw( 12 ) << ( fvdChanLastHitTime[ uAsicIdx ][ usChan ] - dOldHitTime) * 1e-9;
1449 */
1450  // Pulser and MS
1451  fvuChanNbHitsInMs[uAsicIdx][usChan][uMsIdx]++;
1452  fvdChanLastHitTimeInMs[uAsicIdx][usChan][uMsIdx] = dHitTimeNs;
1453  fvusChanLastHitAdcInMs[uAsicIdx][usChan][uMsIdx] = usRawAdc;
1454  /*
1455  fvmChanHitsInTs[ uAsicIdx ][ usChan ].insert( stsxyter::FinalHit( fvulChanLastHitTime[ uAsicIdx ][ usChan ],
1456  usRawAdc, uAsicIdx, usChan ) );
1457 */
1458  fvmHitsInMs.push_back(stsxyter::FinalHit(
1459  fvulChanLastHitTime[uAsicIdx][usChan], usRawAdc, uAsicIdx, usChan));
1460 
1461  // Check Starting point of histos with time as X axis
1462  if (-1 == fdStartTime) fdStartTime = fvdChanLastHitTime[uAsicIdx][usChan];
1463 
1464  Int_t constime = (fvdChanLastHitTime[uAsicIdx][usChan] - prevtime_new);
1465 
1466  if (constime < 10000000) {
1467  if (usRawAdc > 1) { Counter1++; }
1468  Counter++;
1469  } else {
1470  //fhRate->Fill(Counter);
1471  // fhRateAdcCut->Fill(Counter1);
1472  Counter = 0;
1473  Counter1 = 0;
1474  prevtime_new = fvdChanLastHitTime[uAsicIdx][usChan];
1475  }
1476 
1477 
1478  // Fill histos with time as X axis
1479  Double_t dTimeSinceStartSec =
1480  (fvdChanLastHitTime[uAsicIdx][usChan] - fdStartTime) * 1e-9; //uTimeBin
1481  // Double_t dTimeSinceStartMin = dTimeSinceStartSec / 60.0;
1482 
1484  fvdFebChanCountsSinceLastRateUpdate[uFebIdx][uChanInFeb] += 1;
1485 
1486  // fhMuchFebChanHitRateEvo[ uFebIdx ]->Fill( dTimeSinceStartSec, uChanInFeb );
1487  //fhMuchFebAsicHitRateEvo[ uFebIdx ]->Fill( dTimeSinceStartSec, uAsicInFeb );
1488  // fhMuchFebHitRateEvo[ uFebIdx ]->Fill( dTimeSinceStartSec );
1489  // fhMuchFebHitRateEvo_mskch[ uFebIdx ]->Fill( dTimeSinceStartSec );
1490  // if(usRawAdc>1)fhMuchFebHitRateEvo_mskch_adccut[ uFebIdx ]->Fill( dTimeSinceStartSec );
1491  //fhMuchFebChanHitRateEvoLong[ uFebIdx ]->Fill( dTimeSinceStartMin, uChanInFeb, 1.0/60.0 );
1492  //fhMuchFebAsicHitRateEvoLong[ uFebIdx ]->Fill( dTimeSinceStartMin, uAsicInFeb, 1.0/60.0 );
1493  //fhMuchFebHitRateEvoLong[ uFebIdx ]->Fill( dTimeSinceStartMin, 1.0/60.0 );
1494 
1495  fhMuchFebSpill[uFebIdx]->Fill(dTimeSinceStartSec);
1496  fhMuchFebChanCntRaw[uFebIdx]->Fill(usChan);
1497  fhMuchChannelTime[uFebIdx]->Fill(dTimeSinceStartSec, usChan);
1498 
1499  /*
1500  if( mess.IsHitMissedEvts() )
1501  {
1502  fhMuchFebChanMissEvtEvo[ uFebIdx ]->Fill( dTimeSinceStartSec, uChanInFeb );
1503  fhMuchFebAsicMissEvtEvo[ uFebIdx ]->Fill( dTimeSinceStartSec, uAsicInFeb );
1504  fhMuchFebMissEvtEvo[ uFebIdx ]->Fill( dTimeSinceStartSec );
1505  } // if( mess.IsHitMissedEvts() )
1506  //if(fvdChanLastHitTime[ uAsicIdx ][ usChan ] == prevTime && uAsicIdx == prevAsic && usChan == prevChan)
1507  */
1508  if (fvdChanLastHitTime[uAsicIdx][usChan] == prevTime && usChan == prevChan) {
1509  //fDupliCount++;
1510  } else {
1511  // fhMuchFebHitRateEvo_WithoutDupli[ uFebIdx ]->Fill( dTimeSinceStartSec );
1512  }
1513  prevTime = fvdChanLastHitTime[uAsicIdx][usChan];
1514  prevChan = usChan;
1515  prevAsic = uAsicIdx;
1516 }
1517 
1519  UInt_t /*uMessIdx*/,
1520  UInt_t /*uMsIdx*/) {
1521  UInt_t uVal = mess.GetTsMsbVal();
1523  if (kTRUE == fbBinningFw) uVal = mess.GetTsMsbValBinning();
1524 
1525  // Update Status counters
1526  if (uVal < fvulCurrentTsMsb[fuCurrDpbIdx]) {
1527 
1529  } // if( uVal < fvulCurrentTsMsb[fuCurrDpbIdx] )
1531  /*
1532  ULong64_t ulNewTsMsbTime = static_cast< ULong64_t >( stsxyter::kuHitNbTsBins )
1533  * static_cast< ULong64_t >( fvulCurrentTsMsb[fuCurrDpbIdx])
1534  + static_cast< ULong64_t >( stsxyter::kulTsCycleNbBins )
1535  * static_cast< ULong64_t >( fvuCurrentTsMsbCycle[fuCurrDpbIdx] );
1536 */
1537 }
1538 
1540  // UInt_t uVal = mess.GetEpochVal();
1541  // UInt_t uCurrentCycle = uVal % stsxyter::kulTsCycleNbBins;
1542 }
1543 
1545 
1547 
1548  LOG(info) << "-------------------------------------";
1549  LOG(info) << "CbmMcbm2018MonitorMuchLite statistics are ";
1550  LOG(info) << " Hit messages: " << fmMsgCounter[stsxyter::MessType::Hit]
1551  << "\n"
1552  << " Ts MSB messages: " << fmMsgCounter[stsxyter::MessType::TsMsb]
1553  << "\n"
1554  << " Dummy messages: " << fmMsgCounter[stsxyter::MessType::Dummy]
1555  << "\n"
1556  << " Epoch messages: " << fmMsgCounter[stsxyter::MessType::Epoch]
1557  << "\n"
1558  << " Empty messages: "
1560 
1561  LOG(info) << "-------------------------------------";
1562 
1564  //SaveAllHistos();
1565 }
1566 
1567 
1569  TDirectory* oldDir = NULL;
1570  TFile* histoFile = NULL;
1571  if ("" != sFileName) {
1572  // Store current directory position to allow restore later
1573  oldDir = gDirectory;
1574  // open separate histo file in recreate mode
1575  histoFile = new TFile(sFileName, "RECREATE");
1576  histoFile->cd();
1577  } // if( "" != sFileName )
1578 
1579  /***************************/
1580  gDirectory->mkdir("Much_Raw");
1581  gDirectory->cd("Much_Raw");
1582 
1583  for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
1584  // fHistPadDistr[uModuleId]->Write();
1585  // fRealHistPadDistr[uModuleId]->Write();
1586  // fhMuchFebDuplicateHitProf[uModuleId]->Write();
1587  }
1588  // fhRate->Write();
1589  // fhRateAdcCut->Write();
1590  fhFEBcount->Write();
1591  // fhMuchMessType->Write();
1592  // fhMuchSysMessType->Write();
1593  // fhMuchMessTypePerDpb->Write();
1594  // fhMuchSysMessTypePerDpb->Write();
1595  // fhStatusMessType->Write();
1596  fhMsStatusFieldType->Write();
1597  fhMuchHitsElinkPerDpb->Write();
1598  // fhMuchFebChanAdcRaw_combined->Write();
1599  fhDpbMsErrors->Write();
1600  gDirectory->cd("..");
1601  /***************************/
1602 
1603  /***************************/
1604  gDirectory->mkdir("Much_Feb");
1605  gDirectory->cd("Much_Feb");
1606  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
1607  if (kTRUE == fUnpackParMuch->IsFebActive(uFebIdx)) {
1608  fhMuchFebChanCntRaw[uFebIdx]->Write();
1609  fhMuchFebSpill[uFebIdx]->Write();
1610  fhMuchChannelTime[uFebIdx]->Write();
1611  fhMuchFebADC[uFebIdx]->Write();
1612  //fhMuchFebChanCntRawGood[ uFebIdx ]->Write();
1613  // fhMuchFebChanAdcRaw[ uFebIdx ]->Write();
1614  // fhMuchFebChanAdcRawProf[ uFebIdx ]->Write();
1615  //fhMuchFebChanAdcCal[ uFebIdx ]->Write();
1616  //fhMuchFebChanAdcCalProf[ uFebIdx ]->Write();
1617  // fhMuchFebChanRawTs[ uFebIdx ]->Write();
1618  // fhMuchFebChanHitRateProf[ uFebIdx ]->Write();
1619  //fhMuchFebAsicHitRateEvo[ uFebIdx ]->Write();
1620  // fhMuchFebHitRateEvo[ uFebIdx ]->Write();
1621  // fhMuchFebHitRateEvo_mskch[ uFebIdx ]->Write();
1622  // fhMuchFebHitRateEvo_mskch_adccut[ uFebIdx ]->Write();
1623  // fhMuchFebHitRateEvo_WithoutDupli[ uFebIdx ]->Write();
1624  /*fhMuchFebChanHitRateEvoLong[ uFebIdx ]->Write();
1625  fhMuchFebAsicHitRateEvoLong[ uFebIdx ]->Write();
1626  fhMuchFebHitRateEvoLong[ uFebIdx ]->Write();
1627  fhMuchFebChanDistT[ uFebIdx ]->Write();
1628  for( UInt_t uFebIdxB = uFebIdx; uFebIdxB < fuNbFebs; ++uFebIdxB )
1629  {
1630  fhMuchFebChanDtCoinc[ uFebIdx ][ uFebIdxB ]->Write();
1631  fhMuchFebChanCoinc[ uFebIdx ][ uFebIdxB ]->Write();
1632  } // for( UInt_t uFebIdxB = uFebIdx; uFebIdxB < fuNbFebs; ++uFebIdxB )*/
1633  } // if( kTRUE == fUnpackParMuch->IsFebActive( uFebIdx ) )
1634  } // for( UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx )
1635  gDirectory->cd("..");
1636  /***************************/
1637 
1638  /***************************/
1639  // Flib Histos
1640  gDirectory->mkdir("Flib_Raw");
1641  gDirectory->cd("Flib_Raw");
1642  for (UInt_t uLinks = 0; uLinks < kiMaxNbFlibLinks; uLinks++) {
1643  TString sMsSzName = Form("MsSz_link_%02u", uLinks);
1644  if (fHM->Exists(sMsSzName.Data())) fHM->H1(sMsSzName.Data())->Write();
1645 
1646  sMsSzName = Form("MsSzTime_link_%02u", uLinks);
1647  if (fHM->Exists(sMsSzName.Data())) fHM->P1(sMsSzName.Data())->Write();
1648  } // for( UInt_t uLinks = 0; uLinks < 16; uLinks ++)
1649 
1650  /***************************/
1651 
1652  if ("" != sFileName) {
1653  // Restore original directory position
1654  histoFile->Close();
1655  oldDir->cd();
1656  } // if( "" != sFileName )
1657 }
1658 
1660  LOG(info) << "Reseting all Much histograms.";
1661 
1662  for (UInt_t uModuleId = 0; uModuleId < 2; ++uModuleId) {
1663  //fHistPadDistr[uModuleId]->Reset();
1664  //fRealHistPadDistr[uModuleId]->Reset();
1665  fhMuchFebDuplicateHitProf[uModuleId]->Reset();
1666  }
1667  // fhRate->Reset();
1668  // fhRateAdcCut->Reset();
1669  fhFEBcount->Reset();
1670  // fhMuchMessType->Reset();
1671  // fhMuchSysMessType->Reset();
1672  // fhMuchMessTypePerDpb->Reset();
1673  // fhMuchSysMessTypePerDpb->Reset();
1674  // fhStatusMessType->Reset();
1675  fhMsStatusFieldType->Reset();
1676  fhMuchHitsElinkPerDpb->Reset();
1677  // fhMuchFebChanAdcRaw_combined->Reset();
1678  fhDpbMsErrors->Reset();
1679 
1680  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
1681  if (kTRUE == fUnpackParMuch->IsFebActive(uFebIdx)) {
1682  fhMuchFebChanCntRaw[uFebIdx]->Reset();
1683  fhMuchFebSpill[uFebIdx]->Reset();
1684  fhMuchChannelTime[uFebIdx]->Reset();
1685  fhMuchFebADC[uFebIdx]->Reset();
1686  //fhMuchFebChanCntRawGood[ uFebIdx ]->Reset();
1688  //fhMuchFebChanAdcRawProf[ uFebIdx ]->Reset();
1689  //fhMuchFebChanAdcCal[ uFebIdx ]->Reset();
1690  //fhMuchFebChanAdcCalProf[ uFebIdx ]->Reset();
1692  // fhMuchFebChanHitRateEvo[ uFebIdx ]->Reset();
1693  // fhMuchFebChanHitRateProf[ uFebIdx ]->Reset();
1694  //fhMuchFebAsicHitRateEvo[ uFebIdx ]->Reset();
1696  // fhMuchFebHitRateEvo_mskch[ uFebIdx ]->Reset();
1697  // fhMuchFebHitRateEvo_mskch_adccut[ uFebIdx ]->Reset();
1698  // fhMuchFebHitRateEvo_WithoutDupli[ uFebIdx ]->Reset();
1699  /*fhMuchFebChanHitRateEvoLong[ uFebIdx ]->Reset();
1700  fhMuchFebAsicHitRateEvoLong[ uFebIdx ]->Reset();
1701  fhMuchFebHitRateEvoLong[ uFebIdx ]->Reset();
1702  fhMuchFebChanDistT[ uFebIdx ]->Reset();
1703  for( UInt_t uFebIdxB = uFebIdx; uFebIdxB < fuNbFebs; ++uFebIdxB )
1704  {
1705  fhMuchFebChanDtCoinc[ uFebIdx ][ uFebIdxB ]->Reset();
1706  fhMuchFebChanCoinc[ uFebIdx ][ uFebIdxB ]->Reset();
1707  } // for( UInt_t uFebIdxB = uFebIdx; uFebIdxB < fuNbFebs; ++uFebIdxB )*/
1708  } // if( kTRUE == fUnpackParMuch->IsFebActive( uFebIdx ) )
1709  } // for( UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx )
1710 
1711  for (UInt_t uLinks = 0; uLinks < kiMaxNbFlibLinks; ++uLinks) {
1712  TString sMsSzName = Form("MsSz_link_%02u", uLinks);
1713  if (fHM->Exists(sMsSzName.Data())) fHM->H1(sMsSzName.Data())->Reset();
1714 
1715  sMsSzName = Form("MsSzTime_link_%02u", uLinks);
1716  if (fHM->Exists(sMsSzName.Data())) fHM->P1(sMsSzName.Data())->Reset();
1717  } // for( UInt_t uLinks = 0; uLinks < kiMaxNbFlibLinks; ++uLinks )
1718 
1719  fdStartTime = -1;
1720  fdStartTimeMsSz = -1;
1721 }
1722 
1724  Int_t timeIn,
1725  Int_t iBinSize) {
1726  TDatime* fRunStartDateTime = new TDatime(dateIn, timeIn);
1727  fiRunStartDateTimeSec = fRunStartDateTime->Convert();
1728  fiBinSizeDatePlots = iBinSize;
1729 
1730  LOG(info) << "Assigned new MUCH Run Start Date-Time: "
1731  << fRunStartDateTime->AsString();
1732 }
1733 
1735 Bool_t
1737  for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) {
1738  if (kTRUE == fUnpackParMuch->IsFebActive(uFebIdx)) {
1739  LOG(info) << Form(
1740  " ------------------ Noisy channels scan for FEB %2d ------------",
1741  uFebIdx);
1742  for (UInt_t uAsicIdx = 0; uAsicIdx < fUnpackParMuch->GetNbAsicsPerFeb();
1743  ++uAsicIdx)
1744  for (UInt_t uChanIdx = 0; uChanIdx < fUnpackParMuch->GetNbChanPerAsic();
1745  ++uChanIdx) {
1746  UInt_t uChanInFeb =
1747  uAsicIdx * fUnpackParMuch->GetNbChanPerAsic() + uChanIdx;
1748  if (dNoiseThreshold
1749  < fhMuchFebChanHitRateProf[uFebIdx]->GetBinContent(1
1750  + uChanInFeb))
1751  LOG(info) << Form(
1752  "Noisy Channel ASIC %d channel %3d (%4d) level %6.0f",
1753  uAsicIdx,
1754  uChanIdx,
1755  uChanInFeb,
1756  fhMuchFebChanHitRateProf[uFebIdx]->GetBinContent(1 + uChanInFeb));
1757 
1758  } // for( UInt_t uChanIdx = 0; uChanIdx < fUnpackParMuch->GetNbChanPerAsic(); ++uChanIdx )
1759 
1760  LOG(info)
1761  << " ---------------------------------------------------------------";
1762  } // if( kTRUE == fUnpackParMuch->IsFebActive( uFebIdx ) )
1763  } // for( UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx )
1764  return kTRUE;
1765 }
1767 
CbmMcbm2018MonitorMuchLite::fhRate
TH1 * fhRate
Definition: CbmMcbm2018MonitorMuchLite.h:217
CbmHistManager::P1
TProfile * P1(const std::string &name) const
Return pointer to TProfile.
Definition: CbmHistManager.h:263
CbmHistManager::Exists
Bool_t Exists(const std::string &name) const
Check existence of histogram in manager.
Definition: CbmHistManager.h:303
CbmMcbm2018MuchPar::GetNbAsicsPerCrob
static constexpr UInt_t GetNbAsicsPerCrob()
Definition: CbmMcbm2018MuchPar.h:44
CbmMcbm2018MonitorMuchLite::fRealHistPadDistr
std::vector< TH2 * > fRealHistPadDistr
Definition: CbmMcbm2018MonitorMuchLite.h:226
CbmMcbm2018MonitorMuchLite::fHM
CbmHistManager * fHM
Coincidences in sorted hits.
Definition: CbmMcbm2018MonitorMuchLite.h:207
CbmMcbm2018MonitorMuchLite::ResetAllHistos
void ResetAllHistos()
Definition: CbmMcbm2018MonitorMuchLite.cxx:1659
CbmMcbm2018MonitorMuchLite::fhMuchFebHitRateEvo_mskch
std::vector< TH1 * > fhMuchFebHitRateEvo_mskch
Definition: CbmMcbm2018MonitorMuchLite.h:247
CbmMcbm2018MuchPar::IsCrobActive
Bool_t IsCrobActive(UInt_t uDpbIdx, UInt_t uCrobIdx)
Definition: CbmMcbm2018MuchPar.cxx:151
CbmMcbm2018MonitorMuchLite::fhMsSzTime
TProfile * fhMsSzTime[kiMaxNbFlibLinks]
Definition: CbmMcbm2018MonitorMuchLite.h:264
CbmMcbm2018MuchPar::GetNbElinkPerCrob
static constexpr UInt_t GetNbElinkPerCrob()
Definition: CbmMcbm2018MuchPar.h:38
CbmMcbm2018MuchPar::ElinkIdxToAsicIdx
UInt_t ElinkIdxToAsicIdx(UInt_t uElink)
Definition: CbmMcbm2018MuchPar.h:60
CbmMcbm2018MonitorMuchLite::fvmHitsInMs
std::vector< stsxyter::FinalHit > fvmHitsInMs
Hits time-sorting.
Definition: CbmMcbm2018MonitorMuchLite.h:181
CbmMcbm2018MonitorMuchLite::fbPrintMessages
Bool_t fbPrintMessages
Task configuration values.
Definition: CbmMcbm2018MonitorMuchLite.h:125
CbmMcbm2018MonitorMuchLite::fiRunStartDateTimeSec
Int_t fiRunStartDateTimeSec
Index of the DPB from which the MS currently unpacked is coming.
Definition: CbmMcbm2018MonitorMuchLite.h:140
CbmMcbm2018MonitorMuchLite::fhMuchHitsElinkPerDpb
TH2 * fhMuchHitsElinkPerDpb
Definition: CbmMcbm2018MonitorMuchLite.h:215
CbmMcbm2018MonitorMuchLite::fUnpackParMuch
CbmMcbm2018MuchPar * fUnpackParMuch
/‍** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **‍/
Definition: CbmMcbm2018MonitorMuchLite.h:106
CbmMcbm2018MonitorMuchLite::Init
virtual Bool_t Init()
Definition: CbmMcbm2018MonitorMuchLite.cxx:158
CbmMcbm2018MonitorMuchLite::fhMsStatusFieldType
TH2 * fhMsStatusFieldType
Definition: CbmMcbm2018MonitorMuchLite.h:214
CbmMcbm2018MonitorMuchLite::fhMuchFebSpill
std::vector< TH1 * > fhMuchFebSpill
Definition: CbmMcbm2018MonitorMuchLite.h:230
CbmMcbm2018MonitorMuchLite::fbBinningFw
Bool_t fbBinningFw
=> Quick and dirty hack for binning FW!!!
Definition: CbmMcbm2018MonitorMuchLite.h:97
CbmMcbm2018MonitorMuchLite::kiMaxNbFlibLinks
static const Int_t kiMaxNbFlibLinks
Number of StsXyter ASICs.
Definition: CbmMcbm2018MonitorMuchLite.h:118
CbmMcbm2018MonitorMuchLite::fdStartTime
Double_t fdStartTime
Definition: CbmMcbm2018MonitorMuchLite.h:173
CbmMcbm2018MonitorMuchLite::prevtime_new
Long64_t prevtime_new
Last hit ADC in bins in each MS for each Channel.
Definition: CbmMcbm2018MonitorMuchLite.h:168
CbmMcbm2018MuchPar.h
CbmMcbm2018MonitorMuchLite::fuCurrentEquipmentId
UInt_t fuCurrentEquipmentId
Definition: CbmMcbm2018MonitorMuchLite.h:134
CbmMcbm2018MonitorMuchLite::fuNbCoreMsPerTs
size_t fuNbCoreMsPerTs
Definition: CbmMcbm2018MonitorMuchLite.h:101
stsxyter::Message
Definition: StsXyterMessage.h:165
CbmMcbm2018MuchPar::GetDpbId
UInt_t GetDpbId(UInt_t uDpbIdx)
Definition: CbmMcbm2018MuchPar.cxx:142
gdpbv100::msg_print_Human
@ msg_print_Human
Definition: gDpbMessv100.h:91
CbmMcbm2018MonitorMuchLite::fhMuchFebADC
std::vector< TH2 * > fhMuchFebADC
Definition: CbmMcbm2018MonitorMuchLite.h:231
CbmMcbm2018MuchPar::GetNbFebsPerDpb
static constexpr UInt_t GetNbFebsPerDpb()
Definition: CbmMcbm2018MuchPar.h:40
stsxyter::MessType::Status
@ Status
CbmMcbm2018MonitorMuchLite::fhDpbMsErrors
TH2 * fhDpbMsErrors
Binning FW error flag.
Definition: CbmMcbm2018MonitorMuchLite.h:260
CbmMcbm2018MonitorMuchLite::fvMsComponentsList
std::vector< size_t > fvMsComponentsList
Definition: CbmMcbm2018MonitorMuchLite.h:100
CbmMcbm2018MonitorMuchLite::fvulChanLastHitTime
std::vector< std::vector< ULong64_t > > fvulChanLastHitTime
Definition: CbmMcbm2018MonitorMuchLite.h:153
CbmMcbm2018MuchPar::GetRealPadSize
Double_t GetRealPadSize(Int_t)
Definition: CbmMcbm2018MuchPar.cxx:305
bMcbm2018WriteMuchLite
Bool_t bMcbm2018WriteMuchLite
Definition: CbmMcbm2018MonitorMuchLite.cxx:45
CbmMcbm2018MonitorMuchLite::fdMuchFebChanLastTimeForDist
std::vector< std::vector< Double_t > > fdMuchFebChanLastTimeForDist
Definition: CbmMcbm2018MonitorMuchLite.h:253
CbmMcbm2018MonitorMuchLite::Reset
virtual void Reset()
Definition: CbmMcbm2018MonitorMuchLite.cxx:1544
stsxyter::kulTsCycleNbBinsBinning
static const uint64_t kulTsCycleNbBinsBinning
Definition: StsXyterMessage.h:161
CbmMcbm2018MonitorMuchLite::fhMuchFebChanHitRateProf
std::vector< TProfile * > fhMuchFebChanHitRateProf
Definition: CbmMcbm2018MonitorMuchLite.h:244
CbmMcbm2018MonitorMuchLite::fiBinSizeDatePlots
Int_t fiBinSizeDatePlots
Start of run time since "epoch" in s, for the plots with date as X axis.
Definition: CbmMcbm2018MonitorMuchLite.h:141
CbmMcbm2018MonitorMuchLite::fhMuchFebChanAdcRawProf
std::vector< TProfile * > fhMuchFebChanAdcRawProf
Definition: CbmMcbm2018MonitorMuchLite.h:234
CbmMcbm2018MonitorMuchLite::prevTime
Long64_t prevTime
Definition: CbmMcbm2018MonitorMuchLite.h:169
CbmMcbm2018MonitorMuchLite::fvulCurrentTsMsb
std::vector< ULong64_t > fvulCurrentTsMsb
Bin size in s for the plots with date as X axis.
Definition: CbmMcbm2018MonitorMuchLite.h:144
stsxyter::Message::GetLinkIndexHitBinning
uint16_t GetLinkIndexHitBinning() const
Definition: StsXyterMessage.h:296
CbmMcbm2018MonitorMuchLite::fuCurrDpbIdx
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
Definition: CbmMcbm2018MonitorMuchLite.h:138
CbmMcbm2018MuchPar::GetNbAsicsPerFeb
static constexpr UInt_t GetNbAsicsPerFeb()
Definition: CbmMcbm2018MuchPar.h:43
CbmMcbm2018MonitorMuchLite::fviFebTimeSecLastRateUpdate
std::vector< Int_t > fviFebTimeSecLastRateUpdate
Definition: CbmMcbm2018MonitorMuchLite.h:190
CbmMcbm2018MuchPar::GetNrOfDpbs
UInt_t GetNrOfDpbs()
Definition: CbmMcbm2018MuchPar.h:68
CbmMcbm2018MonitorMuchLite::fbMuchMode
Bool_t fbMuchMode
Definition: CbmMcbm2018MonitorMuchLite.h:94
stsxyter::Message::GetTsMsbVal
uint32_t GetTsMsbVal() const
For TS MSB data: Returns the TS MSB 22 bit field)
Definition: StsXyterMessage.h:334
CbmMcbm2018MonitorMuchLite::fvuInitialTsMsbCycleHeader
std::vector< UInt_t > fvuInitialTsMsbCycleHeader
Flag set after seeing MS header in 1st MS for DPB.
Definition: CbmMcbm2018MonitorMuchLite.h:149
CbmMcbm2018MonitorMuchLite::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmMcbm2018MonitorMuchLite.cxx:183
CbmMcbm2018MuchPar::GetNbChanPerFeb
static constexpr UInt_t GetNbChanPerFeb()
Definition: CbmMcbm2018MuchPar.h:51
stsxyter::Message::GetLinkIndex
uint16_t GetLinkIndex() const
For all data: Returns the (global) index of the eLink on which the message was received (n bit field)
Definition: StsXyterMessage.h:249
CbmMcbm2018MonitorMuchLite::SaveAllHistos
void SaveAllHistos(TString sFileName="")
Definition: CbmMcbm2018MonitorMuchLite.cxx:1568
CbmMcbm2018MonitorMuchLite::fvuChanNbHitsInMs
std::vector< std::vector< std::vector< UInt_t > > > fvuChanNbHitsInMs
Header time of each MS.
Definition: CbmMcbm2018MonitorMuchLite.h:160
stsxyter::MessType
MessType
Message types.
Definition: StsXyterMessage.h:27
CbmMcbm2018MonitorMuchLite::fvdFebChanCountsSinceLastRateUpdate
std::vector< std::vector< Double_t > > fvdFebChanCountsSinceLastRateUpdate
Definition: CbmMcbm2018MonitorMuchLite.h:192
CbmMcbm2018MonitorMuchLite::fvuCurrentTsMsbCycle
std::vector< UInt_t > fvuCurrentTsMsbCycle
Current TS MSB for each DPB.
Definition: CbmMcbm2018MonitorMuchLite.h:145
stsxyter::kulTsCycleNbBins
static const uint64_t kulTsCycleNbBins
Definition: StsXyterMessage.h:152
CbmMcbm2018MonitorMuchLite::fuNbFebs
UInt_t fuNbFebs
Array to hold the active flag for all CROBs, [ NbDpb ][ NbCrobPerDpb ].
Definition: CbmMcbm2018MonitorMuchLite.h:112
CbmHistManager.h
Histogram manager.
CbmMcbm2018MonitorMuchLite::fiTimeIntervalRateUpdate
Int_t fiTimeIntervalRateUpdate
Mean Rate per channel plots.
Definition: CbmMcbm2018MonitorMuchLite.h:189
CbmMcbm2018MonitorMuchLite::AddMsComponentToList
virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Definition: CbmMcbm2018MonitorMuchLite.cxx:324
CbmMcbm2018MonitorMuchLite::fvusChanLastHitAdcInMs
std::vector< std::vector< std::vector< UShort_t > > > fvusChanLastHitAdcInMs
Last hit time in bins in each MS for each Channel.
Definition: CbmMcbm2018MonitorMuchLite.h:164
CbmMcbm2018MonitorMuchLite::fviFebCountsSinceLastRateUpdate
std::vector< Int_t > fviFebCountsSinceLastRateUpdate
Definition: CbmMcbm2018MonitorMuchLite.h:191
CbmMcbm2018MonitorMuchLite::fhMuchFebChanDistT
std::vector< TH2 * > fhMuchFebChanDistT
Definition: CbmMcbm2018MonitorMuchLite.h:254
CbmMcbm2018MonitorMuchLite::fuMaxNbMicroslices
UInt_t fuMaxNbMicroslices
Definition: CbmMcbm2018MonitorMuchLite.h:187
CbmMcbm2018MonitorMuchLite::fvbMaskedComponents
std::vector< Bool_t > fvbMaskedComponents
Definition: CbmMcbm2018MonitorMuchLite.h:95
CbmMcbm2018MonitorMuchLite::fvmAsicHitsInMs
std::vector< std::vector< stsxyter::FinalHit > > fvmAsicHitsInMs
All hits (time in bins, ADC in bins, asic, channel) in last TS, sorted with "<" operator.
Definition: CbmMcbm2018MonitorMuchLite.h:183
stsxyter::Message::GetHitAdc
uint16_t GetHitAdc() const
For Hit data: Returns ADC value (5 bit field)
Definition: StsXyterMessage.h:277
CbmMcbm2018MonitorMuchLite::fuNbStsXyters
UInt_t fuNbStsXyters
Number of StsXyter ASICs.
Definition: CbmMcbm2018MonitorMuchLite.h:113
bMcbm2018ResetMuchLite
Bool_t bMcbm2018ResetMuchLite
Definition: CbmMcbm2018MonitorMuchLite.cxx:44
CbmMcbm2018MuchPar::GetPadYA
Short_t GetPadYA(UShort_t febid, UShort_t channelid)
Definition: CbmMcbm2018MuchPar.cxx:228
CbmMcbm2018MonitorMuchLite::FillEpochInfo
void FillEpochInfo(stsxyter::Message mess)
Definition: CbmMcbm2018MonitorMuchLite.cxx:1539
CbmMcbm2018MuchPar::IsFebActive
Bool_t IsFebActive(UInt_t uFebInSystIdx)
Definition: CbmMcbm2018MuchPar.cxx:171
CbmMcbm2018MonitorMuchLite::InitContainers
Bool_t InitContainers()
Definition: CbmMcbm2018MonitorMuchLite.cxx:174
stsxyter::Message::GetMsErrorType
uint16_t GetMsErrorType() const
For End of MS data: Returns the MS error type field (2 bit field)
Definition: StsXyterMessage.h:400
CbmMcbm2018MonitorMuchLite::fhMuchFebChanAdcRaw_combined
TH1 * fhMuchFebChanAdcRaw_combined
Definition: CbmMcbm2018MonitorMuchLite.h:210
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
stsxyter::MessType::Empty
@ Empty
CbmMcbm2018MonitorMuchLite::Counter1
UInt_t Counter1
Definition: CbmMcbm2018MonitorMuchLite.h:199
CbmMcbm2018MonitorMuchLite::fbIgnoreOverlapMs
Bool_t fbIgnoreOverlapMs
Definition: CbmMcbm2018MonitorMuchLite.h:104
CbmMcbm2018MonitorMuchLite::fhFEBcount
TH1 * fhFEBcount
Definition: CbmMcbm2018MonitorMuchLite.h:219
CbmMcbm2018MonitorMuchLite::CbmMcbm2018MonitorMuchLite
CbmMcbm2018MonitorMuchLite()
Definition: CbmMcbm2018MonitorMuchLite.cxx:49
h
Data class with information on a STS local track.
CbmMcbm2018MonitorMuchLite::fhMuchSysMessType
TH1 * fhMuchSysMessType
Definition: CbmMcbm2018MonitorMuchLite.h:209
CbmMcbm2018MonitorMuchLite::SetParContainers
void SetParContainers()
Definition: CbmMcbm2018MonitorMuchLite.cxx:167
CbmMcbm2018MuchPar::GetNbCrobsPerDpb
static constexpr UInt_t GetNbCrobsPerDpb()
Definition: CbmMcbm2018MuchPar.h:37
CbmMcbm2018MonitorMuchLite::SetNbMsInTs
virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
Definition: CbmMcbm2018MonitorMuchLite.cxx:382
CbmMcbm2018MonitorMuchLite::CreateHistograms
void CreateHistograms()
Definition: CbmMcbm2018MonitorMuchLite.cxx:427
CbmMcbm2018MuchPar::GetRealX
Double_t GetRealX(Int_t)
Definition: CbmMcbm2018MuchPar.cxx:294
CbmMcbm2018MonitorMuchLite::fhMuchFebDuplicateHitProf
std::vector< TProfile * > fhMuchFebDuplicateHitProf
Definition: CbmMcbm2018MonitorMuchLite.h:257
stsxyter::FinalHit
Definition: StsXyterFinalHit.h:16
stsxyter::MessType::Hit
@ Hit
CbmMcbm2018MonitorMuchLite::fvdPrevMsTime
std::vector< Double_t > fvdPrevMsTime
Last hit time in ns for each Channel.
Definition: CbmMcbm2018MonitorMuchLite.h:157
stsxyter::kuHitNbTsBins
static const uint32_t kuHitNbTsBins
Definition: StsXyterMessage.h:146
CbmMcbm2018MonitorMuchLite::fhMuchMessType
TH1 * fhMuchMessType
Histogram manager.
Definition: CbmMcbm2018MonitorMuchLite.h:208
CbmMcbm2018MonitorMuchLite::fulCurrentTsIdx
ULong64_t fulCurrentTsIdx
TS/MS info.
Definition: CbmMcbm2018MonitorMuchLite.h:129
CbmMcbm2018MonitorMuchLite::fcMsSizeAll
TCanvas * fcMsSizeAll
Definition: CbmMcbm2018MonitorMuchLite.h:262
CbmMcbm2018MonitorMuchLite::kuBytesPerMessage
static const UInt_t kuBytesPerMessage
Definition: CbmMcbm2018MonitorMuchLite.h:119
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmMcbm2018MonitorMuchLite::fsHistoFileFullname
TString fsHistoFileFullname
Definition: CbmMcbm2018MonitorMuchLite.h:123
CbmMcbm2018MonitorMuchLite::fvdMsTime
std::vector< Double_t > fvdMsTime
Header time of previous MS per link.
Definition: CbmMcbm2018MonitorMuchLite.h:158
CbmMcbm2018MuchPar::GetNrOfAsics
UInt_t GetNrOfAsics()
Definition: CbmMcbm2018MuchPar.h:72
CbmMcbm2018MonitorMuchLite::fhMuchFebHitRateEvo_mskch_adccut
std::vector< TH1 * > fhMuchFebHitRateEvo_mskch_adccut
Definition: CbmMcbm2018MonitorMuchLite.h:248
CbmHistManager::H1
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
Definition: CbmHistManager.h:170
CbmMcbm2018MonitorMuchLite::fhMuchFebHitRateEvo
std::vector< TH1 * > fhMuchFebHitRateEvo
Definition: CbmMcbm2018MonitorMuchLite.h:246
CbmMcbm2018MonitorMuchLite::fhMuchFebChanHitRateEvo
std::vector< TH2 * > fhMuchFebChanHitRateEvo
Definition: CbmMcbm2018MonitorMuchLite.h:243
stsxyter::kdClockCycleNs
static const double kdClockCycleNs
Definition: StsXyterMessage.h:156
stsxyter::kuHitNbTsBinsBinning
static const uint32_t kuHitNbTsBinsBinning
Definition: StsXyterMessage.h:160
CbmMcbm2018MonitorMuchLite::fDpbIdIndexMap
std::map< UInt_t, UInt_t > fDpbIdIndexMap
Total number of STS DPBs in system.
Definition: CbmMcbm2018MonitorMuchLite.h:109
CbmMcbm2018MuchPar
Definition: CbmMcbm2018MuchPar.h:19
CbmMcbm2018MuchPar::GetNrOfFebs
UInt_t GetNrOfFebs()
Definition: CbmMcbm2018MuchPar.h:71
stsxyter::Message::GetMessType
MessType GetMessType() const
Returns the message type, see enum MessType.
Definition: StsXyterMessage.h:259
CbmMcbm2018MonitorMuchLite::SetRunStart
void SetRunStart(Int_t dateIn, Int_t timeIn, Int_t iBinSize=5)
Definition: CbmMcbm2018MonitorMuchLite.cxx:1723
CbmMcbm2018MonitorMuchLite::Counter
UInt_t Counter
Rate evolution histos.
Definition: CbmMcbm2018MonitorMuchLite.h:198
CbmMcbm2018MonitorMuchLite::fPrintMessCtrl
stsxyter::MessagePrintMask fPrintMessCtrl
Definition: CbmMcbm2018MonitorMuchLite.h:126
CbmMcbm2018MonitorMuchLite::fvdChanLastHitTime
std::vector< std::vector< Double_t > > fvdChanLastHitTime
Last hit time in bins for each Channel.
Definition: CbmMcbm2018MonitorMuchLite.h:156
FormatMsHeaderPrintout
std::string FormatMsHeaderPrintout(const fles::MicrosliceDescriptor &msDescriptor)
Definition: CbmFormatMsHeaderPrintout.cxx:5
CbmMcbm2018MonitorMuchLite::fhMuchFebChanCntRaw
std::vector< TH1 * > fhMuchFebChanCntRaw
Definition: CbmMcbm2018MonitorMuchLite.h:229
CbmMcbm2018MonitorMuchLite::ScanForNoisyChannels
Bool_t ScanForNoisyChannels(Double_t dNoiseThreshold=1e3)
---------------------------------------------------------------—///
Definition: CbmMcbm2018MonitorMuchLite.cxx:1736
CbmMcbm2018MonitorMuchLite::fhStatusMessType
TH2 * fhStatusMessType
Definition: CbmMcbm2018MonitorMuchLite.h:213
CbmMcbm2018MonitorMuchLite::fhMuchSysMessTypePerDpb
TH2 * fhMuchSysMessTypePerDpb
Definition: CbmMcbm2018MonitorMuchLite.h:212
gdpbv100::MessagePrintMask
MessagePrintMask
Definition: gDpbMessv100.h:87
CbmMcbm2018MonitorMuchLite::fulCurrentMsIdx
ULong64_t fulCurrentMsIdx
Definition: CbmMcbm2018MonitorMuchLite.h:130
CbmMcbm2018MonitorMuchLite::fuNbOverMsPerTs
size_t fuNbOverMsPerTs
Definition: CbmMcbm2018MonitorMuchLite.h:102
CbmMcbm2018MuchPar::ElinkIdxToFebIdx
Int_t ElinkIdxToFebIdx(UInt_t uElink)
Definition: CbmMcbm2018MuchPar.cxx:119
CbmMcbm2018MuchPar::GetModule
UInt_t GetModule(UInt_t)
Definition: CbmMcbm2018MuchPar.cxx:283
stsxyter::Message::GetHitChannel
uint16_t GetHitChannel() const
For Hit data: Returns StsXYTER channel number (7 bit field)
Definition: StsXyterMessage.h:274
CbmMcbm2018MonitorMuchLite::fhRateAdcCut
TH1 * fhRateAdcCut
Definition: CbmMcbm2018MonitorMuchLite.h:218
stsxyter::Message::PrintMess
bool PrintMess(std::ostream &os, MessagePrintMask ctrl=MessagePrintMask::msg_print_Human) const
Definition: StsXyterMessage.cxx:29
stsxyter::Message::IsMsErrorFlagOn
bool IsMsErrorFlagOn() const
For End of MS data: Returns the MS error flag (1 bit field)
Definition: StsXyterMessage.h:397
CbmMcbm2018MonitorMuchLite::fmMsgCounter
std::map< stsxyter::MessType, UInt_t > fmMsgCounter
Current data properties.
Definition: CbmMcbm2018MonitorMuchLite.h:132
CbmMcbm2018MonitorMuchLite::fvuInitialHeaderDone
std::vector< UInt_t > fvuInitialHeaderDone
Current TS MSB cycle for DPB.
Definition: CbmMcbm2018MonitorMuchLite.h:147
CbmMcbm2018MonitorMuchLite::fhMuchFebHitRateEvo_WithoutDupli
std::vector< TH1 * > fhMuchFebHitRateEvo_WithoutDupli
Definition: CbmMcbm2018MonitorMuchLite.h:249
CbmMcbm2018MonitorMuchLite::fhMuchChannelTime
std::vector< TH2 * > fhMuchChannelTime
Definition: CbmMcbm2018MonitorMuchLite.h:238
CbmMcbm2018MonitorMuchLite::DoUnpack
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
Definition: CbmMcbm2018MonitorMuchLite.cxx:942
CbmMcbm2018MonitorMuchLite::fvmFebHitsInMs
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.
Definition: CbmMcbm2018MonitorMuchLite.h:185
CbmMcbm2018MonitorMuchLite::FillTsMsbInfo
void FillTsMsbInfo(stsxyter::Message mess, UInt_t uMessIdx=0, UInt_t uMsIdx=0)
Definition: CbmMcbm2018MonitorMuchLite.cxx:1518
CbmMcbm2018MonitorMuchLite::Finish
virtual void Finish()
Definition: CbmMcbm2018MonitorMuchLite.cxx:1546
CbmMcbm2018MonitorMuchLite::fhMsSz
TH1 * fhMsSz[kiMaxNbFlibLinks]
Definition: CbmMcbm2018MonitorMuchLite.h:263
CbmMcbm2018MonitorMuchLite::fhMuchFebChanRawTs
std::vector< TH2 * > fhMuchFebChanRawTs
Definition: CbmMcbm2018MonitorMuchLite.h:237
stsxyter::MessType::TsMsb
@ TsMsb
stsxyter::Message::GetHitTime
uint16_t GetHitTime() const
For Hit data: Returns timestamp (8 bit field, 2 MSB bits overlap removed)
Definition: StsXyterMessage.h:286
stsxyter::MessType::Dummy
@ Dummy
CbmMcbm2018MuchPar::GetNbChanPerAsic
static constexpr UInt_t GetNbChanPerAsic()
Definition: CbmMcbm2018MuchPar.h:50
CbmMcbm2018MonitorMuchLite::FillHitInfo
void FillHitInfo(stsxyter::Message mess, const UShort_t &usElinkIdx, const UInt_t &uAsicIdx, const UInt_t &uMsIdx)
Definition: CbmMcbm2018MonitorMuchLite.cxx:1346
bMcbm2018ScanNoisyMuchLite
Bool_t bMcbm2018ScanNoisyMuchLite
Definition: CbmMcbm2018MonitorMuchLite.cxx:46
CbmMcbm2018MonitorMuchLite::fhMuchFebChanAdcRaw
std::vector< TH2 * > fhMuchFebChanAdcRaw
Definition: CbmMcbm2018MonitorMuchLite.h:233
CbmMcbm2018MonitorMuchLite::ProcessMuchMs
Bool_t ProcessMuchMs(const fles::Timeslice &ts, size_t uMsComp, UInt_t uMsIdx)
Definition: CbmMcbm2018MonitorMuchLite.cxx:1083
stsxyter::MessType::Epoch
@ Epoch
CbmMcbm2018MonitorMuchLite::prevAsic
UInt_t prevAsic
Definition: CbmMcbm2018MonitorMuchLite.h:170
CbmMcbm2018MonitorMuchLite::fhMuchMessTypePerDpb
TH2 * fhMuchMessTypePerDpb
Definition: CbmMcbm2018MonitorMuchLite.h:211
CbmMcbm2018MonitorMuchLite::fuNrOfDpbs
UInt_t fuNrOfDpbs
Definition: CbmMcbm2018MonitorMuchLite.h:107
CbmMcbm2018MonitorMuchLite::fHistPadDistr
std::vector< TH2 * > fHistPadDistr
Plots per FEB-8.
Definition: CbmMcbm2018MonitorMuchLite.h:225
CbmMcbm2018MonitorMuchLite::InitMuchParameters
Bool_t InitMuchParameters()
Definition: CbmMcbm2018MonitorMuchLite.cxx:190
stsxyter::Message::GetTsMsbValBinning
uint32_t GetTsMsbValBinning() const
For TS MSB data: Returns the TS MSB 29 bit field)
Definition: StsXyterMessage.h:337
CbmMcbm2018MonitorMuchLite::fvuElinkLastTsHit
std::vector< UInt_t > fvuElinkLastTsHit
TS MSB cycle from MS header in 1st MS for DPB.
Definition: CbmMcbm2018MonitorMuchLite.h:150
stsxyter::kuHitNbAdcBins
static const uint32_t kuHitNbAdcBins
Status/properties constants.
Definition: StsXyterMessage.h:144
CbmMcbm2018MuchPar::GetFebId
UInt_t GetFebId(UInt_t)
Definition: CbmMcbm2018MuchPar.cxx:267
CbmMcbmUnpack
Definition: CbmMcbmUnpack.h:15
CbmMcbm2018MuchPar::GetPadXA
Short_t GetPadXA(UShort_t febid, UShort_t channelid)
Definition: CbmMcbm2018MuchPar.cxx:215
CbmMcbm2018MonitorMuchLite.h
CbmMcbm2018MonitorMuchLite
Definition: CbmMcbm2018MonitorMuchLite.h:36
stsxyter
Definition: StsXyterFinalHit.h:12
CbmFormatMsHeaderPrintout.h
CbmMcbm2018MonitorMuchLite::fuCurrDpbId
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
Definition: CbmMcbm2018MonitorMuchLite.h:136
CbmMcbm2018MonitorMuchLite::fdStartTimeMsSz
Double_t fdStartTimeMsSz
Definition: CbmMcbm2018MonitorMuchLite.h:175
CbmMcbm2018MonitorMuchLite::fvbCrobActiveFlag
std::vector< std::vector< Bool_t > > fvbCrobActiveFlag
Map of DPB Identifier to DPB index.
Definition: CbmMcbm2018MonitorMuchLite.h:111
CbmMcbm2018MonitorMuchLite::prevChan
UInt_t prevChan
Definition: CbmMcbm2018MonitorMuchLite.h:171
CbmMcbm2018MonitorMuchLite::fvdChanLastHitTimeInMs
std::vector< std::vector< std::vector< Double_t > > > fvdChanLastHitTimeInMs
Number of hits in each MS for each Channel.
Definition: CbmMcbm2018MonitorMuchLite.h:162
stsxyter::MessType::EndOfMs
@ EndOfMs
CbmMcbm2018MonitorMuchLite::~CbmMcbm2018MonitorMuchLite
virtual ~CbmMcbm2018MonitorMuchLite()
Definition: CbmMcbm2018MonitorMuchLite.cxx:155
CbmHistManager::Add
void Add(const std::string &name, TNamed *object)
Add new named object to manager.
Definition: CbmHistManager.h:58
stsxyter::Message::GetHitTimeBinning
uint16_t GetHitTimeBinning() const
Definition: StsXyterMessage.h:290