CbmRoot
CbmMcbm2018TofTestFee.cxx
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmMcbm2018TofTestFee -----
4 // ----- Created 10.07.2018 by P.-A. Loizeau -----
5 // ----- -----
6 // -----------------------------------------------------------------------------
7 
9 #include "CbmMcbm2018TofPar.h"
10 
11 #include "CbmFlesHistosTools.h"
14 
15 #include "CbmHistManager.h"
16 
17 #include "FairLogger.h"
18 #include "FairRootManager.h"
19 #include "FairRun.h"
20 #include "FairRunOnline.h"
21 #include "FairRuntimeDb.h"
22 
23 #include "Rtypes.h"
24 #include "TCanvas.h"
25 #include "TClonesArray.h"
26 #include "TF1.h"
27 #include "TH1.h"
28 #include "TH2.h"
29 #include "THStack.h"
30 #include "THttpServer.h"
31 #include "TMath.h"
32 #include "TPaveStats.h"
33 #include "TProfile.h"
34 #include "TProfile2D.h"
35 #include "TROOT.h"
36 #include "TString.h"
37 #include "TStyle.h"
38 #include <TFile.h>
39 
40 #include <algorithm>
41 #include <ctime>
42 #include <iomanip>
43 #include <iostream>
44 #include <stdint.h>
45 
47 Bool_t bMcbmTofTestFeeSaveHistos = kFALSE;
52 
54  : CbmMcbmUnpack()
55  , fvMsComponentsList()
56  , fuNbCoreMsPerTs(0)
57  , fuNbOverMsPerTs(0)
58  , fbIgnoreOverlapMs(kFALSE)
59  , fsHistoFileFullname("data/TofPulserHistos.root")
60  , fuMsAcceptsPercent(100)
61  , fuTotalMsNb(0)
62  , fuOverlapMsNb(0)
63  , fuCoreMs(0)
64  , fdMsSizeInNs(0.0)
65  , fdTsCoreSizeInNs(0.0)
66  , fuMinNbGdpb(0)
67  , fuCurrNbGdpb(0)
68  , fUnpackPar()
69  , fuNrOfGdpbs(0)
70  , fuNrOfFeePerGdpb(0)
71  , fuNrOfGet4PerFee(0)
72  , fuNrOfChannelsPerGet4(0)
73  , fuNrOfChannelsPerFee(0)
74  , fuNrOfGet4(0)
75  , fuNrOfGet4PerGdpb(0)
76  , fuNrOfChannelsPerGdpb(0)
77  , fuRawDataPrintMsgNb(100000)
78  , fuRawDataPrintMsgIdx(fuRawDataPrintMsgNb)
79  , fbPrintAllHitsEnable(kFALSE)
80  , fbPrintAllEpochsEnable(kFALSE)
81  , fulCurrentTsIndex(0)
82  , fuCurrentMs(0)
83  , fuCurrentMsSysId(0)
84  , fdMsIndex(0)
85  , fuGdpbId(0)
86  , fuGdpbNr(0)
87  , fuGet4Id(0)
88  , fuGet4Nr(0)
89  , fiEquipmentId(0)
90  , fviMsgCounter(11, 0)
91  , // length of enum MessageTypes initialized with 0
92  fvulGdpbTsMsb()
93  , fvulGdpbTsLsb()
94  , fvulStarTsMsb()
95  , fvulStarTsMid()
96  , fvulGdpbTsFullLast()
97  , fvulStarTsFullLast()
98  , fvuStarTokenLast()
99  , fvuStarDaqCmdLast()
100  , fvuStarTrigCmdLast()
101  , fvulCurrentEpoch()
102  , fvbFirstEpochSeen()
103  , fvulCurrentEpochCycle()
104  , fvulCurrentEpochFull()
105  , fulCurrentEpochTime(0)
106  , fGdpbIdIndexMap()
107  , fvmEpSupprBuffer()
108  , fvuFeeChanNbHitsLastMs()
109  , fvdFeeChanMsLastPulserHit()
110  , dMinDt(-1. * (kuNbBinsDt * gdpbv100::kdBinSize / 2.)
111  - gdpbv100::kdBinSize / 2.)
112  , dMaxDt(1. * (kuNbBinsDt * gdpbv100::kdBinSize / 2.)
113  + gdpbv100::kdBinSize / 2.)
114  , fuNbFeePlot(2)
115  , fuNbFeePlotsPerGdpb(0)
116  , fdStartTime(-1.)
117  , fdStartTimeLong(-1.)
118  , fdStartTimeMsSz(-1.)
119  , fuHistoryHistoSize(1800)
120  , fdLastRmsUpdateTime(0.0)
121  , fdFitZoomWidthPs(0.0)
122  , fcMsSizeAll(NULL)
123  , fvhMsSzPerLink(12, NULL)
124  , fvhMsSzTimePerLink(12, NULL)
125  , fuGdpbA(0)
126  , fuGbtxA(0)
127  , fuFeeA(0)
128  , fuGlobalIdxFeeA(0)
129  , fuGdpbB(0)
130  , fuGbtxB(0)
131  , fuFeeB(1)
132  , fuGlobalIdxFeeB(1)
133  , fvhTimeDiffPulserFeeA()
134  , fhTimeMeanPulserFeeA(NULL)
135  , fhTimeRmsPulserFeeA(NULL)
136  , fhTimeRmsZoomFitPulsFeeA(NULL)
137  , fhTimeResFitPulsFeeA(NULL)
138  , fvhTimeDiffPulserFeeB()
139  , fhTimeMeanPulserFeeB(NULL)
140  , fhTimeRmsPulserFeeB(NULL)
141  , fhTimeRmsZoomFitPulsFeeB(NULL)
142  , fhTimeResFitPulsFeeB(NULL)
143  , fvhTimeDiffPulserFeeFee()
144  , fhTimeMeanPulserFeeFee(NULL)
145  , fhTimeRmsPulserFeeFee(NULL)
146  , fhTimeRmsZoomFitPulsFeeFee(NULL)
147  , fhTimeResFitPulsFeeFee(NULL)
148  , fhChanTotFeeA(NULL)
149  , fhChanTotFeeB(NULL)
150  , fhChanPulseIntervalFeeA(NULL)
151  , fhChanPulseIntervalFeeB(NULL)
152  , fvhPulserCountEvoPerFeeGdpb()
153  , fcPulserFeeA(NULL)
154  , fcPulserFeeB(NULL)
155  , fcPulserFeeFee(NULL)
156  , fcPulseProp(NULL)
157  , fvuPadiToGet4()
158  , fvuGet4ToPadi()
159  , fvuElinkToGet4()
160  , fvuGet4ToElink()
161  , fTimeLastHistoSaving() {}
162 
164 
166  LOG(info) << "Initializing Get4 monitor";
167 
168  FairRootManager* ioman = FairRootManager::Instance();
169  if (ioman == NULL) {
170  LOG(fatal) << "No FairRootManager instance";
171  } // if( ioman == NULL )
172 
173  return kTRUE;
174 }
175 
177  LOG(info) << "Setting parameter containers for " << GetName();
178  fUnpackPar =
179  (CbmMcbm2018TofPar*) (FairRun::Instance()->GetRuntimeDb()->getContainer(
180  "CbmMcbm2018TofPar"));
181 }
182 
184  LOG(info) << "Init parameter containers for " << GetName();
185  Bool_t initOK = ReInitContainers();
186 
188 
193  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
194  for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j) {
198  } // for( UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j )
199  } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
200 
201  return initOK;
202 }
203 
205  LOG(info) << "ReInit parameter containers for " << GetName();
206 
208  LOG(info) << "Nr. of Tof GDPBs: " << fuNrOfGdpbs;
210 
212  LOG(info) << "Nr. of FEEs per Tof GDPB: " << fuNrOfFeePerGdpb;
213 
215  LOG(info) << "Nr. of GET4 per Tof FEE: " << fuNrOfGet4PerFee;
216 
218  LOG(info) << "Nr. of channels per GET4: " << fuNrOfChannelsPerGet4;
219 
221  LOG(info) << "Nr. of channels per FEE: " << fuNrOfChannelsPerFee;
222 
224  LOG(info) << "Nr. of GET4s: " << fuNrOfGet4;
225 
227  LOG(info) << "Nr. of GET4s per GDPB: " << fuNrOfGet4PerGdpb;
228 
230  LOG(info) << "Nr. of channels per GDPB: " << fuNrOfChannelsPerGdpb;
231 
232  fGdpbIdIndexMap.clear();
233  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
235  LOG(info) << "GDPB Id of TOF " << i << " : " << std::hex
236  << fUnpackPar->GetGdpbId(i) << std::dec;
237  } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
238 
240  LOG(info) << "Nr. of GBTx: " << fuNrOfGbtx;
241 
243  LOG(info) << "Nr. of GBTx: " << fuNrOfModules;
244 
245  fviRpcType.resize(fuNrOfGbtx);
246  fviModuleId.resize(fuNrOfGbtx);
247  fviNrOfRpc.resize(fuNrOfGbtx);
248  fviRpcSide.resize(fuNrOfGbtx);
249  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx) {
250  fviNrOfRpc[uGbtx] = fUnpackPar->GetNrOfRpc(uGbtx);
251  fviRpcType[uGbtx] = fUnpackPar->GetRpcType(uGbtx);
252  fviRpcSide[uGbtx] = fUnpackPar->GetRpcSide(uGbtx);
253  fviModuleId[uGbtx] = fUnpackPar->GetModuleId(uGbtx);
254  } // for( UInt_t uGbtx = 0; uGbtx < uNrOfGbtx; ++uGbtx)
255 
256  TString sPrintoutLine = "Nr. of RPCs per GBTx: ";
257  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
258  sPrintoutLine += Form(" %2d", fviNrOfRpc[uGbtx]);
259  LOG(info) << sPrintoutLine;
260 
261  sPrintoutLine = "RPC type per GBTx: ";
262  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
263  sPrintoutLine += Form(" %2d", fviRpcType[uGbtx]);
264  LOG(info) << sPrintoutLine;
265 
266  sPrintoutLine = "RPC side per GBTx: ";
267  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
268  sPrintoutLine += Form(" %2d", fviRpcSide[uGbtx]);
269  LOG(info) << sPrintoutLine;
270 
271  sPrintoutLine = "Module ID per GBTx: ";
272  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
273  sPrintoutLine += Form(" %2d", fviModuleId[uGbtx]);
274  LOG(info) << sPrintoutLine;
275 
281  LOG(info) << "Timeslice parameters: " << fuTotalMsNb
282  << " MS per link, of which " << fuOverlapMsNb
283  << " overlap MS, each MS is " << fdMsSizeInNs << " ns";
284 
286  fvulGdpbTsMsb.resize(fuNrOfGdpbs);
287  fvulGdpbTsLsb.resize(fuNrOfGdpbs);
288  fvulStarTsMsb.resize(fuNrOfGdpbs);
289  fvulStarTsMid.resize(fuNrOfGdpbs);
295  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
296  fvulGdpbTsMsb[uGdpb] = 0;
297  fvulGdpbTsLsb[uGdpb] = 0;
298  fvulStarTsMsb[uGdpb] = 0;
299  fvulStarTsMid[uGdpb] = 0;
300  fvulGdpbTsFullLast[uGdpb] = 0;
301  fvulStarTsFullLast[uGdpb] = 0;
302  fvuStarTokenLast[uGdpb] = 0;
303  fvuStarDaqCmdLast[uGdpb] = 0;
304  fvuStarTrigCmdLast[uGdpb] = 0;
305  } // for (Int_t iGdpb = 0; iGdpb < fuNrOfGdpbs; ++iGdpb)
306 
308 
314 
317  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFee) {
320  } // for( UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFee );
321 
325  /*
326  UInt_t uGet4topadi[32] = {
327  4, 3, 2, 1, // provided by Jochen
328  24, 23, 22, 21,
329  8, 7, 6, 5,
330  28, 27, 26, 25,
331  12, 11, 10, 9,
332  32, 31, 30, 29,
333  16, 15, 14, 13,
334  20, 19, 18, 17 };
335 */
337  UInt_t uGet4topadi[32] = {4, 3, 2, 1, // provided by Jochen
338  8, 7, 6, 5, 12, 11, 10, 9, 16, 15,
339  14, 13, 20, 19, 18, 17, 24, 23, 22, 21,
340  28, 27, 26, 25, 32, 31, 30, 29};
341 
342  UInt_t uPaditoget4[32] = {4, 3, 2, 1, // provided by Jochen
343  12, 11, 10, 9, 20, 19, 18, 17, 28, 27,
344  26, 25, 32, 31, 30, 29, 8, 7, 6, 5,
345  16, 15, 14, 13, 24, 23, 22, 21};
346 
347  for (UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan) {
348  fvuPadiToGet4[uChan] = uPaditoget4[uChan] - 1;
349  fvuGet4ToPadi[uChan] = uGet4topadi[uChan] - 1;
350  } // for( UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan )
351 
352 
356  UInt_t kuElinkToGet4[kuNbGet4PerGbtx] = {
357  27, 2, 7, 3, 31, 26, 30, 1, 33, 37, 32, 13, 9, 14,
358  10, 15, 17, 21, 16, 35, 34, 38, 25, 24, 0, 6, 20, 23,
359  18, 22, 28, 4, 29, 5, 19, 36, 39, 8, 12, 11};
360  UInt_t kuGet4ToElink[kuNbGet4PerGbtx] = {
361  24, 7, 1, 3, 31, 33, 25, 2, 37, 12, 14, 39, 38, 11,
362  13, 15, 18, 16, 28, 34, 26, 17, 29, 27, 23, 22, 5, 0,
363  30, 32, 6, 4, 10, 8, 20, 19, 35, 9, 21, 36};
364 
365  for (UInt_t uLinkAsic = 0; uLinkAsic < kuNbGet4PerGbtx; ++uLinkAsic) {
366  fvuElinkToGet4[uLinkAsic] = kuElinkToGet4[uLinkAsic];
367  fvuGet4ToElink[uLinkAsic] = kuGet4ToElink[uLinkAsic];
368  } // for( UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan )
369 
370  return kTRUE;
371 }
372 
373 
375  UShort_t /*usDetectorId*/) {
377  for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
378  if (component == fvMsComponentsList[uCompIdx]) return;
379 
381  fvMsComponentsList.push_back(component);
382 
384  if (NULL == fvhMsSzPerLink[component]) {
385  TString sMsSzName = Form("MsSz_link_%02lu", component);
386  TString sMsSzTitle =
387  Form("Size of MS from link %02lu; Ms Size [bytes]", component);
388  fvhMsSzPerLink[component] =
389  new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 160000, 0., 20000.);
390 
391  sMsSzName = Form("MsSzTime_link_%02lu", component);
392  sMsSzTitle = Form(
393  "Size of MS vs time for gDPB of link %02lu; Time[s] ; Ms Size [bytes]",
394  component);
395  fvhMsSzTimePerLink[component] = new TProfile(sMsSzName.Data(),
396  sMsSzTitle.Data(),
397  100 * fuHistoryHistoSize,
398  0.,
399  2 * fuHistoryHistoSize);
400  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
401  if (server) {
402  server->Register("/FlibRaw", fvhMsSzPerLink[component]);
403  server->Register("/FlibRaw", fvhMsSzTimePerLink[component]);
404  } // if( server )
405  if (NULL != fcMsSizeAll) {
406  fcMsSizeAll->cd(1 + component);
407  gPad->SetLogy();
408  fvhMsSzTimePerLink[component]->Draw("hist le0");
409  } // if( NULL != fcMsSizeAll )
410  LOG(info) << "Added MS size histo for component (link): " << component;
411  } // if( NULL == fvhMsSzPerLink[ component ] )
412 }
413 void CbmMcbm2018TofTestFee::SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb) {
414  fuNbCoreMsPerTs = uCoreMsNb;
415  fuNbOverMsPerTs = uOverlapMsNb;
416 
417  // UInt_t uNbMsTotal = fuNbCoreMsPerTs + fuNbOverMsPerTs;
418 }
419 
421  LOG(info) << "create Histos for " << fuNrOfGdpbs << " gDPBs ";
422 
423  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
424 
425  TString name {""};
426  TString title {""};
427 
428  // Full Fee time difference test
429  UInt_t uNbBinsDt =
430  kuNbBinsDt
431  + 1; // To account for extra bin due to shift by 1/2 bin of both ranges
432 
434  + (0 != fuNrOfFeePerGdpb % fuNbFeePlot ? 1 : 0);
435  Double_t dBinSzG4v2 = (6250. / 112.);
436  dMinDt = -1. * (kuNbBinsDt * dBinSzG4v2 / 2.) - dBinSzG4v2 / 2.;
437  dMaxDt = 1. * (kuNbBinsDt * dBinSzG4v2 / 2.) + dBinSzG4v2 / 2.;
438 
439 
440  /*******************************************************************/
445  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++) {
449  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++) {
450  if (uChanA < uChanB) {
451  fvhTimeDiffPulserFeeA[uChanA][uChanB] =
452  new TH1I(Form("hTimeDiffPulser_g%02u_gbt%1u_f%1u_ch%02u_ch%02u",
453  fuGdpbA,
454  fuGbtxA,
455  fuFeeA,
456  uChanA,
457  uChanB),
458  Form("Time difference for pulser on gDPB %02u GBTx %02u FEE "
459  "%1u channels %02u and %02u; DeltaT [ps]; Counts",
460  fuGdpbA,
461  fuGbtxA,
462  fuFeeA,
463  uChanA,
464  uChanB),
465  uNbBinsDt,
466  dMinDt,
467  dMaxDt);
468 
469  fvhTimeDiffPulserFeeB[uChanA][uChanB] =
470  new TH1I(Form("hTimeDiffPulser_g%02u_gbt%1u_f%1u_ch%02u_ch%02u",
471  fuGdpbB,
472  fuGbtxB,
473  fuFeeB,
474  uChanA,
475  uChanB),
476  Form("Time difference for pulser on gDPB %02u GBTx %02u FEE "
477  "%1u channels %02u and %02u; DeltaT [ps]; Counts",
478  fuGdpbB,
479  fuGbtxB,
480  fuFeeB,
481  uChanA,
482  uChanB),
483  uNbBinsDt,
484  dMinDt,
485  dMaxDt);
486  } // if( uChanA < uFeeB )
487  else {
488  fvhTimeDiffPulserFeeA[uChanA][uChanB] = NULL;
489  fvhTimeDiffPulserFeeB[uChanA][uChanB] = NULL;
490  } // else of if( uChanA < uChanB )
491 
492  fvhTimeDiffPulserFeeFee[uChanA][uChanB] = new TH1I(
493  Form(
494  "hTimeDiffPulser_g%02u_gbt%1u_f%1u_ch%02u_g%02u_gbt%1u_f%1u_ch%02u",
495  fuGdpbA,
496  fuGbtxA,
497  fuFeeA,
498  uChanA,
499  fuGdpbB,
500  fuGbtxB,
501  fuFeeB,
502  uChanB),
503  Form("Time difference for pulser on gDPB %02u GBTx %02u FEE %1u "
504  "channel %02u and gDPB %02u GBTx %02u FEE %1u channel %02u; "
505  "DeltaT [ps]; Counts",
506  fuGdpbA,
507  fuGbtxA,
508  fuFeeA,
509  uChanA,
510  fuGdpbB,
511  fuGbtxB,
512  fuFeeB,
513  uChanB),
514  uNbBinsDt,
515  dMinDt,
516  dMaxDt);
517  } // for( UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
518  } // for( UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
519 
521  name = "hTimeMeanPulserFeeA";
522  fhTimeMeanPulserFeeA = new TH2D(name.Data(),
523  "Time difference Mean for each channel pairs "
524  "in FEE A; Chan A; Chan B ; Mean [ps]",
526  -0.5,
527  fuNrOfChannelsPerFee - 1.5,
529  0.5,
530  fuNrOfChannelsPerFee - 0.5);
531 
532  name = "hTimeRmsPulserFeeA";
533  fhTimeRmsPulserFeeA = new TH2D(name.Data(),
534  "Time difference RMS for each channel pairs "
535  "in FEE A; Chan A; Chan B; RMS [ps]",
537  -0.5,
538  fuNrOfChannelsPerFee - 1.5,
540  0.5,
541  fuNrOfChannelsPerFee - 0.5);
542 
543  name = "hTimeRmsZoomFitPulsFeeA";
545  new TH2D(name.Data(),
546  "Time difference RMS after zoom for each channel pairs in FEE A; "
547  "Chan A; Chan B; RMS [ps]",
549  -0.5,
550  fuNrOfChannelsPerFee - 1.5,
552  0.5,
553  fuNrOfChannelsPerFee - 0.5);
554 
555  name = "hTimeResFitPulsFeeA";
557  new TH2D(name.Data(),
558  "Time difference Res from fit for each channel pairs in FEE A; "
559  "Chan A; Chan B; Sigma [ps]",
561  -0.5,
562  fuNrOfChannelsPerFee - 1.5,
564  0.5,
565  fuNrOfChannelsPerFee - 0.5);
566 
568  name = "hTimeMeanPulserFeeB";
569  fhTimeMeanPulserFeeB = new TH2D(name.Data(),
570  "Time difference Mean for each channel pairs "
571  "in FEE B; Chan A; Chan B ; Mean [ps]",
573  -0.5,
574  fuNrOfChannelsPerFee - 1.5,
576  0.5,
577  fuNrOfChannelsPerFee - 0.5);
578 
579  name = "hTimeRmsPulserFeeB";
580  fhTimeRmsPulserFeeB = new TH2D(name.Data(),
581  "Time difference RMS for each channel pairs "
582  "in FEE B; Chan A; Chan B; RMS [ps]",
584  -0.5,
585  fuNrOfChannelsPerFee - 1.5,
587  0.5,
588  fuNrOfChannelsPerFee - 0.5);
589 
590  name = "hTimeRmsZoomFitPulsFeeB";
592  new TH2D(name.Data(),
593  "Time difference RMS after zoom for each channel pairs in FEE B; "
594  "Chan A; Chan B; RMS [ps]",
596  -0.5,
597  fuNrOfChannelsPerFee - 1.5,
599  0.5,
600  fuNrOfChannelsPerFee - 0.5);
601 
602  name = "hTimeResFitPulsFeeB";
604  new TH2D(name.Data(),
605  "Time difference Res from fit for each channel pairs in FEE B; "
606  "Chan A; Chan B; Sigma [ps]",
608  -0.5,
609  fuNrOfChannelsPerFee - 1.5,
611  0.5,
612  fuNrOfChannelsPerFee - 0.5);
613 
615  name = "hTimeMeanPulserFeeFee";
617  new TH2D(name.Data(),
618  "Time difference Mean for each channel pairs in FEE A & B; Chan "
619  "FEE A; Chan FEE B ; Mean [ps]",
621  -0.5,
622  fuNrOfChannelsPerFee - 0.5,
624  -0.5,
625  fuNrOfChannelsPerFee - 0.5);
626 
627  name = "hTimeRmsPulserFeeFee";
629  new TH2D(name.Data(),
630  "Time difference RMS for each channel pairs in FEE A & B; Chan "
631  "FEE A; Chan FEE B; RMS [ps]",
633  -0.5,
634  fuNrOfChannelsPerFee - 0.5,
636  -0.5,
637  fuNrOfChannelsPerFee - 0.5);
638 
639  name = "hTimeRmsZoomFitPulsFeeFee";
641  new TH2D(name.Data(),
642  "Time difference RMS after zoom for each channel pairs in FEE A & "
643  "B; Chan FEE A; Chan FEE B; RMS [ps]",
645  -0.5,
646  fuNrOfChannelsPerFee - 0.5,
648  -0.5,
649  fuNrOfChannelsPerFee - 0.5);
650 
651  name = "hTimeResFitPulsFeeFee";
653  new TH2D(name.Data(),
654  "Time difference Res from fit for each channel pairs in FEE A & "
655  "B; Chan FEE A; Chan FEE B; Sigma [ps]",
657  -0.5,
658  fuNrOfChannelsPerFee - 0.5,
660  -0.5,
661  fuNrOfChannelsPerFee - 0.5);
662 
664  name = "hChanTotFeeA";
665  fhChanTotFeeA = new TH2D(
666  name.Data(),
667  "TOT distribution per channel in FEE A; Chan FEE A; TOT [bin]; Counts []",
669  -0.5,
670  fuNrOfChannelsPerFee - 0.5,
672  -0.5,
674  name = "hChanTotFeeB";
675  fhChanTotFeeB = new TH2D(
676  name.Data(),
677  "TOT distribution per channel in FEE B; Chan FEE B; TOT [bin]; Counts []",
679  -0.5,
680  fuNrOfChannelsPerFee - 0.5,
682  -0.5,
684 
687  uint32_t iNbBinsLog = 0;
689  std::vector<double> dBinsLogVector =
690  GenerateLogBinArray(9, 9, 10, iNbBinsLog);
691  double* dBinsLog = dBinsLogVector.data();
692  // double * dBinsLog = GenerateLogBinArray( 9, 9, 10, iNbBinsLog );
693 
694  name = "hChanPulseIntervalFeeA";
696  new TH2D(name.Data(),
697  "Pulses time interval per channel in FEE A; Time interval [ns]; "
698  "Chan FEE A; Counts []",
699  iNbBinsLog,
700  dBinsLog,
702  -0.5,
703  fuNrOfChannelsPerFee - 0.5);
704  name = "hChanPulseIntervalFeeB";
706  new TH2D(name.Data(),
707  "Pulses time interval per channel in FEE B; Time interval [ns]; "
708  "Chan FEE B; Counts []",
709  iNbBinsLog,
710  dBinsLog,
712  -0.5,
713  fuNrOfChannelsPerFee - 0.5);
714 
715  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
716  name = Form("hPulserCountEvoPerFeeGdpb%02u", uGdpb);
717  fvhPulserCountEvoPerFeeGdpb.push_back(new TH2D(
718  name.Data(),
719  Form("Pulser count per FEE in gDPB %02u; time in run [s]; FEE []", uGdpb),
721  0,
724  -0.5,
726  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
727 
729  // delete dBinsLog;
730 
731  if (server) {
732  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
733  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++) {
734  if (NULL != fvhTimeDiffPulserFeeA[uChanA][uChanB])
735  server->Register("/TofDtFeeA", fvhTimeDiffPulserFeeA[uChanA][uChanB]);
736  if (NULL != fvhTimeDiffPulserFeeB[uChanA][uChanB])
737  server->Register("/TofDtFeeB", fvhTimeDiffPulserFeeB[uChanA][uChanB]);
738 
739  server->Register("/TofDtFeeFee",
740  fvhTimeDiffPulserFeeFee[uChanA][uChanB]);
741  } // Loop anc channels A and B
742 
743  server->Register("/TofDt", fhTimeMeanPulserFeeA);
744  server->Register("/TofDt", fhTimeRmsPulserFeeA);
745  server->Register("/TofDt", fhTimeRmsZoomFitPulsFeeA);
746  server->Register("/TofDt", fhTimeResFitPulsFeeA);
747 
748  server->Register("/TofDt", fhTimeMeanPulserFeeB);
749  server->Register("/TofDt", fhTimeRmsPulserFeeB);
750  server->Register("/TofDt", fhTimeRmsZoomFitPulsFeeB);
751  server->Register("/TofDt", fhTimeResFitPulsFeeB);
752 
753  server->Register("/TofDt", fhTimeMeanPulserFeeFee);
754  server->Register("/TofDt", fhTimeRmsPulserFeeFee);
755  server->Register("/TofDt", fhTimeRmsZoomFitPulsFeeFee);
756  server->Register("/TofDt", fhTimeResFitPulsFeeFee);
757 
758  server->Register("/TofPulse", fhChanTotFeeA);
759  server->Register("/TofPulse", fhChanTotFeeB);
760  server->Register("/TofPulse", fhChanPulseIntervalFeeA);
761  server->Register("/TofPulse", fhChanPulseIntervalFeeB);
762 
763  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
764  server->Register("/TofCnt", fvhPulserCountEvoPerFeeGdpb[uGdpb]);
765 
766  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
767 
768  server->RegisterCommand("/Reset_All_eTOF",
769  "bMcbmTofTestFeeResetHistos=kTRUE");
770  server->RegisterCommand("/Save_All_eTof",
771  "bMcbmTofTestFeeSaveHistos=kTRUE");
772  server->RegisterCommand("/Update_PulsFit",
773  "bMcbmTofTestFeeUpdateZoomedFit=kTRUE");
774  server->RegisterCommand("/Print_Raw_Data",
775  "bMcbmTofTestFeeRawDataPrint=kTRUE");
776  server->RegisterCommand("/Print_AllHits",
777  "bMcbmTofTestFeePrintAllHitsEna=kTRUE");
778  server->RegisterCommand("/Print_AllEps",
779  "bMcbmTofTestFeePrintAllEpochsEna=kTRUE");
780 
781  server->Restrict("/Reset_All_eTof", "allow=admin");
782  server->Restrict("/Save_All_eTof", "allow=admin");
783  server->Restrict("/Update_PulsFit", "allow=admin");
784  server->Restrict("/Print_Raw_Data", "allow=admin");
785  server->Restrict("/Print_AllHits", "allow=admin");
786  server->Restrict("/Print_AllEps", "allow=admin");
787  } // if( server )
788 
789  /*****************************/
790  Double_t w = 600;
791  Double_t h = 480;
792 
794  fcPulserFeeA = new TCanvas(
795  "cPulserFeeA", "Time difference RMS for channels on FEE A", w, h);
796  fcPulserFeeA->Divide(2, 2);
797 
798  fcPulserFeeA->cd(1);
799  gPad->SetGridx();
800  gPad->SetGridy();
801  fhTimeRmsPulserFeeA->Draw("colz");
802 
803  fcPulserFeeA->cd(2);
804  gPad->SetGridx();
805  gPad->SetGridy();
806  fhTimeMeanPulserFeeA->Draw("colz");
807 
808  fcPulserFeeA->cd(3);
809  gPad->SetGridx();
810  gPad->SetGridy();
811  fhTimeRmsZoomFitPulsFeeA->Draw("colz");
812 
813  fcPulserFeeA->cd(4);
814  gPad->SetGridx();
815  gPad->SetGridy();
816  fhTimeResFitPulsFeeA->Draw("colz");
817 
818  server->Register("/canvases", fcPulserFeeA);
819  /*****************************/
820 
822  fcPulserFeeB = new TCanvas(
823  "cPulserFeeB", "Time difference RMS for channels on FEE A", w, h);
824  fcPulserFeeB->Divide(2, 2);
825 
826  fcPulserFeeB->cd(1);
827  gPad->SetGridx();
828  gPad->SetGridy();
829  fhTimeRmsPulserFeeB->Draw("colz");
830 
831  fcPulserFeeB->cd(2);
832  gPad->SetGridx();
833  gPad->SetGridy();
834  fhTimeMeanPulserFeeB->Draw("colz");
835 
836  fcPulserFeeB->cd(3);
837  gPad->SetGridx();
838  gPad->SetGridy();
839  fhTimeRmsZoomFitPulsFeeB->Draw("colz");
840 
841  fcPulserFeeB->cd(4);
842  gPad->SetGridx();
843  gPad->SetGridy();
844  fhTimeResFitPulsFeeB->Draw("colz");
845 
846  server->Register("/canvases", fcPulserFeeB);
847  /*****************************/
848 
851  new TCanvas("cPulserFeeFee",
852  "Time difference RMS for channels on FEE A VS FEE B",
853  w,
854  h);
855  fcPulserFeeFee->Divide(2, 2);
856 
857  fcPulserFeeFee->cd(1);
858  gPad->SetGridx();
859  gPad->SetGridy();
860  fhTimeRmsPulserFeeFee->Draw("colz");
861 
862  fcPulserFeeFee->cd(2);
863  gPad->SetGridx();
864  gPad->SetGridy();
865  fhTimeMeanPulserFeeFee->Draw("colz");
866 
867  fcPulserFeeFee->cd(3);
868  gPad->SetGridx();
869  gPad->SetGridy();
870  fhTimeRmsZoomFitPulsFeeFee->Draw("colz");
871 
872  fcPulserFeeFee->cd(4);
873  gPad->SetGridx();
874  gPad->SetGridy();
875  fhTimeResFitPulsFeeFee->Draw("colz");
876 
877  server->Register("/canvases", fcPulserFeeFee);
878  /*****************************/
879 
881  fcPulseProp = new TCanvas(
882  "cPulseProp", "Pulse properties for each channel on FEE A and FEE B", w, h);
883  fcPulseProp->Divide(2, 2);
884 
885  fcPulseProp->cd(1);
886  gPad->SetGridx();
887  gPad->SetGridy();
888  gPad->SetLogz();
889  fhChanTotFeeA->Draw("colz");
890 
891  fcPulseProp->cd(2);
892  gPad->SetGridx();
893  gPad->SetGridy();
894  gPad->SetLogz();
895  fhChanTotFeeB->Draw("colz");
896 
897  fcPulseProp->cd(3);
898  gPad->SetGridx();
899  gPad->SetGridy();
900  gPad->SetLogx();
901  gPad->SetLogz();
902  fhChanPulseIntervalFeeA->Draw("colz");
903 
904  fcPulseProp->cd(4);
905  gPad->SetGridx();
906  gPad->SetGridy();
907  gPad->SetLogx();
908  gPad->SetLogz();
909  fhChanPulseIntervalFeeB->Draw("colz");
910 
911  server->Register("/canvases", fcPulseProp);
912  /*****************************/
913 
915  // Try to recover canvas in case it was created already by another monitor
916  // If not existing, create it
917  fcMsSizeAll = dynamic_cast<TCanvas*>(gROOT->FindObject("cMsSizeAll"));
918  if (NULL == fcMsSizeAll) {
919  fcMsSizeAll =
920  new TCanvas("cMsSizeAll", "Evolution of MS size in last 300 s", w, h);
921  fcMsSizeAll->Divide(4, 3);
922  LOG(info) << "Created MS size canvas in TOF monitor";
923  } // if( NULL == fcMsSizeAll )
924  else
925  LOG(info) << "Recovered MS size canvas in TOF monitor";
926 
927  LOG(info) << "Leaving CreateHistograms";
928 }
929 
930 Bool_t CbmMcbm2018TofTestFee::DoUnpack(const fles::Timeslice& ts,
931  size_t component) {
933  LOG(info) << "Reset eTOF STAR histos ";
934  ResetAllHistos();
936  } // if( bMcbmTofTestFeeResetHistos )
938  LOG(info) << "Start saving eTOF STAR histos ";
939  SaveAllHistos("data/histos_Shift_StarTof.root");
940  bMcbmTofTestFeeSaveHistos = kFALSE;
941  } // if( bSaveStsHistos )
951  } // if (bMcbmTofTestFeeUpdateZoomedFit)
955  } // if( bMcbmTofTestFeeRawDataPrint )
959  } // if( bMcbmTofTestFeePrintAllHitsEna )
963  } // if( bMcbmTofTestFeePrintAllEpochsEna )
964 
966  std::chrono::time_point<std::chrono::system_clock> timeCurrent =
967  std::chrono::system_clock::now();
968  std::chrono::duration<double> elapsed_seconds =
969  timeCurrent - fTimeLastHistoSaving;
970  if (0 == fTimeLastHistoSaving.time_since_epoch().count()) {
971  fTimeLastHistoSaving = timeCurrent;
972  // fulNbBuiltSubEventLastPrintout = fulNbBuiltSubEvent;
973  // fulNbStarSubEventLastPrintout = fulNbStarSubEvent;
974  } // if( 0 == fTimeLastHistoSaving.time_since_epoch().count() )
975  else if (300 < elapsed_seconds.count()) {
976  std::time_t cTimeCurrent =
977  std::chrono::system_clock::to_time_t(timeCurrent);
978  char tempBuff[80];
979  std::strftime(tempBuff, 80, "%F %T", localtime(&cTimeCurrent));
980  /*
981  LOG(info) << "CbmTofStarEventBuilder2018::DoUnpack => " << tempBuff
982  << " Total number of Built events: " << std::setw(9) << fulNbBuiltSubEvent
983  << ", " << std::setw(9) << (fulNbBuiltSubEvent - fulNbBuiltSubEventLastPrintout)
984  << " events in last " << std::setw(4) << elapsed_seconds.count() << " s";
985  fTimeLastPrintoutNbStarEvent = timeCurrent;
986  fulNbBuiltSubEventLastPrintout = fulNbBuiltSubEvent;
987 */
988  fTimeLastHistoSaving = timeCurrent;
989  SaveAllHistos("data/histos_tof_pulser.root");
990  } // else if( 300 < elapsed_seconds.count() )
991 
992  LOG(debug1) << "Timeslice contains " << ts.num_microslices(component)
993  << "microslices.";
994 
996  UInt_t uNbMsLoop = fuNbCoreMsPerTs;
997  if (kFALSE == fbIgnoreOverlapMs) uNbMsLoop += fuNbOverMsPerTs;
998 
999  Int_t messageType = -111;
1000  Double_t dTsStartTime = -1;
1001 
1003  for (UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx++) {
1004  if (fuMsAcceptsPercent < uMsIdx) continue;
1005 
1006  fuCurrentMs = uMsIdx;
1007 
1008  if (0 == fulCurrentTsIndex && 0 == uMsIdx) {
1009  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
1010  ++uMsCompIdx) {
1011  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
1012  auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
1013  /*
1014  LOG(info) << "hi hv eqid flag si sv idx/start crc size offset";
1015  LOG(info) << Form( "%02x %02x %04x %04x %02x %02x %016llx %08x %08x %016llx",
1016  static_cast<unsigned int>(msDescriptor.hdr_id),
1017  static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
1018  static_cast<unsigned int>(msDescriptor.sys_id),
1019  static_cast<unsigned int>(msDescriptor.sys_ver), msDescriptor.idx, msDescriptor.crc,
1020  msDescriptor.size, msDescriptor.offset );
1021 */
1022  LOG(info) << FormatMsHeaderPrintout(msDescriptor);
1023  } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
1024  } // if( 0 == fulCurrentTsIndex && 0 == uMsIdx )
1025 
1027  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
1028  ++uMsCompIdx) {
1029  constexpr uint32_t kuBytesPerMessage = 8;
1030 
1031  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
1032  auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
1033  fiEquipmentId = msDescriptor.eq_id;
1034  fdMsIndex = static_cast<double>(msDescriptor.idx);
1035  fuCurrentMsSysId = static_cast<unsigned int>(msDescriptor.sys_id);
1036  const uint8_t* msContent =
1037  reinterpret_cast<const uint8_t*>(ts.content(uMsComp, uMsIdx));
1038 
1039  uint32_t size = msDescriptor.size;
1040  // fulLastMsIdx = msDescriptor.idx;
1041  if (size > 0)
1042  LOG(debug) << "Microslice: " << msDescriptor.idx
1043  << " has size: " << size;
1044  /*
1045  if( numCompMsInTs - fuOverlapMsNb <= m )
1046  {
1047 // LOG(info) << "Ignore overlap Microslice: " << msDescriptor.idx;
1048  continue;
1049  } // if( numCompMsInTs - fuOverlapMsNb <= m )
1050 */
1051  if (0 == uMsIdx && 0 == uMsCompIdx) dTsStartTime = (1e-9) * fdMsIndex;
1052 
1053  if (fdStartTimeMsSz < 0) fdStartTimeMsSz = (1e-9) * fdMsIndex;
1054  fvhMsSzPerLink[uMsComp]->Fill(size);
1055  if (2 * fuHistoryHistoSize < (1e-9) * fdMsIndex - fdStartTimeMsSz) {
1056  // Reset the evolution Histogram and the start time when we reach the end of the range
1057  fvhMsSzTimePerLink[uMsComp]->Reset();
1058  fdStartTimeMsSz = (1e-9) * fdMsIndex;
1059  } // if( 2 * fuHistoryHistoSize < (1e-9) * fdMsIndex - fdStartTimeMsSz )
1060  fvhMsSzTimePerLink[uMsComp]->Fill((1e-9) * fdMsIndex - fdStartTimeMsSz,
1061  size);
1062 
1063  // If not integer number of message in input buffer, print warning/error
1064  if (0 != (size % kuBytesPerMessage))
1065  LOG(error) << "The input microslice buffer does NOT "
1066  << "contain only complete nDPB messages!";
1067 
1068  // Compute the number of complete messages in the input microslice buffer
1069  uint32_t uNbMessages =
1070  (size - (size % kuBytesPerMessage)) / kuBytesPerMessage;
1071 
1072  // Get the gDPB ID from the MS header
1074 
1076  auto it = fGdpbIdIndexMap.find(fuGdpbId);
1077  if (it == fGdpbIdIndexMap.end()) {
1078  LOG(info)
1079  << "---------------------------------------------------------------";
1080  /*
1081  LOG(info) << "hi hv eqid flag si sv idx/start crc size offset";
1082  LOG(info) << Form( "%02x %02x %04x %04x %02x %02x %016llx %08x %08x %016llx",
1083  static_cast<unsigned int>(msDescriptor.hdr_id),
1084  static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
1085  static_cast<unsigned int>(msDescriptor.sys_id),
1086  static_cast<unsigned int>(msDescriptor.sys_ver), msDescriptor.idx, msDescriptor.crc,
1087  msDescriptor.size, msDescriptor.offset );
1088 */
1089  LOG(info) << FormatMsHeaderPrintout(msDescriptor);
1090  LOG(warning) << "Could not find the gDPB index for AFCK id 0x"
1091  << std::hex << fuGdpbId << std::dec << " in timeslice "
1092  << fulCurrentTsIndex << " in microslice " << fdMsIndex
1093  << " component " << uMsCompIdx << "\n"
1094  << "If valid this index has to be added in the TOF "
1095  "parameter file in the RocIdArray field";
1096  continue;
1097  } // if( it == fGdpbIdIndexMap.end() )
1098  else
1100 
1101  // Prepare variables for the loop on contents
1102  const uint64_t* pInBuff = reinterpret_cast<const uint64_t*>(msContent);
1103  for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
1104  // Fill message
1105  uint64_t ulData = static_cast<uint64_t>(pInBuff[uIdx]);
1106 
1108  if (0 == uIdx) {
1109  ProcessEpochCycle(ulData);
1110  continue;
1111  } // if( 0 == uIdx )
1112 
1113  gdpbv100::Message mess(ulData);
1114 
1116  || gLogger->IsLogNeeded(fair::Severity::debug2)) {
1117  mess.printDataCout();
1119  } // if( fuRawDataPrintMsgIdx < fuRawDataPrintMsgNb || gLogger->IsLogNeeded( fair::Severity::debug2 ) )
1120 
1121  // Increment counter for different message types
1122  // and fill the corresponding histogram
1123  messageType = mess.getMessageType();
1124  fviMsgCounter[messageType]++;
1125 
1129  if (0x90 == fuCurrentMsSysId) fuGet4Id = mess.getGdpbGenChipId();
1131 
1132  if (fuNrOfGet4PerGdpb <= fuGet4Id && !mess.isStarTrigger()
1134  LOG(warning) << "Message with Get4 ID too high: " << fuGet4Id
1135  << " VS " << fuNrOfGet4PerGdpb << " set in parameters.";
1136 
1137  switch (messageType) {
1138  case gdpbv100::MSG_HIT: {
1139  if (mess.getGdpbHitIs24b()) {
1140  PrintGenInfo(mess);
1141  } // if( getGdpbHitIs24b() )
1142  else {
1143  fvmEpSupprBuffer[fuGet4Nr].push_back(mess);
1144  } // else of if( getGdpbHitIs24b() )
1145  break;
1146  } // case gdpbv100::MSG_HIT:
1147  case gdpbv100::MSG_EPOCH: {
1149  for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb;
1150  uGet4Index++) {
1151  fuGet4Id = uGet4Index;
1153  gdpbv100::Message tmpMess(mess);
1154  tmpMess.setGdpbGenChipId(uGet4Index);
1155 
1156  FillEpochInfo(tmpMess);
1157  } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGetIndex ++ )
1158 
1159  if (kTRUE == fbPrintAllEpochsEnable) {
1160  LOG(info) << "Epoch: " << Form("0x%08x ", fuGdpbId) << ", Merg"
1161  << ", Link " << std::setw(1) << mess.getGdpbEpLinkId()
1162  << ", epoch " << std::setw(8)
1163  << mess.getGdpbEpEpochNb() << ", Sync "
1164  << std::setw(1) << mess.getGdpbEpSync()
1165  << ", Data loss " << std::setw(1)
1166  << mess.getGdpbEpDataLoss() << ", Epoch loss "
1167  << std::setw(1) << mess.getGdpbEpEpochLoss()
1168  << ", Epoch miss " << std::setw(1)
1169  << mess.getGdpbEpMissmatch();
1170  } // if( kTRUE == fbPrintAllEpochsEnable )
1171  } // if this epoch message is a merged one valid for all chips
1172  else {
1173  FillEpochInfo(mess);
1174 
1175  if (kTRUE == fbPrintAllEpochsEnable) {
1176  LOG(info) << "Epoch: " << Form("0x%08x ", fuGdpbId) << ", "
1177  << std::setw(4) << fuGet4Nr << ", Link "
1178  << std::setw(1) << mess.getGdpbEpLinkId()
1179  << ", epoch " << std::setw(8)
1180  << mess.getGdpbEpEpochNb() << ", Sync "
1181  << std::setw(1) << mess.getGdpbEpSync()
1182  << ", Data loss " << std::setw(1)
1183  << mess.getGdpbEpDataLoss() << ", Epoch loss "
1184  << std::setw(1) << mess.getGdpbEpEpochLoss()
1185  << ", Epoch miss " << std::setw(1)
1186  << mess.getGdpbEpMissmatch();
1187  } // if( kTRUE == fbPrintAllEpochsEnable )
1188  } // if single chip epoch message
1189  break;
1190  } // case gdpbv100::MSG_EPOCH:
1191  case gdpbv100::MSG_SLOWC: {
1192  PrintSlcInfo(mess);
1193  break;
1194  } // case gdpbv100::MSG_SLOWC:
1195  case gdpbv100::MSG_SYST: {
1197 
1198  // UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
1199 
1200  // Int_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4 + mess.getGdpbSysErrChanId();
1201  // Int_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4 + mess.getGdpbSysErrChanId();
1202  } // if( gdpbv100::SYSMSG_GET4_EVENT == mess.getGdpbSysSubType() )
1203  if (gdpbv100::SYS_PATTERN == mess.getGdpbSysSubType()) {
1204  FillPattInfo(mess);
1205  } // if( gdpbv100::SYS_PATTERN == mess.getGdpbSysSubType() )
1206  PrintSysInfo(mess);
1207  break;
1208  } // case gdpbv100::MSG_SYST:
1213  // fhGet4MessType->Fill(fuGet4Nr, 5);
1214  FillStarTrigInfo(mess);
1215  break;
1216  default:
1217  LOG(error) << "Message type " << std::hex << std::setw(2)
1218  << static_cast<uint16_t>(messageType)
1219  << " not included in Get4 unpacker.";
1220  } // switch( mess.getMessageType() )
1221  } // for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx ++)
1222  } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
1223 
1227  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++) {
1229  Bool_t bChanOkFeeA = kFALSE;
1230  Bool_t bChanOkFeeB = kFALSE;
1231  if (1 == fvuFeeChanNbHitsLastMs[fuGlobalIdxFeeA][uChanA])
1232  bChanOkFeeA = kTRUE;
1233  if (1 == fvuFeeChanNbHitsLastMs[fuGlobalIdxFeeB][uChanA])
1234  bChanOkFeeB = kTRUE;
1235 
1237  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++) {
1238  if (bChanOkFeeA) {
1240  if (uChanA < uChanB
1241  && 1 == fvuFeeChanNbHitsLastMs[fuGlobalIdxFeeA][uChanB]) {
1242  Double_t dTimeDiff =
1243  1e3
1246  if (TMath::Abs(dTimeDiff) < kdMaxDtPulserPs)
1247  fvhTimeDiffPulserFeeA[uChanA][uChanB]->Fill(dTimeDiff);
1248  } // if( uChanA < uChanB && 1 == fvuFeeChanNbHitsLastMs[ fuGlobalIdxFeeA ][ uChanB ] )
1249 
1251  if (1 == fvuFeeChanNbHitsLastMs[fuGlobalIdxFeeB][uChanB]) {
1252  Double_t dTimeDiff =
1253  1e3
1256  if (TMath::Abs(dTimeDiff) < kdMaxDtPulserPs)
1257  fvhTimeDiffPulserFeeFee[uChanA][uChanB]->Fill(dTimeDiff);
1258  } // if( 1 == fvuFeeChanNbHitsLastMs[ fuGlobalIdxFeeB ][ uChanB ] )
1259  } // if( bChanOkFeeA )
1260 
1261  if (bChanOkFeeB) {
1263  if (uChanA < uChanB
1264  && 1 == fvuFeeChanNbHitsLastMs[fuGlobalIdxFeeB][uChanB]) {
1265  Double_t dTimeDiff =
1266  1e3
1269  if (TMath::Abs(dTimeDiff) < kdMaxDtPulserPs)
1270  fvhTimeDiffPulserFeeB[uChanA][uChanB]->Fill(dTimeDiff);
1271  } // if( uChanA < uChanB && 1 == fvuFeeChanNbHitsLastMs[ fuGlobalIdxFeeB ][ uChanB ] )
1272  } // if( bChanOkFeeB )
1273  } // for( UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
1274  } // for( UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1275 
1277  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeA)
1278  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1279  fvuFeeChanNbHitsLastMs[uFeeA][uChanA] = 0;
1280  } // for( UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx ++ )
1281 
1282  // Update RMS plots only every 10s in data
1283  if (10.0 < dTsStartTime - fdLastRmsUpdateTime) {
1284  // Reset summary histograms for safety
1285  fhTimeMeanPulserFeeA->Reset();
1286  fhTimeRmsPulserFeeA->Reset();
1287 
1288  fhTimeMeanPulserFeeB->Reset();
1289  fhTimeRmsPulserFeeB->Reset();
1290 
1291  fhTimeMeanPulserFeeFee->Reset();
1292  fhTimeRmsPulserFeeFee->Reset();
1293 
1294  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1295  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++) {
1296  if (NULL != fvhTimeDiffPulserFeeA[uChanA][uChanB]) {
1297  fhTimeMeanPulserFeeA->Fill(
1298  uChanA, uChanB, fvhTimeDiffPulserFeeA[uChanA][uChanB]->GetMean());
1299  fhTimeRmsPulserFeeA->Fill(
1300  uChanA, uChanB, fvhTimeDiffPulserFeeA[uChanA][uChanB]->GetRMS());
1301  } // if( NULL != fvhTimeDiffPulserFeeA[ uChanA ][ uChanB ] )
1302 
1303  if (NULL != fvhTimeDiffPulserFeeB[uChanA][uChanB]) {
1304  fhTimeMeanPulserFeeB->Fill(
1305  uChanA, uChanB, fvhTimeDiffPulserFeeB[uChanA][uChanB]->GetMean());
1306  fhTimeRmsPulserFeeB->Fill(
1307  uChanA, uChanB, fvhTimeDiffPulserFeeB[uChanA][uChanB]->GetRMS());
1308  } // if( NULL != fvhTimeDiffPulserFeeB[ uChanA ][ uChanB ] )
1309 
1310  if (NULL != fvhTimeDiffPulserFeeFee[uChanA][uChanB]) {
1311  fhTimeMeanPulserFeeFee->Fill(
1312  uChanA, uChanB, fvhTimeDiffPulserFeeFee[uChanA][uChanB]->GetMean());
1313  fhTimeRmsPulserFeeFee->Fill(
1314  uChanA, uChanB, fvhTimeDiffPulserFeeFee[uChanA][uChanB]->GetRMS());
1315  } // if( NULL != fvhTimeDiffPulserFeeFee[ uChanA ][ uChanB ] )
1316  } // Loop on both channels
1317  fdLastRmsUpdateTime = dTsStartTime;
1318  } // if( 10.0 < dTsStartTime - fdLastRmsUpdateTime )
1319 
1321 
1322  return kTRUE;
1323 }
1324 
1325 void CbmMcbm2018TofTestFee::ProcessEpochCycle(uint64_t ulCycleData) {
1326  uint64_t ulEpochCycleVal = ulCycleData & gdpbv100::kulEpochCycleFieldSz;
1327 
1329  || gLogger->IsLogNeeded(fair::Severity::debug2)) {
1330  LOG(info)
1331  << "CbmMcbm2018TofTestFee::ProcessEpochCyle => "
1332  // << Form( " TS %5llu MS %3lu In data 0x%016llX Cycle 0x%016llX",
1333  // fulCurrentTsIndex, fuCurrentMs, ulCycleData, ulEpochCycleVal );
1334  << " TS " << FormatDecPrintout(fulCurrentTsIndex, 5) << " MS "
1335  << FormatDecPrintout(fuCurrentMs, 3) << " In data 0x"
1336  << FormatHexPrintout(ulCycleData, 16, '0', true) << " Cycle 0x"
1337  << FormatHexPrintout(ulEpochCycleVal, 16, '0', true);
1339  } // if( fuRawDataPrintMsgIdx < fuRawDataPrintMsgNb || gLogger->IsLogNeeded( fair::Severity::debug2 ) )
1340 
1341  for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index++) {
1342  fuGet4Id = uGet4Index;
1344  /*
1345  if( !( ulEpochCycleVal == fvulCurrentEpochCycle[fuGet4Nr] ||
1346  ulEpochCycleVal == fvulCurrentEpochCycle[fuGet4Nr] + 1 ) )
1347  LOG(error) << "CbmMcbm2018TofTestFee::ProcessEpochCyle => "
1348  << " Missmatch in epoch cycles detected, probably fake cycles due to epoch index corruption! "
1349  << Form( " Current cycle 0x%09X New cycle 0x%09X", fvulCurrentEpochCycle[fuGet4Nr], ulEpochCycleVal );
1350 */
1351  fvulCurrentEpochCycle[fuGet4Nr] = ulEpochCycleVal;
1352  } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index ++ )
1353  return;
1354 }
1355 
1357  UInt_t uChannel = mess.getGdpbHitChanId();
1358  UInt_t uTot = mess.getGdpbHit32Tot();
1359  UInt_t uFts = mess.getGdpbHitFineTs();
1360 
1361  ULong64_t ulCurEpochGdpbGet4 = fvulCurrentEpoch[fuGet4Nr];
1362 
1363  // In Ep. Suppr. Mode, receive following epoch instead of previous
1364  if (0 < ulCurEpochGdpbGet4)
1365  ulCurEpochGdpbGet4--;
1366  else
1367  ulCurEpochGdpbGet4 = gdpbv100::kuEpochCounterSz; // Catch epoch cycle!
1368 
1369  // UInt_t uChannelNr = fuGet4Id * fuNrOfChannelsPerGet4 + uChannel;
1370  UInt_t uChannelNrInFee =
1372  UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
1373  UInt_t uFeeNrInSys = fuGdpbNr * fuNrOfFeePerGdpb + uFeeNr;
1374  // UInt_t uRemappedChannelNr = uFeeNr * fuNrOfChannelsPerFee + fvuGet4ToPadi[ uChannelNrInFee ];
1375  UInt_t uRemappedChannelNrInFee = fvuGet4ToPadi[uChannelNrInFee];
1377  if (0x90 == fuCurrentMsSysId) {
1378  // uRemappedChannelNr = uChannelNr;
1379  uRemappedChannelNrInFee = uChannelNrInFee;
1380  } // if( 0x90 == fuCurrentMsSysId )
1381  // UInt_t uGbtxNr = (uFeeNr / kuNbFeePerGbtx);
1382  // UInt_t uFeeInGbtx = (uFeeNr % kuNbFeePerGbtx);
1383  // UInt_t uGbtxNrInSys = fuGdpbNr * kuNbGbtxPerGdpb + uGbtxNr;
1384 
1385  ULong_t ulHitTime = mess.getMsgFullTime(ulCurEpochGdpbGet4);
1386  Double_t dHitTime = mess.getMsgFullTimeD(ulCurEpochGdpbGet4);
1387 
1388  // In 32b mode the coarse counter is already computed back to 112 FTS bins
1389  // => need to hide its contribution from the Finetime
1390  // => FTS = Fullt TS modulo 112
1391  uFts = mess.getGdpbHitFullTs() % 112;
1392 
1393  // In Run rate evolution
1394  if (fdStartTime < 0) fdStartTime = dHitTime;
1395 
1396  // Reset the evolution Histogram and the start time when we reach the end of the range
1397  if (fuHistoryHistoSize < 1e-9 * (dHitTime - fdStartTime)) {
1399  fdStartTime = dHitTime;
1400  } // if( fuHistoryHistoSize < 1e-9 * (dHitTime - fdStartTime) )
1401 
1402  // In Run rate evolution
1403  if (fdStartTimeLong < 0) fdStartTimeLong = dHitTime;
1404 
1407  if (fuGlobalIdxFeeA == uFeeNrInSys) {
1408  fhChanTotFeeA->Fill(uRemappedChannelNrInFee, uTot);
1410  dHitTime
1411  - fvdFeeChanMsLastPulserHit[uFeeNrInSys][uRemappedChannelNrInFee],
1412  uRemappedChannelNrInFee);
1413  } // if( fuGlobalIdxFeeA == uFeeNrInSys )
1414  else if (fuGlobalIdxFeeB == uFeeNrInSys) {
1415  fhChanTotFeeB->Fill(uRemappedChannelNrInFee, uTot);
1417  dHitTime
1418  - fvdFeeChanMsLastPulserHit[uFeeNrInSys][uRemappedChannelNrInFee],
1419  uRemappedChannelNrInFee);
1420  } // if( fuGlobalIdxFeeB == uFeeNrInSys )
1421  fvdFeeChanMsLastPulserHit[uFeeNrInSys][uRemappedChannelNrInFee] = dHitTime;
1422  fvuFeeChanNbHitsLastMs[uFeeNrInSys][uRemappedChannelNrInFee]++;
1423 
1424  if (0 <= fdStartTime)
1425  fvhPulserCountEvoPerFeeGdpb[fuGdpbNr]->Fill(1e-9 * (dHitTime - fdStartTime),
1426  uFeeNr);
1427 
1428  if (kTRUE == fbPrintAllHitsEnable) {
1429  LOG(info) << "Hit: " << Form("0x%08x ", fuGdpbId) << ", " << std::setw(2)
1430  << fuGet4Nr << ", " << std::setw(3) << uChannel << ", "
1431  << std::setw(3) << uTot << ", epoch " << std::setw(3)
1432  << ulCurEpochGdpbGet4 << ", FullTime Clk "
1433  << Form("%12lu ", ulHitTime) << ", FullTime s "
1434  << Form("%12.9f ", dHitTime / 1e9) << ", FineTime " << uFts;
1435  } // if( kTRUE == fbPrintAllHitsEnable )
1436 }
1437 
1439  ULong64_t ulEpochNr = mess.getGdpbEpEpochNb();
1440  /*
1441  if( fvulCurrentEpoch[fuGet4Nr] < ulEpochNr )
1442  fvulCurrentEpochCycle[fuGet4Nr]++;
1443 */
1444  fvulCurrentEpoch[fuGet4Nr] = ulEpochNr;
1447 
1448  fulCurrentEpochTime = mess.getMsgFullTime(ulEpochNr);
1449 
1452  if (0 < ulEpochNr)
1453  mess.setGdpbEpEpochNb(ulEpochNr - 1);
1454  else
1456 
1457  Int_t iBufferSize = fvmEpSupprBuffer[fuGet4Nr].size();
1458  if (0 < iBufferSize) {
1459  LOG(debug) << "Now processing stored messages for for get4 " << fuGet4Nr
1460  << " with epoch number " << (fvulCurrentEpoch[fuGet4Nr] - 1);
1461 
1464  std::stable_sort(fvmEpSupprBuffer[fuGet4Nr].begin(),
1465  fvmEpSupprBuffer[fuGet4Nr].begin());
1466 
1467  for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
1469  } // for( Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++ )
1470 
1471  fvmEpSupprBuffer[fuGet4Nr].clear();
1472  } // if( 0 < fvmEpSupprBuffer[fuGet4Nr] )
1473 }
1474 
1476  /*
1477  if (fGdpbIdIndexMap.end() != fGdpbIdIndexMap.find(fuGdpbId))
1478  {
1479  UInt_t uChip = mess.getGdpbGenChipId();
1480  UInt_t uChan = mess.getGdpbSlcChan();
1481  UInt_t uEdge = mess.getGdpbSlcEdge();
1482  UInt_t uData = mess.getGdpbSlcData();
1483  UInt_t uType = mess.getGdpbSlcType();
1484  Double_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1485  Double_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1486  Double_t dMessTime = static_cast< Double_t>( fulCurrentEpochTime ) * 1.e-9;
1487 
1489 
1490  }
1491 */
1492 }
1493 
1495  Int_t mType = mess.getMessageType();
1496  Int_t channel = mess.getGdpbHitChanId();
1497  uint64_t uData = mess.getData();
1498 
1499  LOG(debug) << "Get4 MSG type " << mType << " from gdpbId " << fuGdpbId
1500  << ", getId " << fuGet4Id << ", (hit channel) " << channel
1501  << " data " << std::hex << uData;
1502 }
1503 
1505  if (fGdpbIdIndexMap.end() != fGdpbIdIndexMap.find(fuGdpbId))
1506  LOG(debug) << "GET4 System message, epoch "
1507  << static_cast<Int_t>(fvulCurrentEpoch[fuGet4Nr]) << ", time "
1508  << std::setprecision(9) << std::fixed
1509  << Double_t(fulCurrentEpochTime) * 1.e-9 << " s "
1510  << " for board ID " << std::hex << std::setw(4) << fuGdpbId
1511  << std::dec;
1512 
1513  switch (mess.getGdpbSysSubType()) {
1514  case gdpbv100::SYS_GET4_ERROR: {
1515  uint32_t uData = mess.getGdpbSysErrData();
1522  LOG(debug) << " +++++++ > gDPB: " << std::hex << std::setw(4)
1523  << fuGdpbId << std::dec << ", Chip = " << std::setw(2)
1524  << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
1525  << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1)
1526  << mess.getGdpbSysErrEdge() << ", Empt = " << std::setw(1)
1527  << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
1528  << std::setw(2) << uData << std::dec
1529  << " -- GET4 V1 Error Event";
1530  else
1531  LOG(debug) << " +++++++ >gDPB: " << std::hex << std::setw(4) << fuGdpbId
1532  << std::dec << ", Chip = " << std::setw(2)
1533  << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
1534  << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1)
1535  << mess.getGdpbSysErrEdge() << ", Empt = " << std::setw(1)
1536  << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
1537  << std::setw(2) << uData << std::dec
1538  << " -- GET4 V1 Error Event ";
1539  break;
1540  } // case gdpbv100::SYSMSG_GET4_EVENT
1541  case gdpbv100::SYS_GDPB_UNKWN: {
1542  LOG(debug) << "Unknown GET4 message, data: " << std::hex << std::setw(8)
1543  << mess.getGdpbSysUnkwData() << std::dec
1544  << " Full message: " << std::hex << std::setw(16)
1545  << mess.getData() << std::dec;
1546  break;
1547  } // case gdpbv100::SYS_GDPB_UNKWN:
1549  if (mess.getGdpbSysFwErrResync())
1550  LOG(info) << Form("GET4 Resynchronization: Get4:0x%04x ",
1551  mess.getGdpbGenChipId())
1552  << std::hex << std::setw(4) << fuGdpbId << std::dec;
1553  else
1554  LOG(info) << "GET4 synchronization pulse missing in gDPB " << std::hex
1555  << std::setw(4) << fuGdpbId << std::dec;
1556  break;
1557  } // case gdpbv100::SYS_GET4_SYNC_MISS:
1558  case gdpbv100::SYS_PATTERN: {
1559  LOG(debug) << "ASIC pattern for missmatch, disable or resync";
1560  break;
1561  } // case gdpbv100::SYS_PATTERN:
1562  default: {
1563  LOG(debug) << "Crazy system message, subtype "
1564  << mess.getGdpbSysSubType();
1565  break;
1566  } // default
1567 
1568  } // switch( getGdpbSysSubType() )
1569 }
1570 
1572  /*
1573  uint16_t usType = mess.getGdpbSysPattType();
1574  uint16_t usIndex = mess.getGdpbSysPattIndex();
1575  uint32_t uPattern = mess.getGdpbSysPattPattern();
1576 
1577  switch( usType )
1578  {
1579  case gdpbv100::PATT_MISSMATCH:
1580  {
1581  LOG(debug) << Form( "Missmatch pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern );
1582  for( UInt_t uBit = 0; uBit < 32; ++uBit )
1583  if( ( uPattern >> uBit ) & 0x1 )
1584  {
1585  UInt_t uBadAsic = ConvertElinkToGet4( 32 * usIndex + uBit );
1587  if( 0x90 == fuCurrentMsSysId )
1588  uBadAsic = 32 * usIndex + uBit;
1589  } // if( ( uPattern >> uBit ) & 0x1 )
1590 
1591  break;
1592  } // case gdpbv100::PATT_MISSMATCH:
1593  case gdpbv100::PATT_ENABLE:
1594  {
1595  for( UInt_t uBit = 0; uBit < 32; ++uBit )
1596  if( ( uPattern >> uBit ) & 0x1 )
1597  {
1598  UInt_t uBadAsic = ConvertElinkToGet4( 32 * usIndex + uBit );
1600  if( 0x90 == fuCurrentMsSysId )
1601  uBadAsic = 32 * usIndex + uBit;
1602  } // if( ( uPattern >> uBit ) & 0x1 )
1603 
1604  break;
1605  } // case gdpbv100::PATT_ENABLE:
1606  case gdpbv100::PATT_RESYNC:
1607  {
1608  LOG(debug) << Form( "RESYNC pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern );
1609 
1610  for( UInt_t uBit = 0; uBit < 32; ++uBit )
1611  if( ( uPattern >> uBit ) & 0x1 )
1612  {
1613  UInt_t uBadAsic = ConvertElinkToGet4( 32 * usIndex + uBit );
1615  if( 0x90 == fuCurrentMsSysId )
1616  uBadAsic = 32 * usIndex + uBit;
1617  } // if( ( uPattern >> uBit ) & 0x1 )
1618 
1619  break;
1620  } // case gdpbv100::PATT_RESYNC:
1621  default:
1622  {
1623  LOG(debug) << "Crazy pattern message, subtype " << usType;
1624  break;
1625  } // default
1626  } // switch( usType )
1627 */
1628  return;
1629 }
1630 
1632  Int_t iMsgIndex = mess.getStarTrigMsgIndex();
1633 
1634  switch (iMsgIndex) {
1635  case 0: fvulGdpbTsMsb[fuGdpbNr] = mess.getGdpbTsMsbStarA(); break;
1636  case 1:
1639  break;
1640  case 2: fvulStarTsMid[fuGdpbNr] = mess.getStarTsMidStarC(); break;
1641  case 3: {
1642 
1643  ULong64_t ulNewGdpbTsFull =
1645  ULong64_t ulNewStarTsFull = (fvulStarTsMsb[fuGdpbNr] << 48)
1646  + (fvulStarTsMid[fuGdpbNr] << 8)
1647  + mess.getStarTsLsbStarD();
1648  UInt_t uNewToken = mess.getStarTokenStarD();
1649  UInt_t uNewDaqCmd = mess.getStarDaqCmdStarD();
1650  UInt_t uNewTrigCmd = mess.getStarTrigCmdStarD();
1651 
1652  if ((uNewToken == fvuStarTokenLast[fuGdpbNr])
1653  && (ulNewGdpbTsFull == fvulGdpbTsFullLast[fuGdpbNr])
1654  && (ulNewStarTsFull == fvulStarTsFullLast[fuGdpbNr])
1655  && (uNewDaqCmd == fvuStarDaqCmdLast[fuGdpbNr])
1656  && (uNewTrigCmd == fvuStarTrigCmdLast[fuGdpbNr])) {
1657  UInt_t uTrigWord = ((fvuStarTrigCmdLast[fuGdpbNr] & 0x00F) << 16)
1658  + ((fvuStarDaqCmdLast[fuGdpbNr] & 0x00F) << 12)
1659  + ((fvuStarTokenLast[fuGdpbNr] & 0xFFF));
1660  LOG(warning) << "Possible error: identical STAR tokens found twice in "
1661  "a row => ignore 2nd! "
1662  << " TS " << fulCurrentTsIndex << " gDBB #" << fuGdpbNr
1663  << " " << Form("token = %5u ", fvuStarTokenLast[fuGdpbNr])
1664  << Form("gDPB ts = %12llu ", fvulGdpbTsFullLast[fuGdpbNr])
1665  << Form("STAR ts = %12llu ", fvulStarTsFullLast[fuGdpbNr])
1666  << Form("DAQ cmd = %2u ", fvuStarDaqCmdLast[fuGdpbNr])
1667  << Form("TRG cmd = %2u ", fvuStarTrigCmdLast[fuGdpbNr])
1668  << Form("TRG Wrd = %5x ", uTrigWord);
1669  return;
1670  } // if exactly same message repeated
1671  /*
1672  if( (uNewToken != fuStarTokenLast[fuGdpbNr] + 1) &&
1673  0 < fvulGdpbTsFullLast[fuGdpbNr] && 0 < fvulStarTsFullLast[fuGdpbNr] &&
1674  ( 4095 != fvuStarTokenLast[fuGdpbNr] || 1 != uNewToken) )
1675  LOG(warning) << "Possible error: STAR token did not increase by exactly 1! "
1676  << " gDBB #" << fuGdpbNr << " "
1677  << Form("old = %5u vs new = %5u ", fvuStarTokenLast[fuGdpbNr], uNewToken)
1678  << Form("old = %12llu vs new = %12llu ", fvulGdpbTsFullLast[fuGdpbNr], ulNewGdpbTsFull)
1679  << Form("old = %12llu vs new = %12llu ", fvulStarTsFullLast[fuGdpbNr], ulNewStarTsFull)
1680  << Form("old = %2u vs new = %2u ", fvuStarDaqCmdLast[fuGdpbNr], uNewDaqCmd)
1681  << Form("old = %2u vs new = %2u ", fvuStarTrigCmdLast[fuGdpbNr], uNewTrigCmd);
1682 */
1683  // STAR TS counter reset detection
1684  if (ulNewStarTsFull < fvulStarTsFullLast[fuGdpbNr])
1685  LOG(debug) << "Probable reset of the STAR TS: old = "
1686  << Form("%16llu", fvulStarTsFullLast[fuGdpbNr])
1687  << " new = " << Form("%16llu", ulNewStarTsFull)
1688  << " Diff = -"
1689  << Form("%8llu",
1690  fvulStarTsFullLast[fuGdpbNr] - ulNewStarTsFull);
1691 
1692  /*
1693  LOG(info) << "Updating trigger token for " << fuGdpbNr
1694  << " " << fuStarTokenLast[fuGdpbNr] << " " << uNewToken;
1695 */
1696  // ULong64_t ulGdpbTsDiff = ulNewGdpbTsFull - fvulGdpbTsFullLast[fuGdpbNr];
1697  fvulGdpbTsFullLast[fuGdpbNr] = ulNewGdpbTsFull;
1698  fvulStarTsFullLast[fuGdpbNr] = ulNewStarTsFull;
1699  fvuStarTokenLast[fuGdpbNr] = uNewToken;
1700  fvuStarDaqCmdLast[fuGdpbNr] = uNewDaqCmd;
1701  fvuStarTrigCmdLast[fuGdpbNr] = uNewTrigCmd;
1702  /*
1704  if( fuCurrentMs < fuCoreMs )
1705  {
1707  if( 0 <= fdStartTime )
1708  {
1710  if( fuHistoryHistoSize < 1e-9 * (fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime) )
1711  {
1712  ResetEvolutionHistograms();
1713  fdStartTime = fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs;
1714  } // if( fuHistoryHistoSize < 1e-9 * (fulGdpbTsFullLast * gdpbv100::kdClockCycleSizeNs - fdStartTime) )
1715 
1716  fvhTriggerRate[fuGdpbNr]->Fill( 1e-9 * ( fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime ) );
1717  fvhStarTokenEvo[fuGdpbNr]->Fill( 1e-9 * ( fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime ),
1718  fvuStarTokenLast[fuGdpbNr] );
1719  fvhStarTrigGdpbTsEvo[fuGdpbNr]->Fill( 1e-9 * ( fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime ),
1720  fvulGdpbTsFullLast[fuGdpbNr] );
1721  fvhStarTrigStarTsEvo[fuGdpbNr]->Fill( 1e-9 * ( fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs - fdStartTime ),
1722  fvulStarTsFullLast[fuGdpbNr] );
1723  } // if( 0 < fdStartTime )
1724  else fdStartTime = fvulGdpbTsFullLast[fuGdpbNr] * gdpbv100::kdClockCycleSizeNs;
1725  fvhCmdDaqVsTrig[fuGdpbNr]->Fill( fvuStarDaqCmdLast[fuGdpbNr], fvuStarTrigCmdLast[fuGdpbNr] );
1726  } // if( fuCurrentMs < fuCoreMs )
1727 */
1728  break;
1729  } // case 3
1730  default: LOG(error) << "Unknown Star Trigger messageindex: " << iMsgIndex;
1731  } // switch( iMsgIndex )
1732 }
1733 
1735 
1737  // Printout some stats on what was unpacked
1738  TString message_type;
1739  for (unsigned int i = 0; i < fviMsgCounter.size(); ++i) {
1740  switch (i) {
1741  case 0: message_type = "NOP"; break;
1742  case 1: message_type = "HIT"; break;
1743  case 2: message_type = "EPOCH"; break;
1744  case 3: message_type = "SYNC"; break;
1745  case 4: message_type = "AUX"; break;
1746  case 5: message_type = "EPOCH2"; break;
1747  case 6: message_type = "GET4"; break;
1748  case 7: message_type = "SYS"; break;
1749  case 8: message_type = "GET4_SLC"; break;
1750  case 9: message_type = "GET4_32B"; break;
1751  case 10: message_type = "GET4_SYS"; break;
1752  default: message_type = "UNKNOWN"; break;
1753  } // switch(i)
1754  LOG(info) << message_type << " messages: " << fviMsgCounter[i];
1755  } // for (unsigned int i=0; i< fviMsgCounter.size(); ++i)
1756 
1757  /*
1758  LOG(info) << "-------------------------------------";
1759  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i)
1760  {
1761  for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j)
1762  {
1763  LOG(info) << "Last epoch for gDPB: " << std::hex << std::setw(4) << i
1764  << std::dec << " , GET4 " << std::setw(4) << j << " => "
1765  << fvulCurrentEpoch[GetArrayIndex(i, j)];
1766  } // for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j)
1767  } // for (UInt_t i = 0; i < fuNrOfGdpbs; ++i)
1768  LOG(info) << "-------------------------------------";
1769 */
1770 
1773  fhTimeMeanPulserFeeA->Reset();
1774  fhTimeRmsPulserFeeA->Reset();
1775 
1776  fhTimeMeanPulserFeeB->Reset();
1777  fhTimeRmsPulserFeeB->Reset();
1778 
1779  fhTimeMeanPulserFeeFee->Reset();
1780  fhTimeRmsPulserFeeFee->Reset();
1781 
1782  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1783  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++) {
1784  if (NULL != fvhTimeDiffPulserFeeA[uChanA][uChanB]) {
1785  fhTimeMeanPulserFeeA->Fill(
1786  uChanA, uChanB, fvhTimeDiffPulserFeeA[uChanA][uChanB]->GetMean());
1787  fhTimeRmsPulserFeeA->Fill(
1788  uChanA, uChanB, fvhTimeDiffPulserFeeA[uChanA][uChanB]->GetRMS());
1789  } // if( NULL != fvhTimeDiffPulserFeeA[ uChanA ][ uChanB ] )
1790 
1791  if (NULL != fvhTimeDiffPulserFeeB[uChanA][uChanB]) {
1792  fhTimeMeanPulserFeeB->Fill(
1793  uChanA, uChanB, fvhTimeDiffPulserFeeB[uChanA][uChanB]->GetMean());
1794  fhTimeRmsPulserFeeB->Fill(
1795  uChanA, uChanB, fvhTimeDiffPulserFeeB[uChanA][uChanB]->GetRMS());
1796  } // if( NULL != fvhTimeDiffPulserFeeB[ uChanA ][ uChanB ] )
1797 
1798  if (NULL != fvhTimeDiffPulserFeeFee[uChanA][uChanB]) {
1799  fhTimeMeanPulserFeeFee->Fill(
1800  uChanA, uChanB, fvhTimeDiffPulserFeeFee[uChanA][uChanB]->GetMean());
1801  fhTimeRmsPulserFeeFee->Fill(
1802  uChanA, uChanB, fvhTimeDiffPulserFeeFee[uChanA][uChanB]->GetRMS());
1803  } // if( NULL != fvhTimeDiffPulserFeeFee[ uChanA ][ uChanB ] )
1804  } // Loop on both channels
1805 
1814 
1816  // SaveAllHistos();
1817 }
1818 
1819 void CbmMcbm2018TofTestFee::SaveAllHistos(TString sFileName) {
1820  TDirectory* oldDir = NULL;
1821  TFile* histoFile = NULL;
1822  if ("" != sFileName) {
1823  // Store current directory position to allow restore later
1824  oldDir = gDirectory;
1825  // open separate histo file in recreate mode
1826  histoFile = new TFile(sFileName, "RECREATE");
1827  histoFile->cd();
1828  } // if( "" != sFileName )
1829 
1830  gDirectory->mkdir("TofDt");
1831  gDirectory->cd("TofDt");
1832  fhTimeMeanPulserFeeA->Write();
1833  fhTimeRmsPulserFeeA->Write();
1834  fhTimeRmsZoomFitPulsFeeA->Write();
1835  fhTimeResFitPulsFeeA->Write();
1836 
1837  fhTimeMeanPulserFeeB->Write();
1838  fhTimeRmsPulserFeeB->Write();
1839  fhTimeRmsZoomFitPulsFeeB->Write();
1840  fhTimeResFitPulsFeeB->Write();
1841 
1842  fhTimeMeanPulserFeeFee->Write();
1843  fhTimeRmsPulserFeeFee->Write();
1844  fhTimeRmsZoomFitPulsFeeFee->Write();
1845  fhTimeResFitPulsFeeFee->Write();
1846 
1847  gDirectory->cd("..");
1848 
1849 
1851  gDirectory->mkdir("TofDtFeeA");
1852  gDirectory->cd("TofDtFeeA");
1853  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1854  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
1855  if (NULL != fvhTimeDiffPulserFeeA[uChanA][uChanB])
1856  fvhTimeDiffPulserFeeA[uChanA][uChanB]->Write();
1857  gDirectory->cd("..");
1858 
1859  gDirectory->mkdir("TofDtFeeB");
1860  gDirectory->cd("TofDtFeeB");
1861  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1862  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
1863  if (NULL != fvhTimeDiffPulserFeeB[uChanA][uChanB])
1864  fvhTimeDiffPulserFeeB[uChanA][uChanB]->Write();
1865  gDirectory->cd("..");
1866 
1867  gDirectory->mkdir("TofDtFeeFee");
1868  gDirectory->cd("TofDtFeeFee");
1869  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1870  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
1871  if (NULL != fvhTimeDiffPulserFeeFee[uChanA][uChanB])
1872  fvhTimeDiffPulserFeeFee[uChanA][uChanB]->Write();
1873  gDirectory->cd("..");
1874 
1875  gDirectory->mkdir("TofPulse");
1876  gDirectory->cd("TofPulse");
1877  fhChanTotFeeA->Write();
1878  fhChanTotFeeB->Write();
1879  fhChanPulseIntervalFeeA->Write();
1880  fhChanPulseIntervalFeeB->Write();
1881  gDirectory->cd("..");
1882 
1883  gDirectory->mkdir("TofCnt");
1884  gDirectory->cd("TofCnt");
1885  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb)
1886  fvhPulserCountEvoPerFeeGdpb[uGdpb]->Write();
1887  gDirectory->cd("..");
1888 
1889  gDirectory->mkdir("Flib_Raw");
1890  gDirectory->cd("Flib_Raw");
1891  for (UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++) {
1892  if (NULL == fvhMsSzPerLink[uLinks]) continue;
1893 
1894  fvhMsSzPerLink[uLinks]->Write();
1895  fvhMsSzTimePerLink[uLinks]->Write();
1896  } // for( UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++ )
1897 
1898  TH1* pMissedTsH1 = dynamic_cast<TH1*>(gROOT->FindObjectAny("Missed_TS"));
1899  if (NULL != pMissedTsH1) pMissedTsH1->Write();
1900 
1901  TProfile* pMissedTsEvoP =
1902  dynamic_cast<TProfile*>(gROOT->FindObjectAny("Missed_TS_Evo"));
1903  if (NULL != pMissedTsEvoP) pMissedTsEvoP->Write();
1904 
1905  gDirectory->cd("..");
1906 
1907  fcPulserFeeA->Write();
1908  fcPulserFeeB->Write();
1909  fcPulserFeeFee->Write();
1910  fcPulseProp->Write();
1911 
1912 
1913  if ("" != sFileName) {
1914  // Restore original directory position
1915  histoFile->Close();
1916  oldDir->cd();
1917  } // if( "" != sFileName )
1918  if ("" != sFileName) {
1919  // Restore original directory position
1920  histoFile->Close();
1921  oldDir->cd();
1922  } // if( "" != sFileName )
1923 }
1924 
1926  LOG(info) << "Reseting all TOF histograms.";
1927 
1929  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1930  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
1931  if (NULL != fvhTimeDiffPulserFeeA[uChanA][uChanB])
1932  fvhTimeDiffPulserFeeA[uChanA][uChanB]->Reset();
1933 
1934  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1935  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
1936  if (NULL != fvhTimeDiffPulserFeeB[uChanA][uChanB])
1937  fvhTimeDiffPulserFeeB[uChanA][uChanB]->Reset();
1938 
1939  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1940  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
1941  if (NULL != fvhTimeDiffPulserFeeFee[uChanA][uChanB])
1942  fvhTimeDiffPulserFeeFee[uChanA][uChanB]->Reset();
1943 
1944  fhTimeMeanPulserFeeA->Reset();
1945  fhTimeRmsPulserFeeA->Reset();
1946  fhTimeRmsZoomFitPulsFeeA->Reset();
1947  fhTimeResFitPulsFeeA->Reset();
1948 
1949  fhTimeMeanPulserFeeB->Reset();
1950  fhTimeRmsPulserFeeB->Reset();
1951  fhTimeRmsZoomFitPulsFeeB->Reset();
1952  fhTimeResFitPulsFeeB->Reset();
1953 
1954  fhTimeMeanPulserFeeFee->Reset();
1955  fhTimeRmsPulserFeeFee->Reset();
1956  fhTimeRmsZoomFitPulsFeeFee->Reset();
1957  fhTimeResFitPulsFeeFee->Reset();
1958 
1959  fhChanTotFeeA->Reset();
1960  fhChanTotFeeB->Reset();
1961  fhChanPulseIntervalFeeA->Reset();
1962  fhChanPulseIntervalFeeB->Reset();
1963 
1964  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb)
1966 
1967  for (UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++) {
1968  if (NULL == fvhMsSzPerLink[uLinks]) continue;
1969 
1970  fvhMsSzPerLink[uLinks]->Reset();
1971  fvhMsSzTimePerLink[uLinks]->Reset();
1972  } // for( UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++ )
1973 
1974  fdStartTime = -1;
1975  fdStartTimeMsSz = -1;
1976 }
1978 
1980  std::vector<std::vector<TH1*>> phTimeDiff,
1981  TH2* phTimeRmsZoom,
1982  TH2* phTimeResFit) {
1983  // Only do something if the user defined the width he wants for the zoom
1984  if (0.0 < fdFitZoomWidthPs) {
1985  // Reset summary histograms for safety
1986  phTimeRmsZoom->Reset();
1987  phTimeResFit->Reset();
1988 
1989  Double_t dRes = 0;
1990  TF1* fitFuncPairs[fuNrOfChannelsPerFee][fuNrOfChannelsPerFee];
1991 
1992  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerFee; uChanA++)
1993  for (UInt_t uChanB = 0; uChanB < fuNrOfChannelsPerFee; uChanB++)
1994  if (NULL != phTimeDiff[uChanA][uChanB]) {
1995  // Check that we have at least 1 entry
1996  if (0 == phTimeDiff[uChanA][uChanB]->GetEntries()) {
1997  phTimeRmsZoom->Fill(uChanA, uChanB, 0.0);
1998  phTimeResFit->Fill(uChanA, uChanB, 0.0);
1999  LOG(debug)
2000  << "CbmMcbm2018TofTestFee::UpdateZoomedFit => Empty input "
2001  << "for Chan pair " << uChanA << " and " << uChanB << " !!! ";
2002  continue;
2003  } // if( 0 == phTimeDiff[ uChanA ][ uChanB ]->GetEntries() )
2004 
2005  // Read the peak position (bin with max counts) + total nb of entries
2006  Int_t iBinWithMax = phTimeDiff[uChanA][uChanB]->GetMaximumBin();
2007  Double_t dNbCounts = phTimeDiff[uChanA][uChanB]->Integral();
2008 
2009  // Zoom the X axis to +/- ZoomWidth around the peak position
2010  Double_t dPeakPos =
2011  phTimeDiff[uChanA][uChanB]->GetXaxis()->GetBinCenter(iBinWithMax);
2012  phTimeDiff[uChanA][uChanB]->GetXaxis()->SetRangeUser(
2013  dPeakPos - fdFitZoomWidthPs, dPeakPos + fdFitZoomWidthPs);
2014 
2015  // Read integral and check how much we lost due to the zoom (% loss allowed)
2016  Double_t dZoomCounts = phTimeDiff[uChanA][uChanB]->Integral();
2017  if ((dZoomCounts / dNbCounts) < 0.99) {
2018  phTimeRmsZoom->Fill(uChanA, uChanB, 0.0);
2019  phTimeResFit->Fill(uChanA, uChanB, 0.0);
2020  LOG(warning)
2021  << "CbmMcbm2018TofTestFee::UpdateZoomedFit => Zoom too strong, "
2022  << "more than 1% loss for Chan pair " << uChanA << " and "
2023  << uChanB << " !!! ";
2024  continue;
2025  } // if( ( dZoomCounts / dNbCounts ) < 0.99 )
2026 
2027  // Fill new RMS after zoom into summary histo
2028  phTimeRmsZoom->Fill(
2029  uChanA, uChanB, phTimeDiff[uChanA][uChanB]->GetRMS());
2030 
2031 
2032  // Fit using zoomed boundaries + starting gaussian width, store into summary histo
2033  dRes = 0;
2034  fitFuncPairs[uChanA][uChanB] =
2035  new TF1(Form("fPair_%02d_%02d", uChanA, uChanB),
2036  "gaus",
2037  dPeakPos - fdFitZoomWidthPs,
2038  dPeakPos + fdFitZoomWidthPs);
2039  // Fix the Mean fit value around the Histogram Mean
2040  fitFuncPairs[uChanA][uChanB]->SetParameter(0, dZoomCounts);
2041  fitFuncPairs[uChanA][uChanB]->SetParameter(1, dPeakPos);
2042  fitFuncPairs[uChanA][uChanB]->SetParameter(
2043  2, 200.0); // Hardcode start with ~4*BinWidth, do better later
2044  // Using integral instead of bin center seems to lead to unrealistic values => no "I"
2045  phTimeDiff[uChanA][uChanB]->Fit(
2046  Form("fPair_%02d_%02d", uChanA, uChanB), "QRM0");
2047  // Get Sigma
2048  dRes = fitFuncPairs[uChanA][uChanB]->GetParameter(2);
2049  // Cleanup memory
2050  delete fitFuncPairs[uChanA][uChanB];
2051  // Fill summary
2052  phTimeResFit->Fill(uChanA, uChanB, dRes / TMath::Sqrt2());
2053 
2054 
2055  LOG(debug) << "CbmMcbm2018TofTestFee::UpdateZoomedFit => "
2056  << "For chan pair " << uChanA << " and " << uChanB
2057  << " we have zoomed RMS = "
2058  << phTimeDiff[uChanA][uChanB]->GetRMS()
2059  << " and a resolution of " << dRes / TMath::Sqrt2();
2060 
2061  // Restore original axis state?
2062  phTimeDiff[uChanA][uChanB]->GetXaxis()->UnZoom();
2063  } // loop on chanA and chanB + check if corresponding fvhTimeDiffPulser exists
2064  } // if( 0.0 < fdFitZoomWidthPs )
2065  else {
2066  LOG(error)
2067  << "CbmMcbm2018TofTestFee::UpdateZoomedFit => Zoom width not defined, "
2068  << "please use SetFitZoomWidthPs, e.g. in macro, before trying this "
2069  "update !!!";
2070  } // else of if( 0.0 < fdFitZoomWidthPs )
2071 }
2072 
gdpbv100::Message::getStarTrigCmdStarD
uint32_t getStarTrigCmdStarD() const
Definition: gDpbMessv100.h:278
CbmMcbm2018TofTestFee::fuNrOfGdpbs
UInt_t fuNrOfGdpbs
Definition: CbmMcbm2018TofTestFee.h:123
CbmMcbm2018TofTestFee::GetArrayIndex
Int_t GetArrayIndex(Int_t gdpbId, Int_t get4Id)
Definition: CbmMcbm2018TofTestFee.h:285
gdpbv100::MSG_STAR_TRI_A
@ MSG_STAR_TRI_A
Definition: gDpbMessv100.h:63
CbmMcbm2018TofTestFee::CbmMcbm2018TofTestFee
CbmMcbm2018TofTestFee()
Definition: CbmMcbm2018TofTestFee.cxx:53
gdpbv100::Message
Definition: gDpbMessv100.h:133
CbmMcbm2018TofTestFee::CreateHistograms
void CreateHistograms()
Definition: CbmMcbm2018TofTestFee.cxx:420
CbmMcbm2018TofTestFee::fdStartTime
Double_t fdStartTime
Definition: CbmMcbm2018TofTestFee.h:211
CbmMcbm2018TofTestFee::fvhTimeDiffPulserFeeB
std::vector< std::vector< TH1 * > > fvhTimeDiffPulserFeeB
Definition: CbmMcbm2018TofTestFee.h:247
CbmMcbm2018TofTestFee::fuTotalMsNb
size_t fuTotalMsNb
Definition: CbmMcbm2018TofTestFee.h:112
gdpbv100::kuTotCounterSize
const uint32_t kuTotCounterSize
Definition: gDpbMessv100.h:24
CbmMcbm2018TofTestFee::FillPattInfo
void FillPattInfo(gdpbv100::Message)
Definition: CbmMcbm2018TofTestFee.cxx:1571
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
gdpbv100::FormatHexPrintout
std::string FormatHexPrintout(uint64_t ulVal, char cFill=0, uint uWidth=0, bool bUppercase=false)
Definition: gDpbMessv100.cxx:30
CbmMcbm2018TofTestFee::fhTimeResFitPulsFeeFee
TH2 * fhTimeResFitPulsFeeFee
Definition: CbmMcbm2018TofTestFee.h:258
CbmFormatDecHexPrintout.h
CbmMcbm2018TofTestFee::SetNbMsInTs
virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
Definition: CbmMcbm2018TofTestFee.cxx:413
gdpbv100::Message::getGdpbTsMsbStarA
uint64_t getGdpbTsMsbStarA() const
Definition: gDpbMessv100.h:266
CbmMcbm2018TofTestFee::SetParContainers
void SetParContainers()
Definition: CbmMcbm2018TofTestFee.cxx:176
gdpbv100::Message::getGdpbEpEpochNb
uint32_t getGdpbEpEpochNb() const
Definition: gDpbMessv100.h:231
CbmMcbm2018TofTestFee::FillStarTrigInfo
void FillStarTrigInfo(gdpbv100::Message)
Definition: CbmMcbm2018TofTestFee.cxx:1631
CbmMcbm2018TofTestFee::fhChanTotFeeA
TH2 * fhChanTotFeeA
Definition: CbmMcbm2018TofTestFee.h:260
bMcbmTofTestFeeResetHistos
Bool_t bMcbmTofTestFeeResetHistos
Definition: CbmMcbm2018TofTestFee.cxx:46
gdpbv100::GET4_V2X_ERR_TOT_OVERWRT
@ GET4_V2X_ERR_TOT_OVERWRT
Definition: gDpbMessv100.h:121
CbmMcbm2018TofTestFee::fcPulserFeeB
TCanvas * fcPulserFeeB
Definition: CbmMcbm2018TofTestFee.h:270
CbmMcbm2018TofTestFee::ConvertElinkToGet4
UInt_t ConvertElinkToGet4(UInt_t uElinkIdx)
Definition: CbmMcbm2018TofTestFee.h:297
CbmMcbm2018TofTestFee::fvulCurrentEpoch
std::vector< ULong64_t > fvulCurrentEpoch
Definition: CbmMcbm2018TofTestFee.h:181
CbmMcbm2018TofTestFee::fdStartTimeMsSz
Double_t fdStartTimeMsSz
Definition: CbmMcbm2018TofTestFee.h:215
CbmMcbm2018TofTestFee::fhTimeRmsPulserFeeFee
TH2 * fhTimeRmsPulserFeeFee
Definition: CbmMcbm2018TofTestFee.h:256
CbmMcbm2018TofTestFee::fviRpcSide
std::vector< Int_t > fviRpcSide
Definition: CbmMcbm2018TofTestFee.h:137
CbmMcbm2018TofPar::GetNbMsTot
Int_t GetNbMsTot()
Definition: CbmMcbm2018TofPar.h:79
CbmMcbm2018TofPar::GetGdpbId
Int_t GetGdpbId(Int_t i)
Definition: CbmMcbm2018TofPar.h:67
CbmMcbm2018TofTestFee::fhTimeRmsPulserFeeA
TH2 * fhTimeRmsPulserFeeA
Definition: CbmMcbm2018TofTestFee.h:243
CbmMcbm2018TofTestFee::PrintGenInfo
void PrintGenInfo(gdpbv100::Message)
Definition: CbmMcbm2018TofTestFee.cxx:1494
CbmMcbm2018TofTestFee::fhTimeResFitPulsFeeB
TH2 * fhTimeResFitPulsFeeB
Definition: CbmMcbm2018TofTestFee.h:251
CbmMcbm2018TofTestFee::Reset
virtual void Reset()
Definition: CbmMcbm2018TofTestFee.cxx:1734
gdpbv100::Message::getGdpbEpSync
bool getGdpbEpSync() const
Definition: gDpbMessv100.h:232
CbmMcbm2018TofTestFee::fuGdpbNr
UInt_t fuGdpbNr
Definition: CbmMcbm2018TofTestFee.h:156
CbmMcbm2018TofTestFee::fuMsAcceptsPercent
size_t fuMsAcceptsPercent
OLD, to be cleaned out !!!!!
Definition: CbmMcbm2018TofTestFee.h:111
CbmMcbm2018TofPar.h
bMcbmTofTestFeeUpdateZoomedFit
Bool_t bMcbmTofTestFeeUpdateZoomedFit
Definition: CbmMcbm2018TofTestFee.cxx:48
bMcbmTofTestFeeRawDataPrint
Bool_t bMcbmTofTestFeeRawDataPrint
Definition: CbmMcbm2018TofTestFee.cxx:49
gdpbv100::SYS_GET4_ERROR
@ SYS_GET4_ERROR
Definition: gDpbMessv100.h:70
CbmMcbm2018TofTestFee::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmMcbm2018TofTestFee.cxx:204
gdpbv100::MSG_HIT
@ MSG_HIT
Definition: gDpbMessv100.h:59
CbmMcbm2018TofTestFee::DoUnpack
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
Definition: CbmMcbm2018TofTestFee.cxx:930
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMcbm2018TofTestFee::fuCurrentMs
size_t fuCurrentMs
Definition: CbmMcbm2018TofTestFee.h:151
gdpbv100::MSG_SLOWC
@ MSG_SLOWC
Definition: gDpbMessv100.h:61
gdpbv100::Message::setGdpbGenChipId
void setGdpbGenChipId(uint32_t v)
Definition: gDpbMessv100.h:215
CbmMcbm2018TofTestFee::fbIgnoreOverlapMs
Bool_t fbIgnoreOverlapMs
Definition: CbmMcbm2018TofTestFee.h:104
CbmMcbm2018TofTestFee::fuFeeB
UInt_t fuFeeB
Definition: CbmMcbm2018TofTestFee.h:238
CbmMcbm2018TofTestFee::fuNrOfChannelsPerFee
UInt_t fuNrOfChannelsPerFee
Definition: CbmMcbm2018TofTestFee.h:128
CbmMcbm2018TofTestFee::fuNrOfGbtx
UInt_t fuNrOfGbtx
Definition: CbmMcbm2018TofTestFee.h:133
CbmMcbm2018TofTestFee::fvulCurrentEpochFull
std::vector< ULong64_t > fvulCurrentEpochFull
Epoch cycle from the Ms Start message and Epoch counter flip.
Definition: CbmMcbm2018TofTestFee.h:185
GetRMS
static Double_t GetRMS(const char *name)
Definition: GenNoiseElectrons.cxx:34
CbmMcbm2018TofTestFee::fvulCurrentEpochCycle
std::vector< ULong64_t > fvulCurrentEpochCycle
Definition: CbmMcbm2018TofTestFee.h:184
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
CbmMcbm2018TofTestFee::fhTimeRmsZoomFitPulsFeeB
TH2 * fhTimeRmsZoomFitPulsFeeB
Definition: CbmMcbm2018TofTestFee.h:250
CbmMcbm2018TofTestFee::fuNrOfGet4PerFee
UInt_t fuNrOfGet4PerFee
Definition: CbmMcbm2018TofTestFee.h:125
CbmMcbm2018TofTestFee::fvuElinkToGet4
std::vector< UInt_t > fvuElinkToGet4
5 FEE with 8 GET4 each
Definition: CbmMcbm2018TofTestFee.h:295
gdpbv100::Message::getGdpbSysSubType
uint16_t getGdpbSysSubType() const
Definition: gDpbMessv100.h:245
CbmMcbm2018TofTestFee::fhChanPulseIntervalFeeB
TH2 * fhChanPulseIntervalFeeB
Definition: CbmMcbm2018TofTestFee.h:264
CbmMcbm2018TofTestFee::fvulStarTsMid
std::vector< ULong64_t > fvulStarTsMid
Definition: CbmMcbm2018TofTestFee.h:168
CbmMcbm2018TofTestFee::UpdateZoomedFit
void UpdateZoomedFit(std::vector< std::vector< TH1 * >> phTimeDiff, TH2 *phTimeRmsZoom, TH2 *phTimeResFit)
Definition: CbmMcbm2018TofTestFee.cxx:1979
gdpbv100::Message::setGdpbEpEpochNb
void setGdpbEpEpochNb(uint32_t v)
Definition: gDpbMessv100.h:283
CbmMcbm2018TofTestFee::fdFitZoomWidthPs
Double_t fdFitZoomWidthPs
Definition: CbmMcbm2018TofTestFee.h:221
CbmMcbm2018TofPar::GetNrOfFeePerGbtx
static constexpr UInt_t GetNrOfFeePerGbtx()
Definition: CbmMcbm2018TofPar.h:49
CbmMcbm2018TofTestFee::fuGlobalIdxFeeA
UInt_t fuGlobalIdxFeeA
Definition: CbmMcbm2018TofTestFee.h:235
CbmMcbm2018TofTestFee::fvulGdpbTsFullLast
std::vector< ULong64_t > fvulGdpbTsFullLast
Definition: CbmMcbm2018TofTestFee.h:169
CbmMcbm2018TofTestFee::fvulGdpbTsLsb
std::vector< ULong64_t > fvulGdpbTsLsb
Definition: CbmMcbm2018TofTestFee.h:166
CbmMcbm2018TofTestFee.h
CbmMcbm2018TofPar::GetNrOfGbtx
Int_t GetNrOfGbtx()
Definition: CbmMcbm2018TofPar.h:72
gdpbv100::kuEpochCounterSz
const uint32_t kuEpochCounterSz
Definition: gDpbMessv100.h:40
CbmMcbm2018TofTestFee::fuMinNbGdpb
UInt_t fuMinNbGdpb
Definition: CbmMcbm2018TofTestFee.h:118
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
CbmMcbm2018TofTestFee::fcPulserFeeFee
TCanvas * fcPulserFeeFee
Definition: CbmMcbm2018TofTestFee.h:271
CbmMcbm2018TofPar::GetNbMsOverlap
Int_t GetNbMsOverlap()
Definition: CbmMcbm2018TofPar.h:80
CbmMcbm2018TofTestFee::fuHistoryHistoSize
UInt_t fuHistoryHistoSize
Definition: CbmMcbm2018TofTestFee.h:216
CbmMcbm2018TofTestFee::dMaxDt
Double_t dMaxDt
Definition: CbmMcbm2018TofTestFee.h:205
gdpbv100::Message::getGdpbSysErrData
uint16_t getGdpbSysErrData() const
Definition: gDpbMessv100.h:253
CbmMcbm2018TofTestFee::fvuGet4ToElink
std::vector< UInt_t > fvuGet4ToElink
Definition: CbmMcbm2018TofTestFee.h:296
CbmHistManager.h
Histogram manager.
CbmMcbm2018TofTestFee::fvbFirstEpochSeen
std::vector< Bool_t > fvbFirstEpochSeen
Definition: CbmMcbm2018TofTestFee.h:182
CbmMcbm2018TofTestFee::InitContainers
Bool_t InitContainers()
Definition: CbmMcbm2018TofTestFee.cxx:183
CbmMcbm2018TofTestFee::fuGet4Nr
UInt_t fuGet4Nr
Definition: CbmMcbm2018TofTestFee.h:160
CbmMcbm2018TofTestFee::fuNrOfFeePerGdpb
UInt_t fuNrOfFeePerGdpb
Definition: CbmMcbm2018TofTestFee.h:124
gdpbv100::Message::getGdpbEpLinkId
bool getGdpbEpLinkId() const
Definition: gDpbMessv100.h:230
CbmMcbm2018TofTestFee::fvhPulserCountEvoPerFeeGdpb
std::vector< TH2 * > fvhPulserCountEvoPerFeeGdpb
Definition: CbmMcbm2018TofTestFee.h:266
bMcbmTofTestFeePrintAllEpochsEna
Bool_t bMcbmTofTestFeePrintAllEpochsEna
Definition: CbmMcbm2018TofTestFee.cxx:51
CbmMcbm2018TofTestFee::fvuFeeChanNbHitsLastMs
std::vector< std::vector< UInt_t > > fvuFeeChanNbHitsLastMs
Buffer for pulser channels.
Definition: CbmMcbm2018TofTestFee.h:197
CbmMcbm2018TofTestFee::fuRawDataPrintMsgNb
UInt_t fuRawDataPrintMsgNb
Definition: CbmMcbm2018TofTestFee.h:144
CbmMcbm2018TofTestFee::fhChanTotFeeB
TH2 * fhChanTotFeeB
Definition: CbmMcbm2018TofTestFee.h:261
CbmMcbm2018TofTestFee::dMinDt
Double_t dMinDt
Definition: CbmMcbm2018TofTestFee.h:204
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
CbmMcbm2018TofTestFee::fuGdpbA
UInt_t fuGdpbA
Definition: CbmMcbm2018TofTestFee.h:232
CbmMcbm2018TofTestFee::fhTimeRmsZoomFitPulsFeeFee
TH2 * fhTimeRmsZoomFitPulsFeeFee
Definition: CbmMcbm2018TofTestFee.h:257
gdpbv100::MSG_STAR_TRI_C
@ MSG_STAR_TRI_C
Definition: gDpbMessv100.h:65
CbmMcbm2018TofTestFee::fuGdpbId
UInt_t fuGdpbId
Definition: CbmMcbm2018TofTestFee.h:154
gdpbv100::Message::getGdpbSysFwErrResync
uint32_t getGdpbSysFwErrResync() const
Definition: gDpbMessv100.h:257
CbmMcbm2018TofTestFee::fuFeeA
UInt_t fuFeeA
Definition: CbmMcbm2018TofTestFee.h:234
h
Data class with information on a STS local track.
CbmMcbm2018TofTestFee::fviModuleId
std::vector< Int_t > fviModuleId
Definition: CbmMcbm2018TofTestFee.h:138
gdpbv100::Message::getData
uint64_t getData() const
Definition: gDpbMessv100.h:156
CbmMcbm2018TofTestFee::fvMsComponentsList
std::vector< size_t > fvMsComponentsList
FLES containers.
Definition: CbmMcbm2018TofTestFee.h:96
CbmMcbm2018TofTestFee
Definition: CbmMcbm2018TofTestFee.h:33
CbmMcbm2018TofTestFee::fviRpcType
std::vector< Int_t > fviRpcType
Definition: CbmMcbm2018TofTestFee.h:136
CbmMcbm2018TofTestFee::ProcessEpochCycle
void ProcessEpochCycle(uint64_t ulCycleData)
Definition: CbmMcbm2018TofTestFee.cxx:1325
CbmMcbm2018TofTestFee::fhTimeMeanPulserFeeFee
TH2 * fhTimeMeanPulserFeeFee
[ Ch FEE A ][ Ch FEE B ]
Definition: CbmMcbm2018TofTestFee.h:255
CbmMcbm2018TofPar::GetNrOfRpc
Int_t GetNrOfRpc(Int_t i)
Definition: CbmMcbm2018TofPar.h:74
CbmMcbm2018TofTestFee::fvuGet4ToPadi
std::vector< UInt_t > fvuGet4ToPadi
Definition: CbmMcbm2018TofTestFee.h:291
CbmMcbm2018TofTestFee::fhTimeMeanPulserFeeA
TH2 * fhTimeMeanPulserFeeA
[ Ch A ][ Ch B ]
Definition: CbmMcbm2018TofTestFee.h:242
CbmMcbm2018TofPar::GetNrOfModules
Int_t GetNrOfModules()
Definition: CbmMcbm2018TofPar.h:73
gdpbv100::GET4_V2X_ERR_SEQUENCE_ER
@ GET4_V2X_ERR_SEQUENCE_ER
Definition: gDpbMessv100.h:127
CbmMcbm2018TofTestFee::fuOverlapMsNb
size_t fuOverlapMsNb
Definition: CbmMcbm2018TofTestFee.h:114
gdpbv100::Message::getGdpbTsLsbStarB
uint64_t getGdpbTsLsbStarB() const
Definition: gDpbMessv100.h:268
CbmMcbm2018TofTestFee::fhChanPulseIntervalFeeA
TH2 * fhChanPulseIntervalFeeA
Definition: CbmMcbm2018TofTestFee.h:263
gdpbv100::Message::getStarTrigMsgIndex
uint16_t getStarTrigMsgIndex() const
Definition: gDpbMessv100.h:264
CbmMcbm2018TofTestFee::fuGbtxB
UInt_t fuGbtxB
Definition: CbmMcbm2018TofTestFee.h:237
CbmMcbm2018TofTestFee::fdTsCoreSizeInNs
Double_t fdTsCoreSizeInNs
Definition: CbmMcbm2018TofTestFee.h:117
CbmMcbm2018TofTestFee::fuGbtxA
UInt_t fuGbtxA
Definition: CbmMcbm2018TofTestFee.h:233
CbmMcbm2018TofTestFee::fuNrOfGet4PerGdpb
UInt_t fuNrOfGet4PerGdpb
Definition: CbmMcbm2018TofTestFee.h:130
gdpbv100::kuChipIdMergedEpoch
const uint32_t kuChipIdMergedEpoch
Definition: gDpbMessv100.h:51
CbmMcbm2018TofTestFee::fuRawDataPrintMsgIdx
UInt_t fuRawDataPrintMsgIdx
Definition: CbmMcbm2018TofTestFee.h:145
CbmMcbm2018TofTestFee::fvulStarTsFullLast
std::vector< ULong64_t > fvulStarTsFullLast
Definition: CbmMcbm2018TofTestFee.h:170
gdpbv100::GET4_V2X_ERR_ADD_RIS_EDG
@ GET4_V2X_ERR_ADD_RIS_EDG
Definition: gDpbMessv100.h:125
CbmMcbm2018TofTestFee::fuNrOfChannelsPerGdpb
UInt_t fuNrOfChannelsPerGdpb
Definition: CbmMcbm2018TofTestFee.h:131
gdpbv100::Message::getGdpbHitFineTs
uint16_t getGdpbHitFineTs() const
Definition: gDpbMessv100.h:222
CbmMcbm2018TofTestFee::fuGet4Id
UInt_t fuGet4Id
Definition: CbmMcbm2018TofTestFee.h:158
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmMcbm2018TofTestFee::fiEquipmentId
Int_t fiEquipmentId
Definition: CbmMcbm2018TofTestFee.h:161
CbmMcbm2018TofTestFee::fdMsIndex
Double_t fdMsIndex
Definition: CbmMcbm2018TofTestFee.h:153
CbmMcbm2018TofTestFee::fhTimeRmsZoomFitPulsFeeA
TH2 * fhTimeRmsZoomFitPulsFeeA
Definition: CbmMcbm2018TofTestFee.h:244
gdpbv100::MSG_SYST
@ MSG_SYST
Definition: gDpbMessv100.h:62
CbmMcbm2018TofPar::GetModuleId
Int_t GetModuleId(Int_t i)
Definition: CbmMcbm2018TofPar.h:77
CbmMcbm2018TofTestFee::Finish
virtual void Finish()
Definition: CbmMcbm2018TofTestFee.cxx:1736
CbmMcbm2018TofTestFee::fhTimeResFitPulsFeeA
TH2 * fhTimeResFitPulsFeeA
Definition: CbmMcbm2018TofTestFee.h:245
CbmMcbm2018TofTestFee::fuGdpbB
UInt_t fuGdpbB
Definition: CbmMcbm2018TofTestFee.h:236
CbmMcbm2018TofTestFee::fbPrintAllEpochsEnable
Bool_t fbPrintAllEpochsEnable
Definition: CbmMcbm2018TofTestFee.h:147
CbmMcbm2018TofTestFee::fcPulseProp
TCanvas * fcPulseProp
Definition: CbmMcbm2018TofTestFee.h:272
gdpbv100::Message::getStarTsMidStarC
uint64_t getStarTsMidStarC() const
Definition: gDpbMessv100.h:271
CbmMcbm2018TofTestFee::fuNbFeePlotsPerGdpb
UInt_t fuNbFeePlotsPerGdpb
Definition: CbmMcbm2018TofTestFee.h:208
CbmMcbm2018TofTestFee::kdMaxDtPulserPs
const Double_t kdMaxDtPulserPs
Definition: CbmMcbm2018TofTestFee.h:230
CbmMcbm2018TofTestFee::fviMsgCounter
std::vector< int > fviMsgCounter
Definition: CbmMcbm2018TofTestFee.h:162
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
CbmMcbm2018TofTestFee::fviNrOfRpc
std::vector< Int_t > fviNrOfRpc
Definition: CbmMcbm2018TofTestFee.h:135
FormatDecPrintout
std::string FormatDecPrintout(uint64_t ulVal, char cFill, uint uWidth)
Definition: CbmFormatDecHexPrintout.cxx:4
gdpbv100::kdBinSize
const double kdBinSize
Definition: gDpbMessv100.h:30
CbmMcbm2018TofTestFee::fdStartTimeLong
Double_t fdStartTimeLong
Definition: CbmMcbm2018TofTestFee.h:213
CbmMcbm2018TofTestFee::fuNbOverMsPerTs
size_t fuNbOverMsPerTs
Definition: CbmMcbm2018TofTestFee.h:102
CbmMcbm2018TofTestFee::fvuStarDaqCmdLast
std::vector< UInt_t > fvuStarDaqCmdLast
Definition: CbmMcbm2018TofTestFee.h:172
bMcbmTofTestFeeSaveHistos
Bool_t bMcbmTofTestFeeSaveHistos
Definition: CbmMcbm2018TofTestFee.cxx:47
CbmMcbm2018TofTestFee::fvulStarTsMsb
std::vector< ULong64_t > fvulStarTsMsb
Definition: CbmMcbm2018TofTestFee.h:167
CbmMcbm2018TofTestFee::fvulGdpbTsMsb
std::vector< ULong64_t > fvulGdpbTsMsb
Definition: CbmMcbm2018TofTestFee.h:165
GenerateLogBinArray
std::vector< double > GenerateLogBinArray(uint32_t uNbDecadesLog, uint32_t uNbStepsDecade, uint32_t uNbSubStepsInStep, uint32_t &uNbBinsLog)
Definition: CbmFlesHistosTools.cxx:6
CbmMcbm2018TofTestFee::fcMsSizeAll
TCanvas * fcMsSizeAll
Definition: CbmMcbm2018TofTestFee.h:223
CbmMcbm2018TofPar
Definition: CbmMcbm2018TofPar.h:18
CbmMcbm2018TofTestFee::fulCurrentEpochTime
ULong64_t fulCurrentEpochTime
Epoch + Epoch Cycle.
Definition: CbmMcbm2018TofTestFee.h:187
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
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
CbmMcbm2018TofTestFee::fGdpbIdIndexMap
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
Map of ID to index for the gDPBs.
Definition: CbmMcbm2018TofTestFee.h:190
CbmMcbm2018TofTestFee::fvhTimeDiffPulserFeeFee
std::vector< std::vector< TH1 * > > fvhTimeDiffPulserFeeFee
Definition: CbmMcbm2018TofTestFee.h:254
CbmMcbm2018TofTestFee::ResetAllHistos
void ResetAllHistos()
Definition: CbmMcbm2018TofTestFee.cxx:1925
CbmMcbm2018TofTestFee::SaveAllHistos
void SaveAllHistos(TString sFileName="")
Definition: CbmMcbm2018TofTestFee.cxx:1819
gdpbv100::kulEpochCycleFieldSz
const uint64_t kulEpochCycleFieldSz
Definition: gDpbMessv100.h:49
CbmMcbm2018TofTestFee::FillEpochInfo
void FillEpochInfo(gdpbv100::Message)
Definition: CbmMcbm2018TofTestFee.cxx:1438
gdpbv100::Message::getGdpbHitIs24b
uint16_t getGdpbHitIs24b() const
Definition: gDpbMessv100.h:218
gdpbv100::Message::getGdpbEpEpochLoss
bool getGdpbEpEpochLoss() const
Definition: gDpbMessv100.h:234
gdpbv100::Message::getGdpbGenChipId
uint16_t getGdpbGenChipId() const
Definition: gDpbMessv100.h:214
CbmMcbm2018TofTestFee::fuNrOfGet4
UInt_t fuNrOfGet4
Definition: CbmMcbm2018TofTestFee.h:129
CbmMcbm2018TofTestFee::fhTimeMeanPulserFeeB
TH2 * fhTimeMeanPulserFeeB
[ Ch A ][ Ch B ]
Definition: CbmMcbm2018TofTestFee.h:248
CbmMcbm2018TofTestFee::ResetEvolutionHistograms
void ResetEvolutionHistograms()
Definition: CbmMcbm2018TofTestFee.cxx:1977
CbmMcbm2018TofTestFee::fvhMsSzTimePerLink
std::vector< TProfile * > fvhMsSzTimePerLink
Definition: CbmMcbm2018TofTestFee.h:225
CbmFlesHistosTools.h
CbmMcbm2018TofTestFee::PrintSysInfo
void PrintSysInfo(gdpbv100::Message)
Definition: CbmMcbm2018TofTestFee.cxx:1504
CbmMcbm2018TofTestFee::fuNrOfChannelsPerGet4
UInt_t fuNrOfChannelsPerGet4
Definition: CbmMcbm2018TofTestFee.h:126
CbmMcbm2018TofTestFee::fbPrintAllHitsEnable
Bool_t fbPrintAllHitsEnable
Definition: CbmMcbm2018TofTestFee.h:146
gdpbv100::Message::getGdpbEpDataLoss
bool getGdpbEpDataLoss() const
Definition: gDpbMessv100.h:233
gdpbv100::MSG_STAR_TRI_B
@ MSG_STAR_TRI_B
Definition: gDpbMessv100.h:64
CbmMcbm2018TofTestFee::fdMsSizeInNs
Double_t fdMsSizeInNs
Definition: CbmMcbm2018TofTestFee.h:116
CbmMcbm2018TofTestFee::fuCurrentMsSysId
size_t fuCurrentMsSysId
Definition: CbmMcbm2018TofTestFee.h:152
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
CbmMcbm2018TofTestFee::fvhMsSzPerLink
std::vector< TH1 * > fvhMsSzPerLink
Definition: CbmMcbm2018TofTestFee.h:224
bMcbmTofTestFeePrintAllHitsEna
Bool_t bMcbmTofTestFeePrintAllHitsEna
Definition: CbmMcbm2018TofTestFee.cxx:50
CbmMcbm2018TofTestFee::fvuStarTokenLast
std::vector< UInt_t > fvuStarTokenLast
Definition: CbmMcbm2018TofTestFee.h:171
gdpbv100::Message::getGdpbHitFullTs
uint32_t getGdpbHitFullTs() const
Definition: gDpbMessv100.h:220
CbmMcbm2018TofPar::GetRpcSide
Int_t GetRpcSide(Int_t i)
Definition: CbmMcbm2018TofPar.h:76
gdpbv100::Message::getStarTokenStarD
uint32_t getStarTokenStarD() const
Definition: gDpbMessv100.h:280
CbmMcbm2018TofTestFee::fTimeLastHistoSaving
std::chrono::time_point< std::chrono::system_clock > fTimeLastHistoSaving
Definition: CbmMcbm2018TofTestFee.h:307
CbmMcbm2018TofTestFee::fuNrOfModules
UInt_t fuNrOfModules
Definition: CbmMcbm2018TofTestFee.h:134
CbmMcbm2018TofTestFee::kuNbGet4PerGbtx
static const UInt_t kuNbGet4PerGbtx
Definition: CbmMcbm2018TofTestFee.h:294
CbmMcbm2018TofTestFee::fvuStarTrigCmdLast
std::vector< UInt_t > fvuStarTrigCmdLast
Definition: CbmMcbm2018TofTestFee.h:173
CbmMcbm2018TofTestFee::fdLastRmsUpdateTime
Double_t fdLastRmsUpdateTime
Definition: CbmMcbm2018TofTestFee.h:220
gdpbv100::Message::getStarTsMsbStarB
uint64_t getStarTsMsbStarB() const
Definition: gDpbMessv100.h:269
gdpbv100::Message::getGdpbHitChanId
uint16_t getGdpbHitChanId() const
Definition: gDpbMessv100.h:219
CbmMcbm2018TofTestFee::fhTimeRmsPulserFeeB
TH2 * fhTimeRmsPulserFeeB
Definition: CbmMcbm2018TofTestFee.h:249
PairAnalysisStyler::Fill
static Int_t Fill[]
Definition: PairAnalysisStyleDefs.h:82
gdpbv100::Message::getMsgFullTime
uint64_t getMsgFullTime(uint64_t epoch) const
Returns expanded and adjusted time of message (in ns)
Definition: gDpbMessv100.cxx:98
CbmMcbm2018TofTestFee::AddMsComponentToList
virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Definition: CbmMcbm2018TofTestFee.cxx:374
CbmMcbm2018TofTestFee::fvdFeeChanMsLastPulserHit
std::vector< std::vector< Double_t > > fvdFeeChanMsLastPulserHit
[ fuFeeNr ][ ChanNr ]
Definition: CbmMcbm2018TofTestFee.h:199
CbmMcbm2018TofTestFee::PrintSlcInfo
void PrintSlcInfo(gdpbv100::Message)
Definition: CbmMcbm2018TofTestFee.cxx:1475
gdpbv100::Message::getGdpbEpMissmatch
bool getGdpbEpMissmatch() const
Definition: gDpbMessv100.h:235
CbmMcbm2018TofTestFee::kuNbBinsDt
const UInt_t kuNbBinsDt
[ fuFeeNr ][ ChanNr ]
Definition: CbmMcbm2018TofTestFee.h:203
CbmMcbm2018TofTestFee::FillHitInfo
void FillHitInfo(gdpbv100::Message)
Definition: CbmMcbm2018TofTestFee.cxx:1356
CbmMcbmUnpack
Definition: CbmMcbmUnpack.h:15
CbmMcbm2018TofTestFee::fsHistoFileFullname
TString fsHistoFileFullname
/‍** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **‍/
Definition: CbmMcbm2018TofTestFee.h:107
CbmMcbm2018TofTestFee::fvuPadiToGet4
std::vector< UInt_t > fvuPadiToGet4
Definition: CbmMcbm2018TofTestFee.h:290
CbmMcbm2018TofPar::GetNrOfGet4PerFee
Int_t GetNrOfGet4PerFee()
Definition: CbmMcbm2018TofPar.h:69
CbmMcbm2018TofTestFee::fcPulserFeeA
TCanvas * fcPulserFeeA
Canvases.
Definition: CbmMcbm2018TofTestFee.h:269
gdpbv100::GET4_V2X_ERR_UNPAIR_FALL
@ GET4_V2X_ERR_UNPAIR_FALL
Definition: gDpbMessv100.h:126
gdpbv100::SYS_GET4_SYNC_MISS
@ SYS_GET4_SYNC_MISS
Definition: gDpbMessv100.h:73
CbmMcbm2018TofTestFee::fuCoreMs
size_t fuCoreMs
Definition: CbmMcbm2018TofTestFee.h:115
CbmMcbm2018TofTestFee::~CbmMcbm2018TofTestFee
virtual ~CbmMcbm2018TofTestFee()
Definition: CbmMcbm2018TofTestFee.cxx:163
gdpbv100::Message::getGdpbSysErrUnused
uint16_t getGdpbSysErrUnused() const
Definition: gDpbMessv100.h:249
gdpbv100::Message::getGdpbHit32Tot
uint16_t getGdpbHit32Tot() const
Definition: gDpbMessv100.h:227
CbmMcbm2018TofTestFee::fuNbFeePlot
UInt_t fuNbFeePlot
Definition: CbmMcbm2018TofTestFee.h:207
CbmMcbm2018TofTestFee::fUnpackPar
CbmMcbm2018TofPar * fUnpackPar
Definition: CbmMcbm2018TofTestFee.h:122
CbmMcbm2018TofTestFee::Init
virtual Bool_t Init()
Definition: CbmMcbm2018TofTestFee.cxx:165
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
CbmMcbm2018TofTestFee::fulCurrentTsIndex
uint64_t fulCurrentTsIndex
Definition: CbmMcbm2018TofTestFee.h:150
CbmMcbm2018TofTestFee::fvhTimeDiffPulserFeeA
std::vector< std::vector< TH1 * > > fvhTimeDiffPulserFeeA
Definition: CbmMcbm2018TofTestFee.h:241
gdpbv100::Message::getStarDaqCmdStarD
uint32_t getStarDaqCmdStarD() const
Definition: gDpbMessv100.h:279
CbmMcbm2018TofTestFee::fuGlobalIdxFeeB
UInt_t fuGlobalIdxFeeB
Definition: CbmMcbm2018TofTestFee.h:239
CbmMcbm2018TofTestFee::fvmEpSupprBuffer
std::vector< std::vector< gdpbv100::Message > > fvmEpSupprBuffer
Buffer for suppressed epoch processing.
Definition: CbmMcbm2018TofTestFee.h:193
CbmMcbm2018TofTestFee::fuNbCoreMsPerTs
size_t fuNbCoreMsPerTs
Definition: CbmMcbm2018TofTestFee.h:101
gdpbv100::SYS_GDPB_UNKWN
@ SYS_GDPB_UNKWN
Definition: gDpbMessv100.h:71