CbmRoot
CbmMcbm2018MonitorTofPulser.cxx
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmMcbm2018MonitorTofPulser -----
4 // ----- Created 10.07.2018 by P.-A. Loizeau -----
5 // ----- -----
6 // -----------------------------------------------------------------------------
7 
9 #include "CbmMcbm2018TofPar.h"
10 
13 
14 #include "CbmHistManager.h"
15 
16 #include "FairLogger.h"
17 #include "FairRootManager.h"
18 #include "FairRun.h"
19 #include "FairRunOnline.h"
20 #include "FairRuntimeDb.h"
21 
22 #include "Rtypes.h"
23 #include "TCanvas.h"
24 #include "TClonesArray.h"
25 #include "TF1.h"
26 #include "TH1.h"
27 #include "TH2.h"
28 #include "THStack.h"
29 #include "THttpServer.h"
30 #include "TMath.h"
31 #include "TPaveStats.h"
32 #include "TProfile.h"
33 #include "TProfile2D.h"
34 #include "TROOT.h"
35 #include "TString.h"
36 #include "TStyle.h"
37 #include <TFile.h>
38 
39 #include <algorithm>
40 #include <ctime>
41 #include <iomanip>
42 #include <iostream>
43 #include <stdint.h>
44 
51 
53  : CbmMcbmUnpack()
54  , fvMsComponentsList()
55  , fuNbCoreMsPerTs(0)
56  , fuNbOverMsPerTs(0)
57  , fbIgnoreOverlapMs(kFALSE)
58  , fsHistoFileFullname("data/TofPulserHistos.root")
59  , fuMsAcceptsPercent(100)
60  , fuTotalMsNb(0)
61  , fuOverlapMsNb(0)
62  , fuCoreMs(0)
63  , fdMsSizeInNs(0.0)
64  , fdTsCoreSizeInNs(0.0)
65  , fuMinNbGdpb(0)
66  , fuCurrNbGdpb(0)
67  , fUnpackPar()
68  , fuNrOfGdpbs(0)
69  , fuNrOfFeePerGdpb(0)
70  , fuNrOfGet4PerFee(0)
71  , fuNrOfChannelsPerGet4(0)
72  , fuNrOfChannelsPerFee(0)
73  , fuNrOfGet4(0)
74  , fuNrOfGet4PerGdpb(0)
75  , fuNrOfChannelsPerGdpb(0)
76  , fuRawDataPrintMsgNb(100000)
77  , fuRawDataPrintMsgIdx(fuRawDataPrintMsgNb)
78  , fbPrintAllHitsEnable(kFALSE)
79  , fbPrintAllEpochsEnable(kFALSE)
80  , fbOldFwData(kFALSE)
81  , fuDiamondDpbIdx(10000)
82  , // Crazy default value => should never make troubles given the price
83  fulCurrentTsIndex(0)
84  , fuCurrentMs(0)
85  , fuCurrentMsSysId(0)
86  , fdMsIndex(0)
87  , fuGdpbId(0)
88  , fuGdpbNr(0)
89  , fuGet4Id(0)
90  , fuGet4Nr(0)
91  , fiEquipmentId(0)
92  , fviMsgCounter(11, 0)
93  , // length of enum MessageTypes initialized with 0
94  fvulGdpbTsMsb()
95  , fvulGdpbTsLsb()
96  , fvulStarTsMsb()
97  , fvulStarTsMid()
98  , fvulGdpbTsFullLast()
99  , fvulStarTsFullLast()
100  , fvuStarTokenLast()
101  , fvuStarDaqCmdLast()
102  , fvuStarTrigCmdLast()
103  , fvulCurrentEpoch()
104  , fvbFirstEpochSeen()
105  , fvulCurrentEpochCycle()
106  , fvulCurrentEpochFull()
107  , fulCurrentEpochTime(0)
108  , fGdpbIdIndexMap()
109  , fvmEpSupprBuffer()
110  , fvuFeeNbHitsLastMs()
111  , fdTsLastPulserHit()
112  , fvuCoincNbHitsLastMs()
113  , fvdCoincTsLastHit()
114  , dMinDt(-1. * (kuNbBinsDt * gdpbv100::kdBinSize / 2.)
115  - gdpbv100::kdBinSize / 2.)
116  , dMaxDt(1. * (kuNbBinsDt * gdpbv100::kdBinSize / 2.)
117  + gdpbv100::kdBinSize / 2.)
118  , fuNbFeePlot(2)
119  , fuNbFeePlotsPerGdpb(0)
120  , fdStartTime(-1.)
121  , fdStartTimeLong(-1.)
122  , fdStartTimeMsSz(-1.)
123  , fuHistoryHistoSize(1800)
124  , fuHistoryHistoSizeLong(600)
125  , fdLastRmsUpdateTime(0.0)
126  , fdFitZoomWidthPs(0.0)
127  , fcMsSizeAll(NULL)
128  , fvhMsSzPerLink(12, NULL)
129  , fvhMsSzTimePerLink(12, NULL)
130  , fvhTimeDiffPulser()
131  , fhTimeMeanPulser(NULL)
132  , fhTimeRmsPulser(NULL)
133  , fhTimeRmsZoomFitPuls(NULL)
134  , fhTimeResFitPuls(NULL)
135  , fvhPulserCountEvoPerFeeGdpb()
136  , fvhPulserTimeDiffEvoGbtxGbtx()
137  , fvvhPulserTimeDiffEvoGdpbGdpb()
138  , fvvhPulserTimeDiffEvoFeeFee()
139  , fvuPadiToGet4()
140  , fvuGet4ToPadi()
141  , fvuElinkToGet4()
142  , fvuGet4ToElink()
143  , fTimeLastHistoSaving() {}
144 
146 
148  LOG(info) << "Initializing Get4 monitor";
149 
150  FairRootManager* ioman = FairRootManager::Instance();
151  if (ioman == NULL) {
152  LOG(fatal) << "No FairRootManager instance";
153  } // if( ioman == NULL )
154 
155  return kTRUE;
156 }
157 
159  LOG(info) << "Setting parameter containers for " << GetName();
160  fUnpackPar =
161  (CbmMcbm2018TofPar*) (FairRun::Instance()->GetRuntimeDb()->getContainer(
162  "CbmMcbm2018TofPar"));
163 }
164 
166  LOG(info) << "Init parameter containers for " << GetName();
167  Bool_t initOK = ReInitContainers();
168 
170 
175  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
176  for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j) {
180  } // for( UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j )
181  } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
182 
183  return initOK;
184 }
185 
187  LOG(info) << "ReInit parameter containers for " << GetName();
188 
190  LOG(info) << "Nr. of Tof GDPBs: " << fuNrOfGdpbs;
192 
194  LOG(info) << "Nr. of FEEs per Tof GDPB: " << fuNrOfFeePerGdpb;
195 
197  LOG(info) << "Nr. of GET4 per Tof FEE: " << fuNrOfGet4PerFee;
198 
200  LOG(info) << "Nr. of channels per GET4: " << fuNrOfChannelsPerGet4;
201 
203  LOG(info) << "Nr. of channels per FEE: " << fuNrOfChannelsPerFee;
204 
206  LOG(info) << "Nr. of GET4s: " << fuNrOfGet4;
207 
209  LOG(info) << "Nr. of GET4s per GDPB: " << fuNrOfGet4PerGdpb;
210 
212  LOG(info) << "Nr. of channels per GDPB: " << fuNrOfChannelsPerGdpb;
213 
214  fGdpbIdIndexMap.clear();
215  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
217  LOG(info) << "GDPB Id of TOF " << i << " : " << std::hex
218  << fUnpackPar->GetGdpbId(i) << std::dec;
219  } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
220 
222  LOG(info) << "Nr. of GBTx: " << fuNrOfGbtx;
223 
225  LOG(info) << "Nr. of GBTx: " << fuNrOfModules;
226 
227  fviRpcType.resize(fuNrOfGbtx);
228  fviModuleId.resize(fuNrOfGbtx);
229  fviNrOfRpc.resize(fuNrOfGbtx);
230  fviRpcSide.resize(fuNrOfGbtx);
231  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx) {
232  fviNrOfRpc[uGbtx] = fUnpackPar->GetNrOfRpc(uGbtx);
233  fviRpcType[uGbtx] = fUnpackPar->GetRpcType(uGbtx);
234  fviRpcSide[uGbtx] = fUnpackPar->GetRpcSide(uGbtx);
235  fviModuleId[uGbtx] = fUnpackPar->GetModuleId(uGbtx);
236  } // for( UInt_t uGbtx = 0; uGbtx < uNrOfGbtx; ++uGbtx)
237 
238  LOG(info) << "Nr. of RPCs per GBTx: ";
239  std::stringstream ss;
240  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
241  ss << Form(" %2d", fviNrOfRpc[uGbtx]);
242  LOG(info) << ss.str();
243 
244  LOG(info) << "RPC type per GBTx: ";
245  ss.clear();
246  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
247  ss << Form(" %2d", fviRpcType[uGbtx]);
248  LOG(info) << ss.str();
249 
250  LOG(info) << "RPC side per GBTx: ";
251  ss.clear();
252  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
253  ss << Form(" %2d", fviRpcSide[uGbtx]);
254  LOG(info) << ss.str();
255 
256  LOG(info) << "Module ID per GBTx: ";
257  ss.clear();
258  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
259  ss << Form(" %2d", fviModuleId[uGbtx]);
260  LOG(info) << ss.str();
261 
267  LOG(info) << "Timeslice parameters: " << fuTotalMsNb
268  << " MS per link, of which " << fuOverlapMsNb
269  << " overlap MS, each MS is " << fdMsSizeInNs << " ns";
270 
272  fvulGdpbTsMsb.resize(fuNrOfGdpbs);
273  fvulGdpbTsLsb.resize(fuNrOfGdpbs);
274  fvulStarTsMsb.resize(fuNrOfGdpbs);
275  fvulStarTsMid.resize(fuNrOfGdpbs);
281  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
282  fvulGdpbTsMsb[uGdpb] = 0;
283  fvulGdpbTsLsb[uGdpb] = 0;
284  fvulStarTsMsb[uGdpb] = 0;
285  fvulStarTsMid[uGdpb] = 0;
286  fvulGdpbTsFullLast[uGdpb] = 0;
287  fvulStarTsFullLast[uGdpb] = 0;
288  fvuStarTokenLast[uGdpb] = 0;
289  fvuStarDaqCmdLast[uGdpb] = 0;
290  fvuStarTrigCmdLast[uGdpb] = 0;
291  } // for (Int_t iGdpb = 0; iGdpb < fuNrOfGdpbs; ++iGdpb)
292 
294 
298 
302  /*
303  UInt_t uGet4topadi[32] = {
304  4, 3, 2, 1, // provided by Jochen
305  24, 23, 22, 21,
306  8, 7, 6, 5,
307  28, 27, 26, 25,
308  12, 11, 10, 9,
309  32, 31, 30, 29,
310  16, 15, 14, 13,
311  20, 19, 18, 17 };
312 */
314  UInt_t uGet4topadi[32] = {4, 3, 2, 1, // provided by Jochen
315  8, 7, 6, 5, 12, 11, 10, 9, 16, 15,
316  14, 13, 20, 19, 18, 17, 24, 23, 22, 21,
317  28, 27, 26, 25, 32, 31, 30, 29};
318 
319  UInt_t uPaditoget4[32] = {4, 3, 2, 1, // provided by Jochen
320  12, 11, 10, 9, 20, 19, 18, 17, 28, 27,
321  26, 25, 32, 31, 30, 29, 8, 7, 6, 5,
322  16, 15, 14, 13, 24, 23, 22, 21};
323 
324  for (UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan) {
325  fvuPadiToGet4[uChan] = uPaditoget4[uChan] - 1;
326  fvuGet4ToPadi[uChan] = uGet4topadi[uChan] - 1;
327  } // for( UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan )
328 
329 
333  UInt_t kuElinkToGet4[kuNbGet4PerGbtx] = {
334  27, 2, 7, 3, 31, 26, 30, 1, 33, 37, 32, 13, 9, 14,
335  10, 15, 17, 21, 16, 35, 34, 38, 25, 24, 0, 6, 20, 23,
336  18, 22, 28, 4, 29, 5, 19, 36, 39, 8, 12, 11};
337  UInt_t kuGet4ToElink[kuNbGet4PerGbtx] = {
338  24, 7, 1, 3, 31, 33, 25, 2, 37, 12, 14, 39, 38, 11,
339  13, 15, 18, 16, 28, 34, 26, 17, 29, 27, 23, 22, 5, 0,
340  30, 32, 6, 4, 10, 8, 20, 19, 35, 9, 21, 36};
341 
342  for (UInt_t uLinkAsic = 0; uLinkAsic < kuNbGet4PerGbtx; ++uLinkAsic) {
343  fvuElinkToGet4[uLinkAsic] = kuElinkToGet4[uLinkAsic];
344  fvuGet4ToElink[uLinkAsic] = kuGet4ToElink[uLinkAsic];
345  } // for( UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan )
346 
347  return kTRUE;
348 }
349 
350 
352  size_t component,
353  UShort_t /*usDetectorId*/) {
355  for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
356  if (component == fvMsComponentsList[uCompIdx]) return;
357 
359  fvMsComponentsList.push_back(component);
360 
362  if (NULL == fvhMsSzPerLink[component]) {
363  TString sMsSzName = Form("MsSz_link_%02lu", component);
364  TString sMsSzTitle =
365  Form("Size of MS from link %02lu; Ms Size [bytes]", component);
366  fvhMsSzPerLink[component] =
367  new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 160000, 0., 20000.);
368 
369  sMsSzName = Form("MsSzTime_link_%02lu", component);
370  sMsSzTitle = Form(
371  "Size of MS vs time for gDPB of link %02lu; Time[s] ; Ms Size [bytes]",
372  component);
373  fvhMsSzTimePerLink[component] = new TProfile(sMsSzName.Data(),
374  sMsSzTitle.Data(),
375  100 * fuHistoryHistoSize,
376  0.,
377  2 * fuHistoryHistoSize);
378  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
379  if (server) {
380  server->Register("/FlibRaw", fvhMsSzPerLink[component]);
381  server->Register("/FlibRaw", fvhMsSzTimePerLink[component]);
382  } // if( server )
383  if (NULL != fcMsSizeAll) {
384  fcMsSizeAll->cd(1 + component);
385  gPad->SetLogy();
386  fvhMsSzTimePerLink[component]->Draw("hist le0");
387  } // if( NULL != fcMsSizeAll )
388  LOG(info) << "Added MS size histo for component (link): " << component;
389  } // if( NULL == fvhMsSzPerLink[ component ] )
390 }
392  size_t uOverlapMsNb) {
393  fuNbCoreMsPerTs = uCoreMsNb;
394  fuNbOverMsPerTs = uOverlapMsNb;
395 
396  // UInt_t uNbMsTotal = fuNbCoreMsPerTs + fuNbOverMsPerTs;
397 }
398 
400  LOG(info) << "create Histos for " << fuNrOfGdpbs << " gDPBs ";
401 
402  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
403 
404  TString name {""};
405  TString title {""};
406 
407  // Full Fee time difference test
408  UInt_t uNbBinsDt =
409  kuNbBinsDt
410  + 1; // To account for extra bin due to shift by 1/2 bin of both ranges
411 
413  + (0 != fuNrOfFeePerGdpb % fuNbFeePlot ? 1 : 0);
414  Double_t dBinSzG4v2 = (6250. / 112.);
415  dMinDt = -1. * (kuNbBinsDt * dBinSzG4v2 / 2.) - dBinSzG4v2 / 2.;
416  dMaxDt = 1. * (kuNbBinsDt * dBinSzG4v2 / 2.) + dBinSzG4v2 / 2.;
417 
418 
419  /*******************************************************************/
422  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++) {
424  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++) {
425  if (uFeeA < uFeeB) {
426  UInt_t uGdpbA = uFeeA / (fuNrOfFeePerGdpb);
427  UInt_t uFeeIdA = uFeeA - (fuNrOfFeePerGdpb * uGdpbA);
428  UInt_t uGdpbB = uFeeB / (fuNrOfFeePerGdpb);
429  UInt_t uFeeIdB = uFeeB - (fuNrOfFeePerGdpb * uGdpbB);
430  fvhTimeDiffPulser[uFeeA][uFeeB] =
431  new TH1I(Form("hTimeDiffPulser_g%02u_f%1u_g%02u_f%1u",
432  uGdpbA,
433  uFeeIdA,
434  uGdpbB,
435  uFeeIdB),
436  Form("Time difference for pulser on gDPB %02u FEE %1u and "
437  "gDPB %02u FEE %1u; DeltaT [ps]; Counts",
438  uGdpbA,
439  uFeeIdA,
440  uGdpbB,
441  uFeeIdB),
442  uNbBinsDt,
443  dMinDt,
444  dMaxDt);
445  } // if( uFeeA < uFeeB )
446  else
447  fvhTimeDiffPulser[uFeeA][uFeeB] = NULL;
448  } // for( UInt_t uFeeB = uFeeA; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs - 1; uFeeB++)
449  } // for( UInt_t uFeeA = 0; uFeeA < kuNbChanTest - 1; uFeeA++)
450 
451  name = "hTimeMeanPulser";
452  fhTimeMeanPulser = new TH2D(
453  name.Data(),
454  "Time difference Mean for each FEE pairs; FEE A; FEE B ; Mean [ps]",
456  -0.5,
459  0.5,
460  fuNrOfFeePerGdpb * fuNrOfGdpbs - 0.5);
461 
462  name = "hTimeRmsPulser";
464  new TH2D(name.Data(),
465  "Time difference RMS for each FEE pairs; FEE A; FEE B ; RMS [ps]",
467  -0.5,
470  0.5,
471  fuNrOfFeePerGdpb * fuNrOfGdpbs - 0.5);
472 
473  name = "hTimeRmsZoomFitPuls";
474  fhTimeRmsZoomFitPuls = new TH2D(name.Data(),
475  "Time difference RMS after zoom for each FEE "
476  "pairs; FEE A; FEE B ; RMS [ps]",
478  -0.5,
481  0.5,
482  fuNrOfFeePerGdpb * fuNrOfGdpbs - 0.5);
483 
484  name = "hTimeResFitPuls";
485  fhTimeResFitPuls = new TH2D(name.Data(),
486  "Time difference Res from fit for each FEE "
487  "pairs; FEE A; FEE B ; Sigma [ps]",
489  -0.5,
492  0.5,
493  fuNrOfFeePerGdpb * fuNrOfGdpbs - 0.5);
494 
497  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
498 
499  name = Form("hPulserCountEvoPerFeeGdpb%02u", uGdpb);
500  fvhPulserCountEvoPerFeeGdpb.push_back(new TH2D(
501  name.Data(),
502  Form("Pulser count per FEE in gDPB %02u; time in run [s]; dt [ps]",
503  uGdpb),
505  0,
508  -0.5,
510 
511  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx) {
512  name = Form("hPulserTimeDiffEvoGdpb%02uGbtx00Gbtx%02u", uGdpb, uGbtx + 1);
513  fvhPulserTimeDiffEvoGbtxGbtx[uGdpb * (kuNbGbtxPerGdpb - 1) + uGbtx] =
514  new TProfile(name.Data(),
515  Form("Time difference of the 1st FEE in the 1st GBTx of "
516  "gDPB %02u vs GBTx %02u; time in run [s]; dt [ps]",
517  uGdpb,
518  uGbtx + 1),
520  0,
522  } // for( UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb; ++uGbtx )
523 
524  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb].resize(fuNrOfGdpbs, NULL);
525  for (UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB) {
526  name = Form("hPulserTimeDiffEvoGdpb%02uGdpb%02u", uGdpb, uGdpbB);
527  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB] =
528  new TProfile(name.Data(),
529  Form("Time difference of the 1st FEE in the 1st GBTx of "
530  "gDPB %02u vs %02u; time in run [s]; dt [ps]",
531  uGdpb,
532  uGdpbB),
534  0,
536  } // for( UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB )
537  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
538 
540  for (UInt_t uFeeRef = 0; uFeeRef < kuNbRefFeeEvo; ++uFeeRef) {
541  UInt_t uGdpbRef = kuRefFeeEvoIdx[uFeeRef] / (fuNrOfFeePerGdpb);
542  UInt_t uFeeIdRef = kuRefFeeEvoIdx[uFeeRef] - (fuNrOfFeePerGdpb * uGdpbRef);
543 
545  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFee++) {
546  UInt_t uGdpb = uFee / (fuNrOfFeePerGdpb);
547  UInt_t uFeeId = uFee - (fuNrOfFeePerGdpb * uGdpb);
548 
549  fvvhPulserTimeDiffEvoFeeFee[uFeeRef][uFee] =
550  new TProfile(Form("hTimeDiffEvoFeeFee_g%02u_f%02u_g%02u_f%02u",
551  uGdpbRef,
552  uFeeIdRef,
553  uGdpb,
554  uFeeId),
555  Form("Time difference for pulser on gDPB %02u FEE %1u and "
556  "gDPB %02u FEE %02u; time in run [s]; DeltaT [ps]",
557  uGdpbRef,
558  uFeeIdRef,
559  uGdpb,
560  uFeeId),
561  fuHistoryHistoSize / 2,
562  0,
564  } // for( UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFee++)
565  } // for( UInt_t uFeeRef = 0; uFeeRef < kuNbRefFeeEvo; ++uFeeRef )
566 
567  if (server) {
568  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
569  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
570  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB])
571  server->Register("/TofDt", fvhTimeDiffPulser[uFeeA][uFeeB]);
572 
573  server->Register("/TofRaw", fhTimeMeanPulser);
574  server->Register("/TofRaw", fhTimeRmsPulser);
575  server->Register("/TofRaw", fhTimeRmsZoomFitPuls);
576  server->Register("/TofRaw", fhTimeResFitPuls);
577 
578  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
579  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx)
580  if (NULL
582  + uGbtx])
583  server->Register(
584  "/TofDtEvo",
586  + uGbtx]);
587 
588  for (UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB)
589  if (NULL != fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB])
590  server->Register("/TofDtEvo",
591  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB]);
592  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
593 
594  server->RegisterCommand("/Reset_All_eTOF",
595  "bMcbmMoniTofPulserResetHistos=kTRUE");
596  server->RegisterCommand("/Save_All_eTof",
597  "bMcbmMoniTofPulserSaveHistos=kTRUE");
598  server->RegisterCommand("/Update_PulsFit",
599  "bMcbmMoniTofPulserUpdateZoomedFit=kTRUE");
600  server->RegisterCommand("/Print_Raw_Data",
601  "bMcbmMoniTofPulserRawDataPrint=kTRUE");
602  server->RegisterCommand("/Print_AllHits",
603  "bMcbmMoniTofPulserPrintAllHitsEna=kTRUE");
604  server->RegisterCommand("/Print_AllEps",
605  "bMcbmMoniTofPulserPrintAllEpochsEna=kTRUE");
606 
607  server->Restrict("/Reset_All_eTof", "allow=admin");
608  server->Restrict("/Save_All_eTof", "allow=admin");
609  server->Restrict("/Update_PulsFit", "allow=admin");
610  server->Restrict("/Print_Raw_Data", "allow=admin");
611  server->Restrict("/Print_AllHits", "allow=admin");
612  server->Restrict("/Print_AllEps", "allow=admin");
613  } // if( server )
614 
615  /*****************************/
616  Double_t w = 10;
617  Double_t h = 10;
618 
620  TCanvas* cPulser = new TCanvas(
621  "cPulser",
622  "Time difference RMS for pulser channels when FEE pulser mode is ON",
623  w,
624  h);
625  cPulser->Divide(2, 2);
626 
627  cPulser->cd(1);
628  gPad->SetGridx();
629  gPad->SetGridy();
630  fhTimeRmsPulser->Draw("colz");
631 
632  cPulser->cd(2);
633  gPad->SetGridx();
634  gPad->SetGridy();
635  fhTimeMeanPulser->Draw("colz");
636 
637  cPulser->cd(3);
638  gPad->SetGridx();
639  gPad->SetGridy();
640  fhTimeRmsZoomFitPuls->Draw("colz");
641 
642  cPulser->cd(4);
643  gPad->SetGridx();
644  gPad->SetGridy();
645  fhTimeResFitPuls->Draw("colz");
646  /*****************************/
647 
649  TCanvas* cPulserEvo = new TCanvas(
650  "cPulserEvo",
651  "Time difference evolution between 1st FEE of 1st GBTx of gDPB pairs",
652  w,
653  h);
654  cPulserEvo->Divide(1, fuNrOfGdpbs - 1);
655  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs - 1; uGdpb++) {
656  cPulserEvo->cd(1 + uGdpb);
657  gPad->SetGridx();
658  gPad->SetGridy();
659  if (NULL != fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpb + 1])
660  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpb + 1]->Draw();
661 
662  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs - 1; uGdpb ++)
663  /*****************************/
665  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; uGdpb++) {
666  TCanvas* cPulserEvoGbtx = new TCanvas(
667  Form("cPulserEvoGbtx%02u", uGdpb),
668  Form(
669  "Time difference evolution between 1st FEE of GBTx pairs in gDPB %02u",
670  uGdpb),
671  w,
672  h);
673  cPulserEvoGbtx->Divide(1, kuNbGbtxPerGdpb - 1);
674 
675  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx) {
676  cPulserEvoGbtx->cd(1 + uGbtx);
677  gPad->SetGridx();
678  gPad->SetGridy();
679 
680  if (NULL
682  + uGbtx])
683  fvhPulserTimeDiffEvoGbtxGbtx[uGdpb * (kuNbGbtxPerGdpb - 1) + uGbtx]
684  ->Draw();
685  } // for( UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx )
686  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; uGdpb ++)
687  /*****************************/
688 
690  // Try to recover canvas in case it was created already by another monitor
691  // If not existing, create it
692  fcMsSizeAll = dynamic_cast<TCanvas*>(gROOT->FindObject("cMsSizeAll"));
693  if (NULL == fcMsSizeAll) {
694  fcMsSizeAll =
695  new TCanvas("cMsSizeAll", "Evolution of MS size in last 300 s", w, h);
696  fcMsSizeAll->Divide(4, 3);
697  LOG(info) << "Created MS size canvas in TOF monitor";
698  } // if( NULL == fcMsSizeAll )
699  else
700  LOG(info) << "Recovered MS size canvas in TOF monitor";
701 
702  LOG(info) << "Leaving CreateHistograms";
703 }
704 
705 Bool_t CbmMcbm2018MonitorTofPulser::DoUnpack(const fles::Timeslice& ts,
706  size_t component) {
708  LOG(info) << "Reset eTOF STAR histos ";
709  ResetAllHistos();
711  } // if( bMcbmMoniTofPulserResetHistos )
713  LOG(info) << "Start saving eTOF STAR histos ";
714  SaveAllHistos("data/histos_Shift_StarTof.root");
716  } // if( bSaveStsHistos )
718  UpdateZoomedFit();
720  } // if (bMcbmMoniTofPulserUpdateZoomedFit)
724  } // if( bMcbmMoniTofPulserRawDataPrint )
728  } // if( bMcbmMoniTofPulserPrintAllHitsEna )
732  } // if( bMcbmMoniTofPulserPrintAllEpochsEna )
733 
735  std::chrono::time_point<std::chrono::system_clock> timeCurrent =
736  std::chrono::system_clock::now();
737  std::chrono::duration<double> elapsed_seconds =
738  timeCurrent - fTimeLastHistoSaving;
739  if (0 == fTimeLastHistoSaving.time_since_epoch().count()) {
740  fTimeLastHistoSaving = timeCurrent;
741  // fulNbBuiltSubEventLastPrintout = fulNbBuiltSubEvent;
742  // fulNbStarSubEventLastPrintout = fulNbStarSubEvent;
743  } // if( 0 == fTimeLastHistoSaving.time_since_epoch().count() )
744  else if (300 < elapsed_seconds.count()) {
745  std::time_t cTimeCurrent =
746  std::chrono::system_clock::to_time_t(timeCurrent);
747  char tempBuff[80];
748  std::strftime(tempBuff, 80, "%F %T", localtime(&cTimeCurrent));
749  /*
750  LOG(info) << "CbmTofStarEventBuilder2018::DoUnpack => " << tempBuff
751  << " Total number of Built events: " << std::setw(9) << fulNbBuiltSubEvent
752  << ", " << std::setw(9) << (fulNbBuiltSubEvent - fulNbBuiltSubEventLastPrintout)
753  << " events in last " << std::setw(4) << elapsed_seconds.count() << " s";
754  fTimeLastPrintoutNbStarEvent = timeCurrent;
755  fulNbBuiltSubEventLastPrintout = fulNbBuiltSubEvent;
756 */
757  fTimeLastHistoSaving = timeCurrent;
758  SaveAllHistos("data/histos_tof_pulser.root");
759  } // else if( 300 < elapsed_seconds.count() )
760 
761  LOG(debug1) << "Timeslice contains " << ts.num_microslices(component)
762  << "microslices.";
763 
765  UInt_t uNbMsLoop = fuNbCoreMsPerTs;
766  if (kFALSE == fbIgnoreOverlapMs) uNbMsLoop += fuNbOverMsPerTs;
767 
768  Int_t messageType = -111;
769  Double_t dTsStartTime = -1;
770 
772  for (UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx++) {
773  if (fuMsAcceptsPercent < uMsIdx) continue;
774 
775  fuCurrentMs = uMsIdx;
776 
777  if (0 == fulCurrentTsIndex && 0 == uMsIdx) {
778  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
779  ++uMsCompIdx) {
780  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
781  auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
782  /*
783  LOG(info) << "hi hv eqid flag si sv idx/start crc size offset";
784  LOG(info) << Form( "%02x %02x %04x %04x %02x %02x %016llx %08x %08x %016llx",
785  static_cast<unsigned int>(msDescriptor.hdr_id),
786  static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
787  static_cast<unsigned int>(msDescriptor.sys_id),
788  static_cast<unsigned int>(msDescriptor.sys_ver), msDescriptor.idx, msDescriptor.crc,
789  msDescriptor.size, msDescriptor.offset );
790 */
791  LOG(info) << FormatMsHeaderPrintout(msDescriptor);
792  } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
793  } // if( 0 == fulCurrentTsIndex && 0 == uMsIdx )
794 
796  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
797  ++uMsCompIdx) {
798  constexpr uint32_t kuBytesPerMessage = 8;
799 
800  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
801  auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
802  fiEquipmentId = msDescriptor.eq_id;
803  fdMsIndex = static_cast<double>(msDescriptor.idx);
804  fuCurrentMsSysId = static_cast<unsigned int>(msDescriptor.sys_id);
805  const uint8_t* msContent =
806  reinterpret_cast<const uint8_t*>(ts.content(uMsComp, uMsIdx));
807 
808  uint32_t size = msDescriptor.size;
809  // fulLastMsIdx = msDescriptor.idx;
810  if (size > 0)
811  LOG(debug) << "Microslice: " << msDescriptor.idx
812  << " has size: " << size;
813  /*
814  if( numCompMsInTs - fuOverlapMsNb <= m )
815  {
816 // LOG(info) << "Ignore overlap Microslice: " << msDescriptor.idx;
817  continue;
818  } // if( numCompMsInTs - fuOverlapMsNb <= m )
819 */
820  if (0 == uMsIdx && 0 == uMsCompIdx) dTsStartTime = (1e-9) * fdMsIndex;
821 
822  if (fdStartTimeMsSz < 0) fdStartTimeMsSz = (1e-9) * fdMsIndex;
823  fvhMsSzPerLink[uMsComp]->Fill(size);
824  if (2 * fuHistoryHistoSize < (1e-9) * fdMsIndex - fdStartTimeMsSz) {
825  // Reset the evolution Histogram and the start time when we reach the end of the range
826  fvhMsSzTimePerLink[uMsComp]->Reset();
827  fdStartTimeMsSz = (1e-9) * fdMsIndex;
828  } // if( 2 * fuHistoryHistoSize < (1e-9) * fdMsIndex - fdStartTimeMsSz )
829  fvhMsSzTimePerLink[uMsComp]->Fill((1e-9) * fdMsIndex - fdStartTimeMsSz,
830  size);
831 
832  // If not integer number of message in input buffer, print warning/error
833  if (0 != (size % kuBytesPerMessage))
834  LOG(error) << "The input microslice buffer does NOT "
835  << "contain only complete nDPB messages!";
836 
837  // Compute the number of complete messages in the input microslice buffer
838  uint32_t uNbMessages =
839  (size - (size % kuBytesPerMessage)) / kuBytesPerMessage;
840 
841  // Get the gDPB ID from the MS header
843 
845  auto it = fGdpbIdIndexMap.find(fuGdpbId);
846  if (it == fGdpbIdIndexMap.end()) {
847  LOG(info)
848  << "---------------------------------------------------------------";
849  /*
850  LOG(info) << "hi hv eqid flag si sv idx/start crc size offset";
851  LOG(info) << Form( "%02x %02x %04x %04x %02x %02x %016llx %08x %08x %016llx",
852  static_cast<unsigned int>(msDescriptor.hdr_id),
853  static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
854  static_cast<unsigned int>(msDescriptor.sys_id),
855  static_cast<unsigned int>(msDescriptor.sys_ver), msDescriptor.idx, msDescriptor.crc,
856  msDescriptor.size, msDescriptor.offset );
857 */
858  LOG(info) << FormatMsHeaderPrintout(msDescriptor);
859  LOG(warning) << "Could not find the gDPB index for AFCK id 0x"
860  << std::hex << fuGdpbId << std::dec << " in timeslice "
861  << fulCurrentTsIndex << " in microslice " << fdMsIndex
862  << " component " << uMsCompIdx << "\n"
863  << "If valid this index has to be added in the TOF "
864  "parameter file in the RocIdArray field";
865  continue;
866  } // if( it == fGdpbIdIndexMap.end() )
867  else
869 
870  // Prepare variables for the loop on contents
871  const uint64_t* pInBuff = reinterpret_cast<const uint64_t*>(msContent);
872  for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
873  // Fill message
874  uint64_t ulData = static_cast<uint64_t>(pInBuff[uIdx]);
875 
877  if (0 == uIdx && kFALSE == fbOldFwData) {
878  ProcessEpochCycle(ulData);
879  continue;
880  } // if( 0 == uIdx && kFALSE == fbOldFwData )
881 
882  gdpbv100::Message mess(ulData);
883 
885  || gLogger->IsLogNeeded(fair::Severity::debug2)) {
886  mess.printDataCout();
888  } // if( fuRawDataPrintMsgIdx < fuRawDataPrintMsgNb || gLogger->IsLogNeeded( fair::Severity::debug2 ) )
889 
890  // Increment counter for different message types
891  // and fill the corresponding histogram
892  messageType = mess.getMessageType();
893  fviMsgCounter[messageType]++;
894 
898  if (fuGdpbNr == fuDiamondDpbIdx || 0x90 == fuCurrentMsSysId)
899  fuGet4Id = mess.getGdpbGenChipId();
901 
902  if (fuNrOfGet4PerGdpb <= fuGet4Id && !mess.isStarTrigger()
904  LOG(warning) << "Message with Get4 ID too high: " << fuGet4Id
905  << " VS " << fuNrOfGet4PerGdpb << " set in parameters.";
906 
907  switch (messageType) {
908  case gdpbv100::MSG_HIT: {
909  if (mess.getGdpbHitIs24b()) {
910  PrintGenInfo(mess);
911  } // if( getGdpbHitIs24b() )
912  else {
913  fvmEpSupprBuffer[fuGet4Nr].push_back(mess);
914  } // else of if( getGdpbHitIs24b() )
915  break;
916  } // case gdpbv100::MSG_HIT:
917  case gdpbv100::MSG_EPOCH: {
919  for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb;
920  uGet4Index++) {
921  fuGet4Id = uGet4Index;
923  gdpbv100::Message tmpMess(mess);
924  tmpMess.setGdpbGenChipId(uGet4Index);
925 
926  FillEpochInfo(tmpMess);
927  } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGetIndex ++ )
928 
929  if (kTRUE == fbPrintAllEpochsEnable) {
930  LOG(info) << "Epoch: " << Form("0x%08x ", fuGdpbId) << ", Merg"
931  << ", Link " << std::setw(1) << mess.getGdpbEpLinkId()
932  << ", epoch " << std::setw(8)
933  << mess.getGdpbEpEpochNb() << ", Sync "
934  << std::setw(1) << mess.getGdpbEpSync()
935  << ", Data loss " << std::setw(1)
936  << mess.getGdpbEpDataLoss() << ", Epoch loss "
937  << std::setw(1) << mess.getGdpbEpEpochLoss()
938  << ", Epoch miss " << std::setw(1)
939  << mess.getGdpbEpMissmatch();
940  } // if( kTRUE == fbPrintAllEpochsEnable )
941  } // if this epoch message is a merged one valid for all chips
942  else {
943  FillEpochInfo(mess);
944 
945  if (kTRUE == fbPrintAllEpochsEnable) {
946  LOG(info) << "Epoch: " << Form("0x%08x ", fuGdpbId) << ", "
947  << std::setw(4) << fuGet4Nr << ", Link "
948  << std::setw(1) << mess.getGdpbEpLinkId()
949  << ", epoch " << std::setw(8)
950  << mess.getGdpbEpEpochNb() << ", Sync "
951  << std::setw(1) << mess.getGdpbEpSync()
952  << ", Data loss " << std::setw(1)
953  << mess.getGdpbEpDataLoss() << ", Epoch loss "
954  << std::setw(1) << mess.getGdpbEpEpochLoss()
955  << ", Epoch miss " << std::setw(1)
956  << mess.getGdpbEpMissmatch();
957  } // if( kTRUE == fbPrintAllEpochsEnable )
958  } // if single chip epoch message
959  break;
960  } // case gdpbv100::MSG_EPOCH:
961  case gdpbv100::MSG_SLOWC: {
962  PrintSlcInfo(mess);
963  break;
964  } // case gdpbv100::MSG_SLOWC:
965  case gdpbv100::MSG_SYST: {
967 
968  // UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
969  /*
970  if (0 <= fdStartTime)
971  {
972  fvhFeeErrorRate_gDPB[(fuGdpbNr * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
973  1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime));
974  fvhFeeErrorRatio_gDPB[(fuGdpbNr * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
975  1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime), 1, 1 );
976 
977  UInt_t uGbtxNr = (uFeeNr / kuNbFeePerGbtx);
978  UInt_t uGbtxNrInSys = fuGdpbNr * kuNbGbtxPerGdpb + uGbtxNr;
979  fvhModErrorRate[ fviModuleId[ uGbtxNrInSys ] ]->Fill(
980  1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime));
981  fvhModErrorRatio[ fviModuleId[ uGbtxNrInSys ] ]->Fill(
982  1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime), 1, 1);
983  } // if (0 <= fdStartTime)
984  if (0 <= fdStartTimeLong)
985  {
986  fvhFeeErrorRateLong_gDPB[(fuGdpbNr * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
987  1e-9 / 60.0 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTimeLong), 1 / 60.0);
988  fvhFeeErrorRatioLong_gDPB[(fuGdpbNr * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
989  1e-9 / 60.0 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTimeLong), 1, 1 / 60.0);
990  } // if (0 <= fdStartTime)
991 */
992  // Int_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4 + mess.getGdpbSysErrChanId();
993  // Int_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4 + mess.getGdpbSysErrChanId();
994  } // if( gdpbv100::SYSMSG_GET4_EVENT == mess.getGdpbSysSubType() )
996  FillPattInfo(mess);
997  } // if( gdpbv100::SYS_PATTERN == mess.getGdpbSysSubType() )
998  PrintSysInfo(mess);
999  break;
1000  } // case gdpbv100::MSG_SYST:
1005  // fhGet4MessType->Fill(fuGet4Nr, 5);
1006  FillStarTrigInfo(mess);
1007  break;
1008  default:
1009  LOG(error) << "Message type " << std::hex << std::setw(2)
1010  << static_cast<uint16_t>(messageType)
1011  << " not included in Get4 unpacker.";
1012  } // switch( mess.getMessageType() )
1013  } // for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx ++)
1014  } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
1015 
1018  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeA) {
1019  if (1 != fvuFeeNbHitsLastMs[uFeeA]) {
1021  fvuFeeNbHitsLastMs[uFeeA] = 0;
1022  continue;
1023  } // if( 1 != fvuFeeNbHitsLastMs[ uFeeA ] )
1024 
1025  UInt_t uGdpbNr = uFeeA / fuNrOfFeePerGdpb;
1026  UInt_t uGbtxNr = (uFeeA % fuNrOfFeePerGdpb) / kuNbFeePerGbtx;
1027 
1028  UInt_t uFeeRefIndexA = kuNbRefFeeEvo;
1029  for (UInt_t uFeeRef = 0; uFeeRef < kuNbRefFeeEvo; ++uFeeRef)
1030  if (kuRefFeeEvoIdx[uFeeRef] == uFeeA) uFeeRefIndexA = uFeeRef;
1031 
1033  for (UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs;
1034  ++uFeeB) {
1035  if (1 != fvuFeeNbHitsLastMs[uFeeB]) continue;
1036 
1037  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB]) {
1038  UInt_t uFeeRefIndexB = kuNbRefFeeEvo;
1039  for (UInt_t uFeeRef = 0; uFeeRef < kuNbRefFeeEvo; ++uFeeRef)
1040  if (kuRefFeeEvoIdx[uFeeRef] == uFeeB) uFeeRefIndexB = uFeeRef;
1041 
1042  Double_t dTimeDiff =
1043  1e3 * (fdTsLastPulserHit[uFeeB] - fdTsLastPulserHit[uFeeA]);
1044  if (TMath::Abs(dTimeDiff) < kdMaxDtPulserPs) {
1045  fvhTimeDiffPulser[uFeeA][uFeeB]->Fill(dTimeDiff);
1046 
1047  if (uFeeRefIndexA < kuNbRefFeeEvo)
1048  fvvhPulserTimeDiffEvoFeeFee[uFeeRefIndexA][uFeeB]->Fill(
1049  1e-9 * (fdTsLastPulserHit[uFeeA] - fdStartTime), dTimeDiff);
1050 
1051  if (uFeeRefIndexB < kuNbRefFeeEvo)
1052  fvvhPulserTimeDiffEvoFeeFee[uFeeRefIndexB][uFeeA]->Fill(
1053  1e-9 * (fdTsLastPulserHit[uFeeB] - fdStartTime),
1054  -1.0 * dTimeDiff);
1055 
1057  if (0 == uFeeA % kuNbFeePerGbtx && 0 == uFeeB % kuNbFeePerGbtx) {
1058  UInt_t uGdpbNrB = uFeeB / fuNrOfFeePerGdpb;
1059  UInt_t uGbtxNrB = (uFeeB % fuNrOfFeePerGdpb) / kuNbFeePerGbtx;
1060 
1062  if (uGdpbNr == uGdpbNrB) {
1063  if (0 == uGbtxNr) {
1064  UInt_t uPlotIdx =
1065  uGdpbNr * (kuNbGbtxPerGdpb - 1) + uGbtxNrB - 1;
1066  fvhPulserTimeDiffEvoGbtxGbtx[uPlotIdx]->Fill(
1067  1e-9 * (fdTsLastPulserHit[uFeeA] - fdStartTime), dTimeDiff);
1068  } // if( 0 == uGbtxNr )
1069  } // if( uGdpbNr == uFeeB / fuNrOfFeePerGdpb )
1070  else // if( NULL != fvvhPulserTimeDiffEvoGdpbGdpb[ uFeeB / fuNrOfFeePerGdpb ][ uGdpbNr ] )
1071  {
1073  if (0 == uGbtxNr && 0 == uGbtxNrB)
1074  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpbNr][uFeeB
1075  / fuNrOfFeePerGdpb]
1076  ->Fill(1e-9 * (fdTsLastPulserHit[uFeeA] - fdStartTime),
1077  dTimeDiff);
1078  } // else of if( uGdpbNr == uFeeB / fuNrOfFeePerGdpb )
1079  } // if( 0 == uFeeA % kuNbFeePerGbtx && 0 == uFeeB % kuNbFeePerGbtx )
1080  } // if( TMath::Abs( dTimeDiff ) < kdMaxDtPulserPs )
1081  // else if( 10 == uFeeA && 20 == uFeeB )
1082  // LOG(info) << "new in 10 " << dTimeDiff;
1083  } // if( NULL != fvhTimeDiffPulser[uFeeA][uFeeB] )
1084  } // for( UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeB)
1085 
1087  fvuFeeNbHitsLastMs[uFeeA] = 0;
1088  } // for( UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeA)
1089  } // for( UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx ++ )
1090 
1091  // Update RMS plots only every 10s in data
1092  if (10.0 < dTsStartTime - fdLastRmsUpdateTime) {
1093  // Reset summary histograms for safety
1094  fhTimeMeanPulser->Reset();
1095  fhTimeRmsPulser->Reset();
1096 
1097  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
1098  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
1099  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB]) {
1100  fhTimeMeanPulser->Fill(
1101  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetMean());
1102  fhTimeRmsPulser->Fill(
1103  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetRMS());
1104  } // for( UInt_t uChan = 0; uChan < kuNbChanTest - 1; uChan++)
1105  fdLastRmsUpdateTime = dTsStartTime;
1106  } // if( 10.0 < dTsStartTime - fdLastRmsUpdateTime )
1107 
1109 
1110  return kTRUE;
1111 }
1112 
1114  uint64_t ulEpochCycleVal = ulCycleData & gdpbv100::kulEpochCycleFieldSz;
1115 
1117  || gLogger->IsLogNeeded(fair::Severity::debug2)) {
1118  LOG(info)
1119  << "CbmMcbm2018MonitorTofPulser::ProcessEpochCyle => "
1120  // << Form( " TS %5llu MS %3lu In data 0x%016llX Cycle 0x%016llX",
1121  // fulCurrentTsIndex, fuCurrentMs, ulCycleData, ulEpochCycleVal );
1122  << " TS " << FormatDecPrintout(fulCurrentTsIndex, 5) << " MS "
1123  << FormatDecPrintout(fuCurrentMs, 3) << " In data 0x"
1124  << FormatHexPrintout(ulCycleData, 16, '0', true) << " Cycle 0x"
1125  << FormatHexPrintout(ulEpochCycleVal, 16, '0', true);
1127  } // if( fuRawDataPrintMsgIdx < fuRawDataPrintMsgNb || gLogger->IsLogNeeded( fair::Severity::debug2 ) )
1128 
1129  for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index++) {
1130  fuGet4Id = uGet4Index;
1132  /*
1133  if( !( ulEpochCycleVal == fvulCurrentEpochCycle[fuGet4Nr] ||
1134  ulEpochCycleVal == fvulCurrentEpochCycle[fuGet4Nr] + 1 ) )
1135  LOG(error) << "CbmMcbm2018MonitorTofPulser::ProcessEpochCyle => "
1136  << " Missmatch in epoch cycles detected, probably fake cycles due to epoch index corruption! "
1137  << Form( " Current cycle 0x%09X New cycle 0x%09X", fvulCurrentEpochCycle[fuGet4Nr], ulEpochCycleVal );
1138 */
1139  fvulCurrentEpochCycle[fuGet4Nr] = ulEpochCycleVal;
1140  } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index ++ )
1141  return;
1142 }
1143 
1145  UInt_t uChannel = mess.getGdpbHitChanId();
1146  UInt_t uTot = mess.getGdpbHit32Tot();
1147  UInt_t uFts = mess.getGdpbHitFineTs();
1148 
1149  ULong64_t ulCurEpochGdpbGet4 = fvulCurrentEpoch[fuGet4Nr];
1150 
1151  // In Ep. Suppr. Mode, receive following epoch instead of previous
1152  if (0 < ulCurEpochGdpbGet4)
1153  ulCurEpochGdpbGet4--;
1154  else
1155  ulCurEpochGdpbGet4 = gdpbv100::kuEpochCounterSz; // Catch epoch cycle!
1156 
1157  // UInt_t uChannelNr = fuGet4Id * fuNrOfChannelsPerGet4 + uChannel;
1158  UInt_t uChannelNrInFee =
1160  UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
1161  UInt_t uFeeNrInSys = fuGdpbNr * fuNrOfFeePerGdpb + uFeeNr;
1162  // UInt_t uRemappedChannelNr = uFeeNr * fuNrOfChannelsPerFee + fvuGet4ToPadi[ uChannelNrInFee ];
1164  // if( fuGdpbNr == fuDiamondDpbIdx || 0x90 == fuCurrentMsSysId )
1165  // uRemappedChannelNr = uChannelNr;
1166  // UInt_t uGbtxNr = (uFeeNr / kuNbFeePerGbtx);
1167  // UInt_t uFeeInGbtx = (uFeeNr % kuNbFeePerGbtx);
1168  // UInt_t uGbtxNrInSys = fuGdpbNr * kuNbGbtxPerGdpb + uGbtxNr;
1169 
1170  ULong_t ulHitTime = mess.getMsgFullTime(ulCurEpochGdpbGet4);
1171  Double_t dHitTime = mess.getMsgFullTimeD(ulCurEpochGdpbGet4);
1172 
1173  // In 32b mode the coarse counter is already computed back to 112 FTS bins
1174  // => need to hide its contribution from the Finetime
1175  // => FTS = Fullt TS modulo 112
1176  uFts = mess.getGdpbHitFullTs() % 112;
1177 
1178  // In Run rate evolution
1179  if (fdStartTime < 0) fdStartTime = dHitTime;
1180 
1181  // Reset the evolution Histogram and the start time when we reach the end of the range
1182  if (fuHistoryHistoSize < 1e-9 * (dHitTime - fdStartTime)) {
1184  fdStartTime = dHitTime;
1185  } // if( fuHistoryHistoSize < 1e-9 * (dHitTime - fdStartTime) )
1186 
1187  // In Run rate evolution
1188  if (fdStartTimeLong < 0) fdStartTimeLong = dHitTime;
1189 
1190  // Reset the evolution Histogram and the start time when we reach the end of the range
1191  if (fuHistoryHistoSizeLong < 1e-9 * (dHitTime - fdStartTimeLong) / 60.0) {
1193  fdStartTimeLong = dHitTime;
1194  } // if( fuHistoryHistoSize < 1e-9 * (dHitTime - fdStartTime) / 60.0 )
1195 
1199  if (92 < uTot && uTot < 95) {
1200  if (gdpbv100::kuFeePulserChannel == uChannelNrInFee
1201  && fuGdpbNr != fuDiamondDpbIdx && 0x90 != fuCurrentMsSysId) {
1202  fdTsLastPulserHit[uFeeNrInSys] = dHitTime;
1203  fvuFeeNbHitsLastMs[uFeeNrInSys]++;
1204  fvhPulserCountEvoPerFeeGdpb[fuGdpbNr]->Fill(dHitTime * 1e-9, uFeeNr);
1205  } // if( gdpbv100::kuFeePulserChannel == uChannelNrInFee && fuGdpbNr != fuDiamondDpbIdx && 0x90 != fuCurrentMsSysId )
1207  else if ((fuGdpbNr == fuDiamondDpbIdx || 0x90 == fuCurrentMsSysId)
1208  && 0 == uChannelNrInFee) {
1209  fdTsLastPulserHit[uFeeNrInSys] = dHitTime;
1210  fvuFeeNbHitsLastMs[uFeeNrInSys]++;
1211  fvhPulserCountEvoPerFeeGdpb[fuGdpbNr]->Fill(dHitTime * 1e-9, uFeeNr);
1212  } // if( ( fuGdpbNr == fuDiamondDpbIdx || 0x90 == fuCurrentMsSysId ) && 0 == uChannelNrInFee )
1213  } // if( 92 < uTot && uTot < 95 )
1214 
1215  /*
1216  if (0 <= fdStartTime)
1217  {
1218  fvhChannelRate_gDPB[ fuGdpbNr ]->Fill( 1e-9 * (dHitTime - fdStartTime), uChannelNr );
1219  fvhRemapChRate_gDPB[ fuGdpbNr ]->Fill( 1e-9 * (dHitTime - fdStartTime), uRemappedChannelNr );
1220  fvhFeeRate_gDPB[(fuGdpbNr * fuNrOfFeePerGdpb) + uFeeNr]->Fill( 1e-9 * (dHitTime - fdStartTime));
1221  fvhFeeErrorRatio_gDPB[(fuGdpbNr * fuNrOfFeePerGdpb) + uFeeNr]->Fill( 1e-9 * (dHitTime - fdStartTime), 0, 1);
1222 
1223  fvhModRate[ fviModuleId[ uGbtxNrInSys ] ]->Fill( 1e-9 * (dHitTime - fdStartTime));
1224  fvhModErrorRatio[ fviModuleId[ uGbtxNrInSys ] ]->Fill( 1e-9 * (dHitTime - fdStartTime), 0, 1);
1225  } // if (0 <= fdStartTime)
1226 
1227  if (0 <= fdStartTimeLong)
1228  {
1229  fvhFeeRateLong_gDPB[(fuGdpbNr * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
1230  1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 1 / 60.0 );
1231  fvhFeeErrorRatioLong_gDPB[(fuGdpbNr * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
1232  1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 0, 1 / 60.0 );
1233  } // if (0 <= fdStartTimeLong)
1234 */
1235  if (kTRUE == fbPrintAllHitsEnable) {
1236  LOG(info) << "Hit: " << Form("0x%08x ", fuGdpbId) << ", " << std::setw(2)
1237  << fuGet4Nr << ", " << std::setw(3) << uChannel << ", "
1238  << std::setw(3) << uTot << ", epoch " << std::setw(3)
1239  << ulCurEpochGdpbGet4 << ", FullTime Clk "
1240  << Form("%12lu ", ulHitTime) << ", FullTime s "
1241  << Form("%12.9f ", dHitTime / 1e9) << ", FineTime " << uFts;
1242  } // if( kTRUE == fbPrintAllHitsEnable )
1243 }
1244 
1246  ULong64_t ulEpochNr = mess.getGdpbEpEpochNb();
1247  /*
1248  if( fvulCurrentEpoch[fuGet4Nr] < ulEpochNr )
1249  fvulCurrentEpochCycle[fuGet4Nr]++;
1250 */
1251  fvulCurrentEpoch[fuGet4Nr] = ulEpochNr;
1254 
1255  fulCurrentEpochTime = mess.getMsgFullTime(ulEpochNr);
1256 
1259  if (0 < ulEpochNr)
1260  mess.setGdpbEpEpochNb(ulEpochNr - 1);
1261  else
1263 
1264  Int_t iBufferSize = fvmEpSupprBuffer[fuGet4Nr].size();
1265  if (0 < iBufferSize) {
1266  LOG(debug) << "Now processing stored messages for for get4 " << fuGet4Nr
1267  << " with epoch number " << (fvulCurrentEpoch[fuGet4Nr] - 1);
1268 
1271  std::stable_sort(fvmEpSupprBuffer[fuGet4Nr].begin(),
1272  fvmEpSupprBuffer[fuGet4Nr].begin());
1273 
1274  for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
1276  } // for( Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++ )
1277 
1278  fvmEpSupprBuffer[fuGet4Nr].clear();
1279  } // if( 0 < fvmEpSupprBuffer[fuGet4Nr] )
1280 }
1281 
1283  /*
1284  if (fGdpbIdIndexMap.end() != fGdpbIdIndexMap.find(fuGdpbId))
1285  {
1286  UInt_t uChip = mess.getGdpbGenChipId();
1287  UInt_t uChan = mess.getGdpbSlcChan();
1288  UInt_t uEdge = mess.getGdpbSlcEdge();
1289  UInt_t uData = mess.getGdpbSlcData();
1290  UInt_t uType = mess.getGdpbSlcType();
1291  Double_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1292  Double_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1293  Double_t dMessTime = static_cast< Double_t>( fulCurrentEpochTime ) * 1.e-9;
1294 
1295 
1296  }
1297 */
1298 }
1299 
1301  Int_t mType = mess.getMessageType();
1302  Int_t channel = mess.getGdpbHitChanId();
1303  uint64_t uData = mess.getData();
1304 
1305  LOG(debug) << "Get4 MSG type " << mType << " from gdpbId " << fuGdpbId
1306  << ", getId " << fuGet4Id << ", (hit channel) " << channel
1307  << " data " << std::hex << uData;
1308 }
1309 
1311  if (fGdpbIdIndexMap.end() != fGdpbIdIndexMap.find(fuGdpbId))
1312  LOG(debug) << "GET4 System message, epoch "
1313  << static_cast<Int_t>(fvulCurrentEpoch[fuGet4Nr]) << ", time "
1314  << std::setprecision(9) << std::fixed
1315  << Double_t(fulCurrentEpochTime) * 1.e-9 << " s "
1316  << " for board ID " << std::hex << std::setw(4) << fuGdpbId
1317  << std::dec;
1318 
1319  switch (mess.getGdpbSysSubType()) {
1320  case gdpbv100::SYS_GET4_ERROR: {
1321  uint32_t uData = mess.getGdpbSysErrData();
1328  LOG(debug) << " +++++++ > gDPB: " << std::hex << std::setw(4)
1329  << fuGdpbId << std::dec << ", Chip = " << std::setw(2)
1330  << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
1331  << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1)
1332  << mess.getGdpbSysErrEdge() << ", Empt = " << std::setw(1)
1333  << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
1334  << std::setw(2) << uData << std::dec
1335  << " -- GET4 V1 Error Event";
1336  else
1337  LOG(debug) << " +++++++ >gDPB: " << std::hex << std::setw(4) << fuGdpbId
1338  << std::dec << ", Chip = " << std::setw(2)
1339  << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
1340  << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1)
1341  << mess.getGdpbSysErrEdge() << ", Empt = " << std::setw(1)
1342  << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
1343  << std::setw(2) << uData << std::dec
1344  << " -- GET4 V1 Error Event ";
1345  break;
1346  } // case gdpbv100::SYSMSG_GET4_EVENT
1347  case gdpbv100::SYS_GDPB_UNKWN: {
1348  LOG(debug) << "Unknown GET4 message, data: " << std::hex << std::setw(8)
1349  << mess.getGdpbSysUnkwData() << std::dec
1350  << " Full message: " << std::hex << std::setw(16)
1351  << mess.getData() << std::dec;
1352  break;
1353  } // case gdpbv100::SYS_GDPB_UNKWN:
1355  if (mess.getGdpbSysFwErrResync())
1356  LOG(info) << Form("GET4 Resynchronization: Get4:0x%04x ",
1357  mess.getGdpbGenChipId())
1358  << std::hex << std::setw(4) << fuGdpbId << std::dec;
1359  else
1360  LOG(info) << "GET4 synchronization pulse missing in gDPB " << std::hex
1361  << std::setw(4) << fuGdpbId << std::dec;
1362  break;
1363  } // case gdpbv100::SYS_GET4_SYNC_MISS:
1364  case gdpbv100::SYS_PATTERN: {
1365  LOG(debug) << "ASIC pattern for missmatch, disable or resync";
1366  break;
1367  } // case gdpbv100::SYS_PATTERN:
1368  default: {
1369  LOG(debug) << "Crazy system message, subtype "
1370  << mess.getGdpbSysSubType();
1371  break;
1372  } // default
1373 
1374  } // switch( getGdpbSysSubType() )
1375 }
1376 
1378  /*
1379  uint16_t usType = mess.getGdpbSysPattType();
1380  uint16_t usIndex = mess.getGdpbSysPattIndex();
1381  uint32_t uPattern = mess.getGdpbSysPattPattern();
1382 
1383  switch( usType )
1384  {
1385  case gdpbv100::PATT_MISSMATCH:
1386  {
1387  LOG(debug) << Form( "Missmatch pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern );
1388  for( UInt_t uBit = 0; uBit < 32; ++uBit )
1389  if( ( uPattern >> uBit ) & 0x1 )
1390  {
1391  UInt_t uBadAsic = ConvertElinkToGet4( 32 * usIndex + uBit );
1393  if( fuGdpbNr == fuDiamondDpbIdx || 0x90 == fuCurrentMsSysId )
1394  uBadAsic = 32 * usIndex + uBit;
1395  } // if( ( uPattern >> uBit ) & 0x1 )
1396 
1397  break;
1398  } // case gdpbv100::PATT_MISSMATCH:
1399  case gdpbv100::PATT_ENABLE:
1400  {
1401  for( UInt_t uBit = 0; uBit < 32; ++uBit )
1402  if( ( uPattern >> uBit ) & 0x1 )
1403  {
1404  UInt_t uBadAsic = ConvertElinkToGet4( 32 * usIndex + uBit );
1406  if( fuGdpbNr == fuDiamondDpbIdx || 0x90 == fuCurrentMsSysId )
1407  uBadAsic = 32 * usIndex + uBit;
1408  } // if( ( uPattern >> uBit ) & 0x1 )
1409 
1410  break;
1411  } // case gdpbv100::PATT_ENABLE:
1412  case gdpbv100::PATT_RESYNC:
1413  {
1414  LOG(debug) << Form( "RESYNC pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern );
1415 
1416  for( UInt_t uBit = 0; uBit < 32; ++uBit )
1417  if( ( uPattern >> uBit ) & 0x1 )
1418  {
1419  UInt_t uBadAsic = ConvertElinkToGet4( 32 * usIndex + uBit );
1421  if( fuGdpbNr == fuDiamondDpbIdx || 0x90 == fuCurrentMsSysId )
1422  uBadAsic = 32 * usIndex + uBit;
1423  } // if( ( uPattern >> uBit ) & 0x1 )
1424 
1425  break;
1426  } // case gdpbv100::PATT_RESYNC:
1427  default:
1428  {
1429  LOG(debug) << "Crazy pattern message, subtype " << usType;
1430  break;
1431  } // default
1432  } // switch( usType )
1433 */
1434  return;
1435 }
1436 
1438  Int_t iMsgIndex = mess.getStarTrigMsgIndex();
1439 
1440  switch (iMsgIndex) {
1441  case 0: fvulGdpbTsMsb[fuGdpbNr] = mess.getGdpbTsMsbStarA(); break;
1442  case 1:
1445  break;
1446  case 2: fvulStarTsMid[fuGdpbNr] = mess.getStarTsMidStarC(); break;
1447  case 3: {
1448 
1449  ULong64_t ulNewGdpbTsFull =
1451  ULong64_t ulNewStarTsFull = (fvulStarTsMsb[fuGdpbNr] << 48)
1452  + (fvulStarTsMid[fuGdpbNr] << 8)
1453  + mess.getStarTsLsbStarD();
1454  UInt_t uNewToken = mess.getStarTokenStarD();
1455  UInt_t uNewDaqCmd = mess.getStarDaqCmdStarD();
1456  UInt_t uNewTrigCmd = mess.getStarTrigCmdStarD();
1457 
1458  if ((uNewToken == fvuStarTokenLast[fuGdpbNr])
1459  && (ulNewGdpbTsFull == fvulGdpbTsFullLast[fuGdpbNr])
1460  && (ulNewStarTsFull == fvulStarTsFullLast[fuGdpbNr])
1461  && (uNewDaqCmd == fvuStarDaqCmdLast[fuGdpbNr])
1462  && (uNewTrigCmd == fvuStarTrigCmdLast[fuGdpbNr])) {
1463  UInt_t uTrigWord = ((fvuStarTrigCmdLast[fuGdpbNr] & 0x00F) << 16)
1464  + ((fvuStarDaqCmdLast[fuGdpbNr] & 0x00F) << 12)
1465  + ((fvuStarTokenLast[fuGdpbNr] & 0xFFF));
1466  LOG(warning) << "Possible error: identical STAR tokens found twice in "
1467  "a row => ignore 2nd! "
1468  << " TS " << fulCurrentTsIndex << " gDBB #" << fuGdpbNr
1469  << " " << Form("token = %5u ", fvuStarTokenLast[fuGdpbNr])
1470  << Form("gDPB ts = %12llu ", fvulGdpbTsFullLast[fuGdpbNr])
1471  << Form("STAR ts = %12llu ", fvulStarTsFullLast[fuGdpbNr])
1472  << Form("DAQ cmd = %2u ", fvuStarDaqCmdLast[fuGdpbNr])
1473  << Form("TRG cmd = %2u ", fvuStarTrigCmdLast[fuGdpbNr])
1474  << Form("TRG Wrd = %5x ", uTrigWord);
1475  return;
1476  } // if exactly same message repeated
1477  /*
1478  if( (uNewToken != fuStarTokenLast[fuGdpbNr] + 1) &&
1479  0 < fvulGdpbTsFullLast[fuGdpbNr] && 0 < fvulStarTsFullLast[fuGdpbNr] &&
1480  ( 4095 != fvuStarTokenLast[fuGdpbNr] || 1 != uNewToken) )
1481  LOG(warning) << "Possible error: STAR token did not increase by exactly 1! "
1482  << " gDBB #" << fuGdpbNr << " "
1483  << Form("old = %5u vs new = %5u ", fvuStarTokenLast[fuGdpbNr], uNewToken)
1484  << Form("old = %12llu vs new = %12llu ", fvulGdpbTsFullLast[fuGdpbNr], ulNewGdpbTsFull)
1485  << Form("old = %12llu vs new = %12llu ", fvulStarTsFullLast[fuGdpbNr], ulNewStarTsFull)
1486  << Form("old = %2u vs new = %2u ", fvuStarDaqCmdLast[fuGdpbNr], uNewDaqCmd)
1487  << Form("old = %2u vs new = %2u ", fvuStarTrigCmdLast[fuGdpbNr], uNewTrigCmd);
1488 */
1489  // STAR TS counter reset detection
1490  if (ulNewStarTsFull < fvulStarTsFullLast[fuGdpbNr])
1491  LOG(debug) << "Probable reset of the STAR TS: old = "
1492  << Form("%16llu", fvulStarTsFullLast[fuGdpbNr])
1493  << " new = " << Form("%16llu", ulNewStarTsFull)
1494  << " Diff = -"
1495  << Form("%8llu",
1496  fvulStarTsFullLast[fuGdpbNr] - ulNewStarTsFull);
1497 
1498  /*
1499  LOG(info) << "Updating trigger token for " << fuGdpbNr
1500  << " " << fuStarTokenLast[fuGdpbNr] << " " << uNewToken;
1501 */
1502  // ULong64_t ulGdpbTsDiff = ulNewGdpbTsFull - fvulGdpbTsFullLast[fuGdpbNr];
1503  fvulGdpbTsFullLast[fuGdpbNr] = ulNewGdpbTsFull;
1504  fvulStarTsFullLast[fuGdpbNr] = ulNewStarTsFull;
1505  fvuStarTokenLast[fuGdpbNr] = uNewToken;
1506  fvuStarDaqCmdLast[fuGdpbNr] = uNewDaqCmd;
1507  fvuStarTrigCmdLast[fuGdpbNr] = uNewTrigCmd;
1508  /*
1510  if( fuCurrentMs < fuCoreMs )
1511  {
1513  if( 0 <= fdStartTime )
1514  {
1516  if( fuHistoryHistoSize < 1e-9 * (fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime) )
1517  {
1518  ResetEvolutionHistograms();
1519  fdStartTime = fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs;
1520  } // if( fuHistoryHistoSize < 1e-9 * (fulGdpbTsFullLast * gdpbv100::kdClockCycleSizeNs - fdStartTime) )
1521 
1522  fvhTriggerRate[fuGdpbNr]->Fill( 1e-9 * ( fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime ) );
1523  fvhStarTokenEvo[fuGdpbNr]->Fill( 1e-9 * ( fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime ),
1524  fvuStarTokenLast[fuGdpbNr] );
1525  fvhStarTrigGdpbTsEvo[fuGdpbNr]->Fill( 1e-9 * ( fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime ),
1526  fvulGdpbTsFullLast[fuGdpbNr] );
1527  fvhStarTrigStarTsEvo[fuGdpbNr]->Fill( 1e-9 * ( fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime ),
1528  fvulStarTsFullLast[fuGdpbNr] );
1529  } // if( 0 < fdStartTime )
1530  else fdStartTime = fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs;
1531  fvhCmdDaqVsTrig[fuGdpbNr]->Fill( fvuStarDaqCmdLast[fuGdpbNr], fvuStarTrigCmdLast[fuGdpbNr] );
1532  } // if( fuCurrentMs < fuCoreMs )
1533 */
1534  break;
1535  } // case 3
1536  default: LOG(error) << "Unknown Star Trigger messageindex: " << iMsgIndex;
1537  } // switch( iMsgIndex )
1538 }
1539 
1541 
1543  // Printout some stats on what was unpacked
1544  TString message_type;
1545  for (unsigned int i = 0; i < fviMsgCounter.size(); ++i) {
1546  switch (i) {
1547  case 0: message_type = "NOP"; break;
1548  case 1: message_type = "HIT"; break;
1549  case 2: message_type = "EPOCH"; break;
1550  case 3: message_type = "SYNC"; break;
1551  case 4: message_type = "AUX"; break;
1552  case 5: message_type = "EPOCH2"; break;
1553  case 6: message_type = "GET4"; break;
1554  case 7: message_type = "SYS"; break;
1555  case 8: message_type = "GET4_SLC"; break;
1556  case 9: message_type = "GET4_32B"; break;
1557  case 10: message_type = "GET4_SYS"; break;
1558  default: message_type = "UNKNOWN"; break;
1559  } // switch(i)
1560  LOG(info) << message_type << " messages: " << fviMsgCounter[i];
1561  } // for (unsigned int i=0; i< fviMsgCounter.size(); ++i)
1562 
1563  LOG(info) << "-------------------------------------";
1564  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
1565  for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j) {
1566  LOG(info) << "Last epoch for gDPB: " << std::hex << std::setw(4) << i
1567  << std::dec << " , GET4 " << std::setw(4) << j << " => "
1569  } // for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j)
1570  } // for (UInt_t i = 0; i < fuNrOfGdpbs; ++i)
1571  LOG(info) << "-------------------------------------";
1572 
1573 
1576  fhTimeMeanPulser->Reset();
1577  fhTimeRmsPulser->Reset();
1578 
1579  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
1580  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
1581  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB]) {
1582  fhTimeMeanPulser->Fill(
1583  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetMean());
1584  fhTimeRmsPulser->Fill(
1585  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetRMS());
1586  } // for( UInt_t uChan = 0; uChan < kuNbChanTest - 1; uChan++)
1587 
1589  UpdateZoomedFit();
1590 
1592  // SaveAllHistos();
1593 }
1594 
1596  TDirectory* oldDir = NULL;
1597  TFile* histoFile = NULL;
1598  if ("" != sFileName) {
1599  // Store current directory position to allow restore later
1600  oldDir = gDirectory;
1601  // open separate histo file in recreate mode
1602  histoFile = new TFile(sFileName, "RECREATE");
1603  histoFile->cd();
1604  } // if( "" != sFileName )
1605 
1606  gDirectory->mkdir("Tof_Raw_gDPB");
1607  gDirectory->cd("Tof_Raw_gDPB");
1608  fhTimeMeanPulser->Write();
1609  fhTimeRmsPulser->Write();
1610  fhTimeRmsZoomFitPuls->Write();
1611  fhTimeResFitPuls->Write();
1612 
1613  gDirectory->cd("..");
1614 
1615 
1617  gDirectory->mkdir("TofDt");
1618  gDirectory->cd("TofDt");
1619  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
1620  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
1621  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB])
1622  fvhTimeDiffPulser[uFeeA][uFeeB]->Write();
1623  gDirectory->cd("..");
1624 
1626  gDirectory->mkdir("TofDtEvo");
1627  gDirectory->cd("TofDtEvo");
1628  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1629  fvhPulserCountEvoPerFeeGdpb[uGdpb]->Write();
1630  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx)
1631  fvhPulserTimeDiffEvoGbtxGbtx[uGdpb * (kuNbGbtxPerGdpb - 1) + uGbtx]
1632  ->Write();
1633 
1634  for (UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB)
1635  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB]->Write();
1636  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1637 
1638  for (UInt_t uFeeRef = 0; uFeeRef < kuNbRefFeeEvo; ++uFeeRef) {
1639  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFee++) {
1640  fvvhPulserTimeDiffEvoFeeFee[uFeeRef][uFee]->Write();
1641  } // for( UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFee++)
1642  } // for( UInt_t uFeeRef = 0; uFeeRef < kuNbRefFeeEvo; ++uFeeRef )
1643 
1644  gDirectory->cd("..");
1645 
1646  gDirectory->mkdir("Flib_Raw");
1647  gDirectory->cd("Flib_Raw");
1648  for (UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++) {
1649  if (NULL == fvhMsSzPerLink[uLinks]) continue;
1650 
1651  fvhMsSzPerLink[uLinks]->Write();
1652  fvhMsSzTimePerLink[uLinks]->Write();
1653  } // for( UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++ )
1654 
1655  TH1* pMissedTsH1 = dynamic_cast<TH1*>(gROOT->FindObjectAny("Missed_TS"));
1656  if (NULL != pMissedTsH1) pMissedTsH1->Write();
1657 
1658  TProfile* pMissedTsEvoP =
1659  dynamic_cast<TProfile*>(gROOT->FindObjectAny("Missed_TS_Evo"));
1660  if (NULL != pMissedTsEvoP) pMissedTsEvoP->Write();
1661 
1662  gDirectory->cd("..");
1663 
1664 
1665  if ("" != sFileName) {
1666  // Restore original directory position
1667  histoFile->Close();
1668  oldDir->cd();
1669  } // if( "" != sFileName )
1670  if ("" != sFileName) {
1671  // Restore original directory position
1672  histoFile->Close();
1673  oldDir->cd();
1674  } // if( "" != sFileName )
1675 }
1676 
1678  LOG(info) << "Reseting all TOF histograms.";
1679 
1680 
1682  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
1683  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
1684  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB])
1685  fvhTimeDiffPulser[uFeeA][uFeeB]->Reset();
1686 
1687  fhTimeMeanPulser->Reset();
1688  fhTimeRmsPulser->Reset();
1689  fhTimeRmsZoomFitPuls->Reset();
1690  fhTimeResFitPuls->Reset();
1691 
1692  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1693  fvhPulserCountEvoPerFeeGdpb[uGdpb]->Reset();
1694  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx)
1695  fvhPulserTimeDiffEvoGbtxGbtx[uGdpb * (kuNbGbtxPerGdpb - 1) + uGbtx]
1696  ->Reset();
1697 
1698  for (UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB)
1699  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB]->Reset();
1700  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1701 
1702  for (UInt_t uFeeRef = 0; uFeeRef < kuNbRefFeeEvo; ++uFeeRef) {
1703  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFee++) {
1704  fvvhPulserTimeDiffEvoFeeFee[uFeeRef][uFee]->Reset();
1705  } // for( UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFee++)
1706  } // for( UInt_t uFeeRef = 0; uFeeRef < kuNbRefFeeEvo; ++uFeeRef )
1707 
1708  for (UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++) {
1709  if (NULL == fvhMsSzPerLink[uLinks]) continue;
1710 
1711  fvhMsSzPerLink[uLinks]->Reset();
1712  fvhMsSzTimePerLink[uLinks]->Reset();
1713  } // for( UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++ )
1714 
1715  fdStartTime = -1;
1716  fdStartTimeLong = -1;
1717  fdStartTimeMsSz = -1;
1718 }
1720 
1721  fdStartTime = -1;
1722 }
1724 
1725  fdStartTimeLong = -1;
1726 }
1727 
1729  // Only do something is the user defined the width he want for the zoom
1730  if (0.0 < fdFitZoomWidthPs) {
1731  // Reset summary histograms for safety
1732  fhTimeRmsZoomFitPuls->Reset();
1733  fhTimeResFitPuls->Reset();
1734 
1735  Double_t dRes = 0;
1736  TF1* fitFuncPairs[fuNrOfFeePerGdpb * fuNrOfGdpbs]
1738 
1739  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
1740  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
1741  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB]) {
1742  // Check that we have at least 1 entry
1743  if (0 == fvhTimeDiffPulser[uFeeA][uFeeB]->GetEntries()) {
1744  fhTimeRmsZoomFitPuls->Fill(uFeeA, uFeeB, 0.0);
1745  fhTimeResFitPuls->Fill(uFeeA, uFeeB, 0.0);
1746  LOG(info)
1747  << "CbmMcbm2018MonitorTofPulser::UpdateZoomedFit => Empty input "
1748  << "for FEE pair " << uFeeA << " and " << uFeeB << " !!! ";
1749  continue;
1750  } // if( 0 == fvhTimeDiffPulser[uFeeA][uFeeB]->GetEntries() )
1751 
1752  // Read the peak position (bin with max counts) + total nb of entries
1753  Int_t iBinWithMax = fvhTimeDiffPulser[uFeeA][uFeeB]->GetMaximumBin();
1754  Double_t dNbCounts = fvhTimeDiffPulser[uFeeA][uFeeB]->Integral();
1755 
1756  // Zoom the X axis to +/- ZoomWidth around the peak position
1757  Double_t dPeakPos =
1758  fvhTimeDiffPulser[uFeeA][uFeeB]->GetXaxis()->GetBinCenter(
1759  iBinWithMax);
1760  fvhTimeDiffPulser[uFeeA][uFeeB]->GetXaxis()->SetRangeUser(
1761  dPeakPos - fdFitZoomWidthPs, dPeakPos + fdFitZoomWidthPs);
1762 
1763  // Read integral and check how much we lost due to the zoom (% loss allowed)
1764  Double_t dZoomCounts = fvhTimeDiffPulser[uFeeA][uFeeB]->Integral();
1765  if ((dZoomCounts / dNbCounts) < 0.99) {
1766  fhTimeRmsZoomFitPuls->Fill(uFeeA, uFeeB, 0.0);
1767  fhTimeResFitPuls->Fill(uFeeA, uFeeB, 0.0);
1768  LOG(warning) << "CbmMcbm2018MonitorTofPulser::UpdateZoomedFit => "
1769  "Zoom too strong, "
1770  << "more than 1% loss for FEE pair " << uFeeA
1771  << " and " << uFeeB << " !!! ";
1772  continue;
1773  } // if( ( dZoomCounts / dNbCounts ) < 0.99 )
1774 
1775  // Fill new RMS after zoom into summary histo
1776  fhTimeRmsZoomFitPuls->Fill(
1777  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetRMS());
1778 
1779 
1780  // Fit using zoomed boundaries + starting gaussian width, store into summary histo
1781  dRes = 0;
1782  fitFuncPairs[uFeeA][uFeeB] =
1783  new TF1(Form("fPair_%02d_%02d", uFeeA, uFeeB),
1784  "gaus",
1785  dPeakPos - fdFitZoomWidthPs,
1786  dPeakPos + fdFitZoomWidthPs);
1787  // Fix the Mean fit value around the Histogram Mean
1788  fitFuncPairs[uFeeA][uFeeB]->SetParameter(0, dZoomCounts);
1789  fitFuncPairs[uFeeA][uFeeB]->SetParameter(1, dPeakPos);
1790  fitFuncPairs[uFeeA][uFeeB]->SetParameter(
1791  2, 200.0); // Hardcode start with ~4*BinWidth, do better later
1792  // Using integral instead of bin center seems to lead to unrealistic values => no "I"
1793  fvhTimeDiffPulser[uFeeA][uFeeB]->Fit(
1794  Form("fPair_%02d_%02d", uFeeA, uFeeB), "QRM0");
1795  // Get Sigma
1796  dRes = fitFuncPairs[uFeeA][uFeeB]->GetParameter(2);
1797  // Cleanup memory
1798  delete fitFuncPairs[uFeeA][uFeeB];
1799  // Fill summary
1800  fhTimeResFitPuls->Fill(uFeeA, uFeeB, dRes / TMath::Sqrt2());
1801 
1802 
1803  LOG(info) << "CbmMcbm2018MonitorTofPulser::UpdateZoomedFit => "
1804  << "For FEE pair " << uFeeA << " and " << uFeeB
1805  << " we have zoomed RMS = "
1806  << fvhTimeDiffPulser[uFeeA][uFeeB]->GetRMS()
1807  << " and a resolution of " << dRes / TMath::Sqrt2();
1808 
1809  // Restore original axis state?
1810  fvhTimeDiffPulser[uFeeA][uFeeB]->GetXaxis()->UnZoom();
1811  } // loop on uFeeA and uFeeB + check if corresponding fvhTimeDiffPulser exists
1812  } // if( 0.0 < fdFitZoomWidthPs )
1813  else {
1814  LOG(error) << "CbmMcbm2018MonitorTofPulser::UpdateZoomedFit => Zoom width "
1815  "not defined, "
1816  << "please use SetFitZoomWidthPs, e.g. in macro, before trying "
1817  "this update !!!";
1818  } // else of if( 0.0 < fdFitZoomWidthPs )
1819 }
1820 
gdpbv100::Message::getStarTrigCmdStarD
uint32_t getStarTrigCmdStarD() const
Definition: gDpbMessv100.h:278
CbmMcbm2018MonitorTofPulser::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmMcbm2018MonitorTofPulser.cxx:186
gdpbv100::MSG_STAR_TRI_A
@ MSG_STAR_TRI_A
Definition: gDpbMessv100.h:63
bMcbmMoniTofPulserPrintAllEpochsEna
Bool_t bMcbmMoniTofPulserPrintAllEpochsEna
Definition: CbmMcbm2018MonitorTofPulser.cxx:50
CbmMcbm2018MonitorTofPulser::~CbmMcbm2018MonitorTofPulser
virtual ~CbmMcbm2018MonitorTofPulser()
Definition: CbmMcbm2018MonitorTofPulser.cxx:145
gdpbv100::Message
Definition: gDpbMessv100.h:133
CbmMcbm2018MonitorTofPulser::fbPrintAllEpochsEnable
Bool_t fbPrintAllEpochsEnable
Definition: CbmMcbm2018MonitorTofPulser.h:139
bMcbmMoniTofPulserSaveHistos
Bool_t bMcbmMoniTofPulserSaveHistos
Definition: CbmMcbm2018MonitorTofPulser.cxx:46
CbmMcbm2018MonitorTofPulser::fUnpackPar
CbmMcbm2018TofPar * fUnpackPar
Definition: CbmMcbm2018MonitorTofPulser.h:114
CbmMcbm2018MonitorTofPulser::fvhPulserCountEvoPerFeeGdpb
std::vector< TH2 * > fvhPulserCountEvoPerFeeGdpb
Definition: CbmMcbm2018MonitorTofPulser.h:233
CbmMcbm2018MonitorTofPulser::dMinDt
Double_t dMinDt
Definition: CbmMcbm2018MonitorTofPulser.h:202
bMcbmMoniTofPulserUpdateZoomedFit
Bool_t bMcbmMoniTofPulserUpdateZoomedFit
Definition: CbmMcbm2018MonitorTofPulser.cxx:47
CbmMcbm2018MonitorTofPulser::fvulCurrentEpochFull
std::vector< ULong64_t > fvulCurrentEpochFull
Epoch cycle from the Ms Start message and Epoch counter flip.
Definition: CbmMcbm2018MonitorTofPulser.h:179
CbmMcbm2018MonitorTofPulser::fvulCurrentEpoch
std::vector< ULong64_t > fvulCurrentEpoch
Definition: CbmMcbm2018MonitorTofPulser.h:175
gdpbv100::Message::getMsgFullTimeD
double getMsgFullTimeD(uint64_t epoch) const
Returns expanded and adjusted time of message in double (in ns)
Definition: gDpbMessv100.cxx:103
gdpbv100::Message::getGdpbSysErrChanId
uint16_t getGdpbSysErrChanId() const
Definition: gDpbMessv100.h:251
CbmMcbm2018MonitorTofPulser::fviModuleId
std::vector< Int_t > fviModuleId
Definition: CbmMcbm2018MonitorTofPulser.h:130
CbmMcbm2018MonitorTofPulser::fuNrOfGet4PerFee
UInt_t fuNrOfGet4PerFee
Definition: CbmMcbm2018MonitorTofPulser.h:117
CbmMcbm2018MonitorTofPulser::ResetEvolutionHistograms
void ResetEvolutionHistograms()
Definition: CbmMcbm2018MonitorTofPulser.cxx:1719
gdpbv100::FormatHexPrintout
std::string FormatHexPrintout(uint64_t ulVal, char cFill=0, uint uWidth=0, bool bUppercase=false)
Definition: gDpbMessv100.cxx:30
CbmMcbm2018MonitorTofPulser::fuGet4Nr
UInt_t fuGet4Nr
Definition: CbmMcbm2018MonitorTofPulser.h:154
CbmMcbm2018MonitorTofPulser::fvuFeeNbHitsLastMs
std::vector< UInt_t > fvuFeeNbHitsLastMs
Buffer for pulser channels.
Definition: CbmMcbm2018MonitorTofPulser.h:190
CbmMcbm2018MonitorTofPulser::DoUnpack
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
Definition: CbmMcbm2018MonitorTofPulser.cxx:705
CbmFormatDecHexPrintout.h
CbmMcbm2018MonitorTofPulser::InitContainers
Bool_t InitContainers()
Definition: CbmMcbm2018MonitorTofPulser.cxx:165
CbmMcbm2018MonitorTofPulser::fuGet4Id
UInt_t fuGet4Id
Definition: CbmMcbm2018MonitorTofPulser.h:152
gdpbv100::Message::getGdpbTsMsbStarA
uint64_t getGdpbTsMsbStarA() const
Definition: gDpbMessv100.h:266
gdpbv100::Message::getGdpbEpEpochNb
uint32_t getGdpbEpEpochNb() const
Definition: gDpbMessv100.h:231
CbmMcbm2018MonitorTofPulser::fviRpcSide
std::vector< Int_t > fviRpcSide
Definition: CbmMcbm2018MonitorTofPulser.h:129
CbmMcbm2018MonitorTofPulser::fdTsLastPulserHit
std::vector< Double_t > fdTsLastPulserHit
[ fuFeeNr ]
Definition: CbmMcbm2018MonitorTofPulser.h:191
CbmMcbm2018MonitorTofPulser::fviNrOfRpc
std::vector< Int_t > fviNrOfRpc
Definition: CbmMcbm2018MonitorTofPulser.h:127
CbmMcbm2018MonitorTofPulser::fuNbFeePlot
UInt_t fuNbFeePlot
Definition: CbmMcbm2018MonitorTofPulser.h:205
gdpbv100::GET4_V2X_ERR_TOT_OVERWRT
@ GET4_V2X_ERR_TOT_OVERWRT
Definition: gDpbMessv100.h:121
CbmMcbm2018MonitorTofPulser::fbPrintAllHitsEnable
Bool_t fbPrintAllHitsEnable
Definition: CbmMcbm2018MonitorTofPulser.h:138
CbmMcbm2018MonitorTofPulser::ResetLongEvolutionHistograms
void ResetLongEvolutionHistograms()
Definition: CbmMcbm2018MonitorTofPulser.cxx:1723
CbmMcbm2018MonitorTofPulser::fuHistoryHistoSizeLong
UInt_t fuHistoryHistoSizeLong
Definition: CbmMcbm2018MonitorTofPulser.h:216
CbmMcbm2018MonitorTofPulser::PrintGenInfo
void PrintGenInfo(gdpbv100::Message)
Definition: CbmMcbm2018MonitorTofPulser.cxx:1300
CbmMcbm2018TofPar::GetNbMsTot
Int_t GetNbMsTot()
Definition: CbmMcbm2018TofPar.h:79
CbmMcbm2018MonitorTofPulser::fvulCurrentEpochCycle
std::vector< ULong64_t > fvulCurrentEpochCycle
Definition: CbmMcbm2018MonitorTofPulser.h:178
CbmMcbm2018TofPar::GetGdpbId
Int_t GetGdpbId(Int_t i)
Definition: CbmMcbm2018TofPar.h:67
CbmMcbm2018MonitorTofPulser::fdStartTimeLong
Double_t fdStartTimeLong
Definition: CbmMcbm2018MonitorTofPulser.h:211
CbmMcbm2018MonitorTofPulser::fuRawDataPrintMsgIdx
UInt_t fuRawDataPrintMsgIdx
Definition: CbmMcbm2018MonitorTofPulser.h:137
gdpbv100::Message::getGdpbEpSync
bool getGdpbEpSync() const
Definition: gDpbMessv100.h:232
CbmMcbm2018MonitorTofPulser::fvuPadiToGet4
std::vector< UInt_t > fvuPadiToGet4
Definition: CbmMcbm2018MonitorTofPulser.h:257
CbmMcbm2018TofPar.h
gdpbv100::SYS_GET4_ERROR
@ SYS_GET4_ERROR
Definition: gDpbMessv100.h:70
CbmMcbm2018MonitorTofPulser::fTimeLastHistoSaving
std::chrono::time_point< std::chrono::system_clock > fTimeLastHistoSaving
Definition: CbmMcbm2018MonitorTofPulser.h:274
CbmMcbm2018MonitorTofPulser::ResetAllHistos
void ResetAllHistos()
Definition: CbmMcbm2018MonitorTofPulser.cxx:1677
CbmMcbm2018MonitorTofPulser::fviMsgCounter
std::vector< int > fviMsgCounter
Definition: CbmMcbm2018MonitorTofPulser.h:156
gdpbv100::MSG_HIT
@ MSG_HIT
Definition: gDpbMessv100.h:59
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMcbm2018MonitorTofPulser::kuNbBinsDt
const UInt_t kuNbBinsDt
[ fuNrOfGdpbs ][ fuNrOfChannelsPerGdpb ]
Definition: CbmMcbm2018MonitorTofPulser.h:201
gdpbv100::MSG_SLOWC
@ MSG_SLOWC
Definition: gDpbMessv100.h:61
gdpbv100::Message::setGdpbGenChipId
void setGdpbGenChipId(uint32_t v)
Definition: gDpbMessv100.h:215
CbmMcbm2018MonitorTofPulser::fuNbFeePlotsPerGdpb
UInt_t fuNbFeePlotsPerGdpb
Definition: CbmMcbm2018MonitorTofPulser.h:206
CbmMcbm2018MonitorTofPulser::fuNrOfChannelsPerGet4
UInt_t fuNrOfChannelsPerGet4
Definition: CbmMcbm2018MonitorTofPulser.h:118
CbmMcbm2018MonitorTofPulser::fsHistoFileFullname
TString fsHistoFileFullname
/‍** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **‍/
Definition: CbmMcbm2018MonitorTofPulser.h:99
CbmMcbm2018MonitorTofPulser::fvhPulserTimeDiffEvoGbtxGbtx
std::vector< TProfile * > fvhPulserTimeDiffEvoGbtxGbtx
Definition: CbmMcbm2018MonitorTofPulser.h:234
GetRMS
static Double_t GetRMS(const char *name)
Definition: GenNoiseElectrons.cxx:34
CbmMcbm2018MonitorTofPulser::fuNrOfGet4
UInt_t fuNrOfGet4
Definition: CbmMcbm2018MonitorTofPulser.h:121
gdpbv100::MSG_STAR_TRI_D
@ MSG_STAR_TRI_D
Definition: gDpbMessv100.h:66
gdpbv100::Message::getMessageType
uint8_t getMessageType() const
Returns the message type. Valid for all message types. 4 bit.
Definition: gDpbMessv100.h:206
gdpbv100::Message::printDataCout
void printDataCout(unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
Print message in human readable format to cout.
Definition: gDpbMessv100.cxx:172
CbmMcbm2018MonitorTofPulser::SetNbMsInTs
virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
Definition: CbmMcbm2018MonitorTofPulser.cxx:391
CbmMcbm2018MonitorTofPulser::fdStartTime
Double_t fdStartTime
Definition: CbmMcbm2018MonitorTofPulser.h:209
gdpbv100::Message::getGdpbSysSubType
uint16_t getGdpbSysSubType() const
Definition: gDpbMessv100.h:245
gdpbv100::Message::setGdpbEpEpochNb
void setGdpbEpEpochNb(uint32_t v)
Definition: gDpbMessv100.h:283
CbmMcbm2018MonitorTofPulser::fuNrOfGbtx
UInt_t fuNrOfGbtx
Definition: CbmMcbm2018MonitorTofPulser.h:125
CbmMcbm2018MonitorTofPulser::fuNrOfGdpbs
UInt_t fuNrOfGdpbs
Definition: CbmMcbm2018MonitorTofPulser.h:115
CbmMcbm2018MonitorTofPulser::kuNbRefFeeEvo
static const UInt_t kuNbRefFeeEvo
Definition: CbmMcbm2018MonitorTofPulser.h:237
CbmMcbm2018TofPar::GetNrOfGbtx
Int_t GetNrOfGbtx()
Definition: CbmMcbm2018TofPar.h:72
gdpbv100::kuEpochCounterSz
const uint32_t kuEpochCounterSz
Definition: gDpbMessv100.h:40
CbmMcbm2018MonitorTofPulser::fuNrOfChannelsPerGdpb
UInt_t fuNrOfChannelsPerGdpb
Definition: CbmMcbm2018MonitorTofPulser.h:123
CbmMcbm2018MonitorTofPulser::fvulGdpbTsFullLast
std::vector< ULong64_t > fvulGdpbTsFullLast
Definition: CbmMcbm2018MonitorTofPulser.h:163
gdpbv100::Message::isStarTrigger
bool isStarTrigger() const
Returns true is message type is MSG_STAR_TRI_A, _B, _C, _D (STAR Trigger message)
Definition: gDpbMessv100.h:329
CbmMcbm2018MonitorTofPulser::fuNrOfFeePerGdpb
UInt_t fuNrOfFeePerGdpb
Definition: CbmMcbm2018MonitorTofPulser.h:116
CbmMcbm2018TofPar::GetNbMsOverlap
Int_t GetNbMsOverlap()
Definition: CbmMcbm2018TofPar.h:80
gdpbv100::Message::getGdpbSysErrData
uint16_t getGdpbSysErrData() const
Definition: gDpbMessv100.h:253
CbmHistManager.h
Histogram manager.
CbmMcbm2018MonitorTofPulser::kuNbGbtxPerGdpb
const UInt_t kuNbGbtxPerGdpb
Definition: CbmMcbm2018MonitorTofPulser.h:133
CbmMcbm2018MonitorTofPulser::fiEquipmentId
Int_t fiEquipmentId
Definition: CbmMcbm2018MonitorTofPulser.h:155
CbmMcbm2018MonitorTofPulser::fvvhPulserTimeDiffEvoFeeFee
std::vector< std::vector< TProfile * > > fvvhPulserTimeDiffEvoFeeFee
Definition: CbmMcbm2018MonitorTofPulser.h:239
gdpbv100::Message::getGdpbEpLinkId
bool getGdpbEpLinkId() const
Definition: gDpbMessv100.h:230
CbmMcbm2018MonitorTofPulser::fvuGet4ToElink
std::vector< UInt_t > fvuGet4ToElink
Definition: CbmMcbm2018MonitorTofPulser.h:263
CbmMcbm2018MonitorTofPulser::fulCurrentEpochTime
ULong64_t fulCurrentEpochTime
Epoch + Epoch Cycle.
Definition: CbmMcbm2018MonitorTofPulser.h:181
CbmMcbm2018MonitorTofPulser::FillPattInfo
void FillPattInfo(gdpbv100::Message)
Definition: CbmMcbm2018MonitorTofPulser.cxx:1377
CbmMcbm2018MonitorTofPulser::fvulGdpbTsMsb
std::vector< ULong64_t > fvulGdpbTsMsb
Definition: CbmMcbm2018MonitorTofPulser.h:159
CbmMcbm2018MonitorTofPulser::fvuStarTokenLast
std::vector< UInt_t > fvuStarTokenLast
Definition: CbmMcbm2018MonitorTofPulser.h:165
CbmMcbm2018MonitorTofPulser::fuGdpbNr
UInt_t fuGdpbNr
Definition: CbmMcbm2018MonitorTofPulser.h:150
CbmMcbm2018MonitorTofPulser::kdMaxDtPulserPs
const Double_t kdMaxDtPulserPs
Definition: CbmMcbm2018MonitorTofPulser.h:227
CbmMcbm2018MonitorTofPulser::fvhMsSzTimePerLink
std::vector< TProfile * > fvhMsSzTimePerLink
Definition: CbmMcbm2018MonitorTofPulser.h:223
gdpbv100::Message::getStarTsLsbStarD
uint64_t getStarTsLsbStarD() const
Definition: gDpbMessv100.h:273
CbmMcbm2018TofPar::GetNrOfGdpbs
Int_t GetNrOfGdpbs()
FIXME: replace with method returning the correspondign constants! see Star2019 parameter.
Definition: CbmMcbm2018TofPar.h:66
CbmMcbm2018MonitorTofPulser::fuNrOfGet4PerGdpb
UInt_t fuNrOfGet4PerGdpb
Definition: CbmMcbm2018MonitorTofPulser.h:122
CbmMcbm2018MonitorTofPulser::fuNrOfModules
UInt_t fuNrOfModules
Definition: CbmMcbm2018MonitorTofPulser.h:126
bMcbmMoniTofPulserPrintAllHitsEna
Bool_t bMcbmMoniTofPulserPrintAllHitsEna
Definition: CbmMcbm2018MonitorTofPulser.cxx:49
CbmMcbm2018MonitorTofPulser::fdFitZoomWidthPs
Double_t fdFitZoomWidthPs
Definition: CbmMcbm2018MonitorTofPulser.h:219
CbmMcbm2018MonitorTofPulser::fvmEpSupprBuffer
std::vector< std::vector< gdpbv100::Message > > fvmEpSupprBuffer
Buffer for suppressed epoch processing.
Definition: CbmMcbm2018MonitorTofPulser.h:187
gdpbv100::MSG_STAR_TRI_C
@ MSG_STAR_TRI_C
Definition: gDpbMessv100.h:65
CbmMcbm2018MonitorTofPulser::fGdpbIdIndexMap
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
Map of ID to index for the gDPBs.
Definition: CbmMcbm2018MonitorTofPulser.h:184
CbmMcbm2018MonitorTofPulser::kuRefFeeEvoIdx
const UInt_t kuRefFeeEvoIdx[kuNbRefFeeEvo]
Definition: CbmMcbm2018MonitorTofPulser.h:238
gdpbv100::Message::getGdpbSysFwErrResync
uint32_t getGdpbSysFwErrResync() const
Definition: gDpbMessv100.h:257
CbmMcbm2018MonitorTofPulser::fuOverlapMsNb
size_t fuOverlapMsNb
Definition: CbmMcbm2018MonitorTofPulser.h:106
CbmMcbm2018MonitorTofPulser::Init
virtual Bool_t Init()
Definition: CbmMcbm2018MonitorTofPulser.cxx:147
CbmMcbm2018MonitorTofPulser::fdMsSizeInNs
Double_t fdMsSizeInNs
Definition: CbmMcbm2018MonitorTofPulser.h:108
CbmMcbm2018MonitorTofPulser::ProcessEpochCycle
void ProcessEpochCycle(uint64_t ulCycleData)
Definition: CbmMcbm2018MonitorTofPulser.cxx:1113
h
Data class with information on a STS local track.
gdpbv100::Message::getData
uint64_t getData() const
Definition: gDpbMessv100.h:156
CbmMcbm2018MonitorTofPulser::CreateHistograms
void CreateHistograms()
Definition: CbmMcbm2018MonitorTofPulser.cxx:399
CbmMcbm2018MonitorTofPulser::fcMsSizeAll
TCanvas * fcMsSizeAll
Definition: CbmMcbm2018MonitorTofPulser.h:221
CbmMcbm2018MonitorTofPulser::Finish
virtual void Finish()
Definition: CbmMcbm2018MonitorTofPulser.cxx:1542
CbmMcbm2018MonitorTofPulser::fuMsAcceptsPercent
size_t fuMsAcceptsPercent
OLD, to be cleaned out !!!!!
Definition: CbmMcbm2018MonitorTofPulser.h:103
CbmMcbm2018MonitorTofPulser::UpdateZoomedFit
void UpdateZoomedFit()
Definition: CbmMcbm2018MonitorTofPulser.cxx:1728
CbmMcbm2018MonitorTofPulser::fuCoreMs
size_t fuCoreMs
Definition: CbmMcbm2018MonitorTofPulser.h:107
CbmMcbm2018TofPar::GetNrOfRpc
Int_t GetNrOfRpc(Int_t i)
Definition: CbmMcbm2018TofPar.h:74
CbmMcbm2018TofPar::GetNrOfModules
Int_t GetNrOfModules()
Definition: CbmMcbm2018TofPar.h:73
gdpbv100::GET4_V2X_ERR_SEQUENCE_ER
@ GET4_V2X_ERR_SEQUENCE_ER
Definition: gDpbMessv100.h:127
CbmMcbm2018MonitorTofPulser::SaveAllHistos
void SaveAllHistos(TString sFileName="")
Definition: CbmMcbm2018MonitorTofPulser.cxx:1595
gdpbv100::Message::getGdpbTsLsbStarB
uint64_t getGdpbTsLsbStarB() const
Definition: gDpbMessv100.h:268
CbmMcbm2018MonitorTofPulser::fdLastRmsUpdateTime
Double_t fdLastRmsUpdateTime
Definition: CbmMcbm2018MonitorTofPulser.h:218
CbmMcbm2018MonitorTofPulser::fvulStarTsFullLast
std::vector< ULong64_t > fvulStarTsFullLast
Definition: CbmMcbm2018MonitorTofPulser.h:164
gdpbv100::Message::getStarTrigMsgIndex
uint16_t getStarTrigMsgIndex() const
Definition: gDpbMessv100.h:264
CbmMcbm2018MonitorTofPulser::fbIgnoreOverlapMs
Bool_t fbIgnoreOverlapMs
Definition: CbmMcbm2018MonitorTofPulser.h:96
CbmMcbm2018MonitorTofPulser::kuNbGet4PerGbtx
static const UInt_t kuNbGet4PerGbtx
Definition: CbmMcbm2018MonitorTofPulser.h:261
CbmMcbm2018MonitorTofPulser::PrintSlcInfo
void PrintSlcInfo(gdpbv100::Message)
Definition: CbmMcbm2018MonitorTofPulser.cxx:1282
CbmMcbm2018MonitorTofPulser::fuNbOverMsPerTs
size_t fuNbOverMsPerTs
Definition: CbmMcbm2018MonitorTofPulser.h:94
CbmMcbm2018MonitorTofPulser::fuHistoryHistoSize
UInt_t fuHistoryHistoSize
Definition: CbmMcbm2018MonitorTofPulser.h:214
gdpbv100::kuChipIdMergedEpoch
const uint32_t kuChipIdMergedEpoch
Definition: gDpbMessv100.h:51
gdpbv100::GET4_V2X_ERR_ADD_RIS_EDG
@ GET4_V2X_ERR_ADD_RIS_EDG
Definition: gDpbMessv100.h:125
gdpbv100::Message::getGdpbHitFineTs
uint16_t getGdpbHitFineTs() const
Definition: gDpbMessv100.h:222
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmMcbm2018MonitorTofPulser::CbmMcbm2018MonitorTofPulser
CbmMcbm2018MonitorTofPulser()
Definition: CbmMcbm2018MonitorTofPulser.cxx:52
CbmMcbm2018MonitorTofPulser::fvhTimeDiffPulser
std::vector< std::vector< TH1 * > > fvhTimeDiffPulser
Definition: CbmMcbm2018MonitorTofPulser.h:228
gdpbv100::MSG_SYST
@ MSG_SYST
Definition: gDpbMessv100.h:62
CbmMcbm2018TofPar::GetModuleId
Int_t GetModuleId(Int_t i)
Definition: CbmMcbm2018TofPar.h:77
CbmMcbm2018MonitorTofPulser::fuNrOfChannelsPerFee
UInt_t fuNrOfChannelsPerFee
Definition: CbmMcbm2018MonitorTofPulser.h:120
CbmMcbm2018MonitorTofPulser::fvulStarTsMsb
std::vector< ULong64_t > fvulStarTsMsb
Definition: CbmMcbm2018MonitorTofPulser.h:161
CbmMcbm2018MonitorTofPulser::fdTsCoreSizeInNs
Double_t fdTsCoreSizeInNs
Definition: CbmMcbm2018MonitorTofPulser.h:109
CbmMcbm2018MonitorTofPulser::fuRawDataPrintMsgNb
UInt_t fuRawDataPrintMsgNb
Definition: CbmMcbm2018MonitorTofPulser.h:136
CbmMcbm2018MonitorTofPulser::kuNbFeePerGbtx
const UInt_t kuNbFeePerGbtx
Definition: CbmMcbm2018MonitorTofPulser.h:132
gdpbv100::Message::getStarTsMidStarC
uint64_t getStarTsMidStarC() const
Definition: gDpbMessv100.h:271
CbmMcbm2018MonitorTofPulser::fdMsIndex
Double_t fdMsIndex
Definition: CbmMcbm2018MonitorTofPulser.h:147
gdpbv100::GET4_V2X_ERR_TOT_RANGE
@ GET4_V2X_ERR_TOT_RANGE
Definition: gDpbMessv100.h:123
FormatMsHeaderPrintout
std::string FormatMsHeaderPrintout(const fles::MicrosliceDescriptor &msDescriptor)
Definition: CbmFormatMsHeaderPrintout.cxx:5
CbmMcbm2018MonitorTofPulser::fvvhPulserTimeDiffEvoGdpbGdpb
std::vector< std::vector< TProfile * > > fvvhPulserTimeDiffEvoGdpbGdpb
Definition: CbmMcbm2018MonitorTofPulser.h:235
FormatDecPrintout
std::string FormatDecPrintout(uint64_t ulVal, char cFill, uint uWidth)
Definition: CbmFormatDecHexPrintout.cxx:4
CbmMcbm2018MonitorTofPulser::fulCurrentTsIndex
uint64_t fulCurrentTsIndex
Definition: CbmMcbm2018MonitorTofPulser.h:144
gdpbv100::kdBinSize
const double kdBinSize
Definition: gDpbMessv100.h:30
CbmMcbm2018MonitorTofPulser::fhTimeRmsZoomFitPuls
TH2 * fhTimeRmsZoomFitPuls
Definition: CbmMcbm2018MonitorTofPulser.h:231
gdpbv100::kuFeePulserChannel
const uint32_t kuFeePulserChannel
Definition: gDpbMessv100.h:53
bMcbmMoniTofPulserResetHistos
Bool_t bMcbmMoniTofPulserResetHistos
Definition: CbmMcbm2018MonitorTofPulser.cxx:45
CbmMcbm2018MonitorTofPulser::fvulGdpbTsLsb
std::vector< ULong64_t > fvulGdpbTsLsb
Definition: CbmMcbm2018MonitorTofPulser.h:160
CbmMcbm2018MonitorTofPulser::fuDiamondDpbIdx
UInt_t fuDiamondDpbIdx
Definition: CbmMcbm2018MonitorTofPulser.h:141
CbmMcbm2018MonitorTofPulser::FillStarTrigInfo
void FillStarTrigInfo(gdpbv100::Message)
Definition: CbmMcbm2018MonitorTofPulser.cxx:1437
CbmMcbm2018TofPar
Definition: CbmMcbm2018TofPar.h:18
CbmMcbm2018MonitorTofPulser::PrintSysInfo
void PrintSysInfo(gdpbv100::Message)
Definition: CbmMcbm2018MonitorTofPulser.cxx:1310
CbmMcbm2018TofPar::GetNrOfChannelsPerGet4
Int_t GetNrOfChannelsPerGet4()
Definition: CbmMcbm2018TofPar.h:70
CbmMcbm2018TofPar::GetSizeMsInNs
Double_t GetSizeMsInNs()
Definition: CbmMcbm2018TofPar.h:81
gdpbv100::MSG_EPOCH
@ MSG_EPOCH
Definition: gDpbMessv100.h:60
CbmMcbm2018MonitorTofPulser::fvhMsSzPerLink
std::vector< TH1 * > fvhMsSzPerLink
Definition: CbmMcbm2018MonitorTofPulser.h:222
gdpbv100
Definition: gDpbMessv100.cxx:29
CbmMcbm2018TofPar::GetRpcType
Int_t GetRpcType(Int_t i)
Definition: CbmMcbm2018TofPar.h:75
gdpbv100::Message::getGdpbSysUnkwData
uint32_t getGdpbSysUnkwData() const
Definition: gDpbMessv100.h:255
CbmMcbm2018MonitorTofPulser::fbOldFwData
Bool_t fbOldFwData
Definition: CbmMcbm2018MonitorTofPulser.h:140
CbmMcbm2018MonitorTofPulser::fvulStarTsMid
std::vector< ULong64_t > fvulStarTsMid
Definition: CbmMcbm2018MonitorTofPulser.h:162
CbmMcbm2018MonitorTofPulser::Reset
virtual void Reset()
Definition: CbmMcbm2018MonitorTofPulser.cxx:1540
CbmMcbm2018MonitorTofPulser::fvuStarTrigCmdLast
std::vector< UInt_t > fvuStarTrigCmdLast
Definition: CbmMcbm2018MonitorTofPulser.h:167
gdpbv100::kulEpochCycleFieldSz
const uint64_t kulEpochCycleFieldSz
Definition: gDpbMessv100.h:49
gdpbv100::Message::getGdpbHitIs24b
uint16_t getGdpbHitIs24b() const
Definition: gDpbMessv100.h:218
CbmMcbm2018MonitorTofPulser::FillEpochInfo
void FillEpochInfo(gdpbv100::Message)
Definition: CbmMcbm2018MonitorTofPulser.cxx:1245
gdpbv100::Message::getGdpbEpEpochLoss
bool getGdpbEpEpochLoss() const
Definition: gDpbMessv100.h:234
CbmMcbm2018MonitorTofPulser::fuCurrentMs
size_t fuCurrentMs
Definition: CbmMcbm2018MonitorTofPulser.h:145
gdpbv100::Message::getGdpbGenChipId
uint16_t getGdpbGenChipId() const
Definition: gDpbMessv100.h:214
CbmMcbm2018MonitorTofPulser::fvuElinkToGet4
std::vector< UInt_t > fvuElinkToGet4
5 FEE with 8 GET4 each
Definition: CbmMcbm2018MonitorTofPulser.h:262
CbmMcbm2018MonitorTofPulser::fvMsComponentsList
std::vector< size_t > fvMsComponentsList
FLES containers.
Definition: CbmMcbm2018MonitorTofPulser.h:88
CbmMcbm2018MonitorTofPulser::fvuStarDaqCmdLast
std::vector< UInt_t > fvuStarDaqCmdLast
Definition: CbmMcbm2018MonitorTofPulser.h:166
gdpbv100::Message::getGdpbEpDataLoss
bool getGdpbEpDataLoss() const
Definition: gDpbMessv100.h:233
gdpbv100::MSG_STAR_TRI_B
@ MSG_STAR_TRI_B
Definition: gDpbMessv100.h:64
gdpbv100::kulEpochCycleBins
const uint64_t kulEpochCycleBins
Definition: gDpbMessv100.h:42
gdpbv100::Message::getGdpbSysErrEdge
bool getGdpbSysErrEdge() const
Definition: gDpbMessv100.h:252
gdpbv100::SYS_PATTERN
@ SYS_PATTERN
Definition: gDpbMessv100.h:76
CbmMcbm2018MonitorTofPulser::ConvertElinkToGet4
UInt_t ConvertElinkToGet4(UInt_t uElinkIdx)
Definition: CbmMcbm2018MonitorTofPulser.h:264
gdpbv100::Message::getGdpbHitFullTs
uint32_t getGdpbHitFullTs() const
Definition: gDpbMessv100.h:220
CbmMcbm2018MonitorTofPulser::SetParContainers
void SetParContainers()
Definition: CbmMcbm2018MonitorTofPulser.cxx:158
bMcbmMoniTofPulserRawDataPrint
Bool_t bMcbmMoniTofPulserRawDataPrint
Definition: CbmMcbm2018MonitorTofPulser.cxx:48
CbmMcbm2018TofPar::GetRpcSide
Int_t GetRpcSide(Int_t i)
Definition: CbmMcbm2018TofPar.h:76
CbmMcbm2018MonitorTofPulser::fhTimeResFitPuls
TH2 * fhTimeResFitPuls
Definition: CbmMcbm2018MonitorTofPulser.h:232
gdpbv100::Message::getStarTokenStarD
uint32_t getStarTokenStarD() const
Definition: gDpbMessv100.h:280
CbmMcbm2018MonitorTofPulser::fuCurrentMsSysId
size_t fuCurrentMsSysId
Definition: CbmMcbm2018MonitorTofPulser.h:146
gdpbv100::Message::getStarTsMsbStarB
uint64_t getStarTsMsbStarB() const
Definition: gDpbMessv100.h:269
gdpbv100::Message::getGdpbHitChanId
uint16_t getGdpbHitChanId() const
Definition: gDpbMessv100.h:219
CbmMcbm2018MonitorTofPulser
Definition: CbmMcbm2018MonitorTofPulser.h:33
gdpbv100::Message::getMsgFullTime
uint64_t getMsgFullTime(uint64_t epoch) const
Returns expanded and adjusted time of message (in ns)
Definition: gDpbMessv100.cxx:98
CbmMcbm2018MonitorTofPulser::fuGdpbId
UInt_t fuGdpbId
Definition: CbmMcbm2018MonitorTofPulser.h:148
CbmMcbm2018MonitorTofPulser::dMaxDt
Double_t dMaxDt
Definition: CbmMcbm2018MonitorTofPulser.h:203
gdpbv100::Message::getGdpbEpMissmatch
bool getGdpbEpMissmatch() const
Definition: gDpbMessv100.h:235
CbmMcbmUnpack
Definition: CbmMcbmUnpack.h:15
CbmMcbm2018MonitorTofPulser::fhTimeRmsPulser
TH2 * fhTimeRmsPulser
Definition: CbmMcbm2018MonitorTofPulser.h:230
CbmMcbm2018MonitorTofPulser::fuTotalMsNb
size_t fuTotalMsNb
Definition: CbmMcbm2018MonitorTofPulser.h:104
CbmMcbm2018MonitorTofPulser::fuMinNbGdpb
UInt_t fuMinNbGdpb
Definition: CbmMcbm2018MonitorTofPulser.h:110
CbmMcbm2018MonitorTofPulser::fvbFirstEpochSeen
std::vector< Bool_t > fvbFirstEpochSeen
Definition: CbmMcbm2018MonitorTofPulser.h:176
CbmMcbm2018MonitorTofPulser::AddMsComponentToList
virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Definition: CbmMcbm2018MonitorTofPulser.cxx:351
CbmMcbm2018MonitorTofPulser::fviRpcType
std::vector< Int_t > fviRpcType
Definition: CbmMcbm2018MonitorTofPulser.h:128
CbmMcbm2018TofPar::GetNrOfGet4PerFee
Int_t GetNrOfGet4PerFee()
Definition: CbmMcbm2018TofPar.h:69
CbmMcbm2018MonitorTofPulser.h
CbmMcbm2018MonitorTofPulser::FillHitInfo
void FillHitInfo(gdpbv100::Message)
Definition: CbmMcbm2018MonitorTofPulser.cxx:1144
gdpbv100::GET4_V2X_ERR_UNPAIR_FALL
@ GET4_V2X_ERR_UNPAIR_FALL
Definition: gDpbMessv100.h:126
CbmMcbm2018MonitorTofPulser::fvuGet4ToPadi
std::vector< UInt_t > fvuGet4ToPadi
Definition: CbmMcbm2018MonitorTofPulser.h:258
gdpbv100::SYS_GET4_SYNC_MISS
@ SYS_GET4_SYNC_MISS
Definition: gDpbMessv100.h:73
CbmMcbm2018MonitorTofPulser::fhTimeMeanPulser
TH2 * fhTimeMeanPulser
Definition: CbmMcbm2018MonitorTofPulser.h:229
gdpbv100::Message::getGdpbSysErrUnused
uint16_t getGdpbSysErrUnused() const
Definition: gDpbMessv100.h:249
CbmMcbm2018MonitorTofPulser::fdStartTimeMsSz
Double_t fdStartTimeMsSz
Definition: CbmMcbm2018MonitorTofPulser.h:213
gdpbv100::Message::getGdpbHit32Tot
uint16_t getGdpbHit32Tot() const
Definition: gDpbMessv100.h:227
CbmMcbm2018MonitorTofPulser::fuNbCoreMsPerTs
size_t fuNbCoreMsPerTs
Definition: CbmMcbm2018MonitorTofPulser.h:93
CbmFormatMsHeaderPrintout.h
CbmMcbm2018TofPar::GetNrOfFeesPerGdpb
Int_t GetNrOfFeesPerGdpb()
Definition: CbmMcbm2018TofPar.h:68
gdpbv100::GET4_V2X_ERR_EVT_DISCARD
@ GET4_V2X_ERR_EVT_DISCARD
Definition: gDpbMessv100.h:124
gdpbv100::Message::getStarDaqCmdStarD
uint32_t getStarDaqCmdStarD() const
Definition: gDpbMessv100.h:279
CbmMcbm2018MonitorTofPulser::GetArrayIndex
Int_t GetArrayIndex(Int_t gdpbId, Int_t get4Id)
Definition: CbmMcbm2018MonitorTofPulser.h:252
gdpbv100::SYS_GDPB_UNKWN
@ SYS_GDPB_UNKWN
Definition: gDpbMessv100.h:71