CbmRoot
CbmStar2019MonitorTof.cxx
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmStar2019MonitorTof -----
4 // ----- Created 10.07.2018 by P.-A. Loizeau -----
5 // ----- -----
6 // -----------------------------------------------------------------------------
7 
9 #include "CbmStar2019TofPar.h"
10 
11 #include "CbmHistManager.h"
12 
13 #include "FairLogger.h"
14 #include "FairRootManager.h"
15 #include "FairRun.h"
16 #include "FairRunOnline.h"
17 #include "FairRuntimeDb.h"
18 
19 #include "Rtypes.h"
20 #include "TCanvas.h"
21 #include "TClonesArray.h"
22 #include "TF1.h"
23 #include "TH1.h"
24 #include "TH2.h"
25 #include "THStack.h"
26 #include "THttpServer.h"
27 #include "TMath.h"
28 #include "TPaveStats.h"
29 #include "TProfile.h"
30 #include "TProfile2D.h"
31 #include "TROOT.h"
32 #include "TString.h"
33 #include "TStyle.h"
34 
35 #include <algorithm>
36 #include <ctime>
37 #include <iomanip>
38 #include <iostream>
39 #include <stdint.h>
40 
41 Bool_t bMcbmMoniTofResetHistos = kFALSE;
42 Bool_t bMcbmMoniTofSaveHistos = kFALSE;
44 Bool_t bMcbmMoniTofRawDataPrint = kFALSE;
47 
49  : CbmMcbmUnpack()
50  , fvMsComponentsList()
51  , fuNbCoreMsPerTs(0)
52  , fuNbOverMsPerTs(0)
53  , fbIgnoreOverlapMs(kFALSE)
54  , fuMsAcceptsPercent(100)
55  , fuTotalMsNb(0)
56  , fuOverlapMsNb(0)
57  , fuCoreMs(0)
58  , fdMsSizeInNs(0.0)
59  , fdTsCoreSizeInNs(0.0)
60  , fuMinNbGdpb(0)
61  , fuCurrNbGdpb(0)
62  , fUnpackPar()
63  , fuNrOfGdpbs(0)
64  , fuNrOfFeePerGdpb(0)
65  , fuNrOfGet4PerFee(0)
66  , fuNrOfChannelsPerGet4(0)
67  , fuNrOfChannelsPerFee(0)
68  , fuNrOfGet4(0)
69  , fuNrOfGet4PerGdpb(0)
70  , fuNrOfChannelsPerGdpb(0)
71  , fuRawDataPrintMsgNb(100000)
72  , fuRawDataPrintMsgIdx(fuRawDataPrintMsgNb)
73  , fbPrintAllHitsEnable(kFALSE)
74  , fbPrintAllEpochsEnable(kFALSE)
75  , fbPulserModeEnable(kFALSE)
76  , fbCoincMapsEnable(kFALSE)
77  , fulCurrentTsIndex(0)
78  , fuCurrentMs(0)
79  , fdMsIndex(0)
80  , fuGdpbId(0)
81  , fuGdpbNr(0)
82  , fuGet4Id(0)
83  , fuGet4Nr(0)
84  , fiEquipmentId(0)
85  , fviMsgCounter(11, 0)
86  , // length of enum MessageTypes initialized with 0
87  fvulGdpbTsMsb()
88  , fvulGdpbTsLsb()
89  , fvulStarTsMsb()
90  , fvulStarTsMid()
91  , fvulGdpbTsFullLast()
92  , fvulStarTsFullLast()
93  , fvuStarTokenLast()
94  , fvuStarDaqCmdLast()
95  , fvuStarTrigCmdLast()
96  , fvulCurrentEpoch()
97  , fvbFirstEpochSeen()
98  , fvulCurrentEpochCycle()
99  , fvulCurrentEpochFull()
100  , fulCurrentEpochTime(0)
101  , fGdpbIdIndexMap()
102  , fvmEpSupprBuffer()
103  , fvuFeeNbHitsLastMs()
104  , fdTsLastPulserHit()
105  , fvuCoincNbHitsLastMs()
106  , fvdCoincTsLastHit()
107  , dMinDt(-1. * (kuNbBinsDt * gdpbv100::kdBinSize / 2.)
108  - gdpbv100::kdBinSize / 2.)
109  , dMaxDt(1. * (kuNbBinsDt * gdpbv100::kdBinSize / 2.)
110  + gdpbv100::kdBinSize / 2.)
111  , fuNbFeePlot(2)
112  , fuNbFeePlotsPerGdpb(0)
113  , fdStartTime(-1.)
114  , fdStartTimeLong(-1.)
115  , fdStartTimeMsSz(-1.)
116  , fuHistoryHistoSize(1800)
117  , fuHistoryHistoSizeLong(600)
118  , fdLastRmsUpdateTime(0.0)
119  , fdFitZoomWidthPs(0.0)
120  , fcMsSizeAll(NULL)
121  , fvhMsSzPerLink(12, NULL)
122  , fvhMsSzTimePerLink(12, NULL)
123  , fhMessType(NULL)
124  , fhSysMessType(NULL)
125  , fhGet4MessType(NULL)
126  , fhGet4ChanScm(NULL)
127  , fhGet4ChanErrors(NULL)
128  , fhGet4EpochFlags(NULL)
129  , fhGdpbMessType(NULL)
130  , fhGdpbSysMessType(NULL)
131  , fhGdpbSysMessPattType(NULL)
132  , fhGdpbEpochFlags(NULL)
133  , fhGdpbEpochSyncEvo(NULL)
134  , fhGdpbEpochMissEvo(NULL)
135  , fvhGdpbGet4MessType()
136  , fvhGdpbGet4ChanScm()
137  , fvhGdpbGet4ChanErrors()
138  , fhScmScalerCounters(NULL)
139  , fhScmDeadtimeCounters(NULL)
140  , fhScmSeuCounters(NULL)
141  , fhScmSeuCountersEvo(NULL)
142  , fhPatternMissmatch(NULL)
143  , fhPatternEnable(NULL)
144  , fhPatternResync(NULL)
145  , fvhGdpbPatternMissmatchEvo()
146  , fvhGdpbPatternEnableEvo()
147  , fvhGdpbPatternResyncEvo()
148  , fvhRawFt_gDPB()
149  , fvhRawTot_gDPB()
150  , fvhChCount_gDPB()
151  , fvhChannelRate_gDPB()
152  , fvhRemapTot_gDPB()
153  , fvhRemapChCount_gDPB()
154  , fvhRemapChRate_gDPB()
155  , fvhFeeRate_gDPB()
156  , fvhFeeErrorRate_gDPB()
157  , fvhFeeErrorRatio_gDPB()
158  , fvhFeeRateLong_gDPB()
159  , fvhFeeErrorRateLong_gDPB()
160  , fvhFeeErrorRatioLong_gDPB()
161  , fvhRemapTotSideA_mod()
162  , fvhRemapTotSideB_mod()
163  , fvhModRate()
164  , fvhModErrorRate()
165  , fvhModErrorRatio()
166  , fvhTokenMsgType()
167  , fvhTriggerRate()
168  , fvhCmdDaqVsTrig()
169  , fvhStarTokenEvo()
170  , fvhStarTrigGdpbTsEvo()
171  , fvhStarTrigStarTsEvo()
172  , fvhTimeDiffPulser()
173  , fhTimeMeanPulser(NULL)
174  , fhTimeRmsPulser(NULL)
175  , fhTimeRmsZoomFitPuls(NULL)
176  , fhTimeResFitPuls(NULL)
177  , fvhPulserTimeDiffEvoGbtxGbtx()
178  , fvvhPulserTimeDiffEvoGdpbGdpb()
179  , fvuPadiToGet4()
180  , fvuGet4ToPadi()
181  , fvuElinkToGet4()
182  , fvuGet4ToElink()
183  , fTimeLastHistoSaving() {}
184 
186 
188  LOG(info) << "Initializing Get4 monitor";
189 
190  FairRootManager* ioman = FairRootManager::Instance();
191  if (ioman == NULL) {
192  LOG(fatal) << "No FairRootManager instance";
193  } // if( ioman == NULL )
194 
195  return kTRUE;
196 }
197 
199  LOG(info) << "Setting parameter containers for " << GetName();
200  fUnpackPar =
201  (CbmStar2019TofPar*) (FairRun::Instance()->GetRuntimeDb()->getContainer(
202  "CbmStar2019TofPar"));
203 }
204 
206  LOG(info) << "Init parameter containers for " << GetName();
207  Bool_t initOK = ReInitContainers();
208 
210 
215  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
216  for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j) {
220  } // for( UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j )
221  } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
222 
223  return initOK;
224 }
225 
227  LOG(info) << "ReInit parameter containers for " << GetName();
228 
230  LOG(info) << "Nr. of Tof GDPBs: " << fuNrOfGdpbs;
232 
233  fuNrOfFeePerGdpb = fUnpackPar->GetNrOfFeesPerGdpb();
234  LOG(info) << "Nr. of FEEs per Tof GDPB: " << fuNrOfFeePerGdpb;
235 
237  LOG(info) << "Nr. of GET4 per Tof FEE: " << fuNrOfGet4PerFee;
238 
240  LOG(info) << "Nr. of channels per GET4: " << fuNrOfChannelsPerGet4;
241 
243  LOG(info) << "Nr. of channels per FEE: " << fuNrOfChannelsPerFee;
244 
246  LOG(info) << "Nr. of GET4s: " << fuNrOfGet4;
247 
249  LOG(info) << "Nr. of GET4s per GDPB: " << fuNrOfGet4PerGdpb;
250 
252  LOG(info) << "Nr. of channels per GDPB: " << fuNrOfChannelsPerGdpb;
253 
254  fGdpbIdIndexMap.clear();
255  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
257  LOG(info) << "GDPB Id of TOF " << i << " : " << std::hex
258  << fUnpackPar->GetGdpbId(i) << std::dec;
259  } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
260 
262  LOG(info) << "Nr. of GBTx: " << fuNrOfGbtx;
263 
265  LOG(info) << "Nr. of GBTx: " << fuNrOfModules;
266 
267  fviRpcType.resize(fuNrOfGbtx);
268  fviModuleId.resize(fuNrOfGbtx);
269  fviNrOfRpc.resize(fuNrOfGbtx);
270  fviRpcSide.resize(fuNrOfGbtx);
271  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx) {
272  fviNrOfRpc[uGbtx] = fUnpackPar->GetNrOfRpc(uGbtx);
273  fviRpcType[uGbtx] = fUnpackPar->GetRpcType(uGbtx);
274  fviRpcSide[uGbtx] = fUnpackPar->GetRpcSide(uGbtx);
275  fviModuleId[uGbtx] = fUnpackPar->GetModuleId(uGbtx);
276  } // for( UInt_t uGbtx = 0; uGbtx < uNrOfGbtx; ++uGbtx)
277 
278  LOG(info) << "Nr. of RPCs per GBTx: ";
279  std::stringstream ss;
280  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
281  ss << Form(" %2d", fviNrOfRpc[uGbtx]);
282  LOG(info) << ss.str();
283 
284  LOG(info) << "RPC type per GBTx: ";
285  std::stringstream ss;
286  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
287  ss << Form(" %2d", fviRpcType[uGbtx]);
288  LOG(info) << ss.str();
289 
290  LOG(info) << "RPC side per GBTx: ";
291  std::stringstream ss;
292  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
293  ss << Form(" %2d", fviRpcSide[uGbtx]);
294  LOG(info) << ss.str();
295 
296  LOG(info) << "Module ID per GBTx: ";
297  std::stringstream ss;
298  for (UInt_t uGbtx = 0; uGbtx < fuNrOfGbtx; ++uGbtx)
299  ss << Form(" %2d", fviModuleId[uGbtx]);
300  LOG(info) << ss.str();
301 
302  fuTotalMsNb = fUnpackPar->GetNbMsTot();
303  fuOverlapMsNb = fUnpackPar->GetNbMsOverlap();
307  LOG(info) << "Timeslice parameters: " << fuTotalMsNb
308  << " MS per link, of which " << fuOverlapMsNb
309  << " overlap MS, each MS is " << fdMsSizeInNs << " ns";
310 
312  fvulGdpbTsMsb.resize(fuNrOfGdpbs);
313  fvulGdpbTsLsb.resize(fuNrOfGdpbs);
314  fvulStarTsMsb.resize(fuNrOfGdpbs);
315  fvulStarTsMid.resize(fuNrOfGdpbs);
321  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
322  fvulGdpbTsMsb[uGdpb] = 0;
323  fvulGdpbTsLsb[uGdpb] = 0;
324  fvulStarTsMsb[uGdpb] = 0;
325  fvulStarTsMid[uGdpb] = 0;
326  fvulGdpbTsFullLast[uGdpb] = 0;
327  fvulStarTsFullLast[uGdpb] = 0;
328  fvuStarTokenLast[uGdpb] = 0;
329  fvuStarDaqCmdLast[uGdpb] = 0;
330  fvuStarTrigCmdLast[uGdpb] = 0;
331  } // for (Int_t iGdpb = 0; iGdpb < fuNrOfGdpbs; ++iGdpb)
332 
334 
336  if (kTRUE == fbPulserModeEnable) {
339  } // if( kTRUE == fbPulserModeEnable )
340 
342  if (kTRUE == fbCoincMapsEnable) {
345  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
347  fvdCoincTsLastHit[uGdpb].resize(fuNrOfChannelsPerGdpb, 0.0);
348  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
349  } // if( kTRUE == fbCoincMapsEnable )
350 
354  /*
355  UInt_t uGet4topadi[32] = {
356  4, 3, 2, 1, // provided by Jochen
357  24, 23, 22, 21,
358  8, 7, 6, 5,
359  28, 27, 26, 25,
360  12, 11, 10, 9,
361  32, 31, 30, 29,
362  16, 15, 14, 13,
363  20, 19, 18, 17 };
364 */
366  UInt_t uGet4topadi[32] = {4, 3, 2, 1, // provided by Jochen
367  8, 7, 6, 5, 12, 11, 10, 9, 16, 15,
368  14, 13, 20, 19, 18, 17, 24, 23, 22, 21,
369  28, 27, 26, 25, 32, 31, 30, 29};
370 
371  UInt_t uPaditoget4[32] = {4, 3, 2, 1, // provided by Jochen
372  12, 11, 10, 9, 20, 19, 18, 17, 28, 27,
373  26, 25, 32, 31, 30, 29, 8, 7, 6, 5,
374  16, 15, 14, 13, 24, 23, 22, 21};
375 
376  for (UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan) {
377  fvuPadiToGet4[uChan] = uPaditoget4[uChan] - 1;
378  fvuGet4ToPadi[uChan] = uGet4topadi[uChan] - 1;
379  } // for( UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan )
380 
381 
385  UInt_t kuElinkToGet4[kuNbGet4PerGbtx] = {
386  27, 2, 7, 3, 31, 26, 30, 1, 33, 37, 32, 13, 9, 14,
387  10, 15, 17, 21, 16, 35, 34, 38, 25, 24, 0, 6, 20, 23,
388  18, 22, 28, 4, 29, 5, 19, 36, 39, 8, 12, 11};
389  UInt_t kuGet4ToElink[kuNbGet4PerGbtx] = {
390  24, 7, 1, 3, 31, 33, 25, 2, 37, 12, 14, 39, 38, 11,
391  13, 15, 18, 16, 28, 34, 26, 17, 29, 27, 23, 22, 5, 0,
392  30, 32, 6, 4, 10, 8, 20, 19, 35, 9, 21, 36};
393 
394  for (UInt_t uLinkAsic = 0; uLinkAsic < kuNbGet4PerGbtx; ++uLinkAsic) {
395  fvuElinkToGet4[uLinkAsic] = kuElinkToGet4[uLinkAsic];
396  fvuGet4ToElink[uLinkAsic] = kuGet4ToElink[uLinkAsic];
397  } // for( UInt_t uChan = 0; uChan < fuNrOfChannelsPerFee; ++uChan )
398 
399  return kTRUE;
400 }
401 
402 
404  UShort_t usDetectorId) {
406  for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
407  if (component == fvMsComponentsList[uCompIdx]) return;
408 
410  fvMsComponentsList.push_back(component);
411 
413  if (NULL == fvhMsSzPerLink[component]) {
414  TString sMsSzName = Form("MsSz_link_%02lu", component);
415  TString sMsSzTitle =
416  Form("Size of MS from link %02lu; Ms Size [bytes]", component);
417  fvhMsSzPerLink[component] =
418  new TH1F(sMsSzName.Data(), sMsSzTitle.Data(), 160000, 0., 20000.);
419 
420  sMsSzName = Form("MsSzTime_link_%02lu", component);
421  sMsSzTitle = Form(
422  "Size of MS vs time for gDPB of link %02lu; Time[s] ; Ms Size [bytes]",
423  component);
424  fvhMsSzTimePerLink[component] = new TProfile(sMsSzName.Data(),
425  sMsSzTitle.Data(),
426  100 * fuHistoryHistoSize,
427  0.,
428  2 * fuHistoryHistoSize);
429  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
430  if (server) {
431  server->Register("/FlibRaw", fvhMsSzPerLink[component]);
432  server->Register("/FlibRaw", fvhMsSzTimePerLink[component]);
433  } // if( server )
434  if (NULL != fcMsSizeAll) {
435  fcMsSizeAll->cd(1 + component);
436  gPad->SetLogy();
437  fvhMsSzTimePerLink[component]->Draw("hist le0");
438  } // if( NULL != fcMsSizeAll )
439  LOG(info) << "Added MS size histo for component (link): " << component;
440  } // if( NULL == fvhMsSzPerLink[ component ] )
441 }
442 void CbmStar2019MonitorTof::SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb) {
443  fuNbCoreMsPerTs = uCoreMsNb;
444  fuNbOverMsPerTs = uOverlapMsNb;
445 
446  // UInt_t uNbMsTotal = fuNbCoreMsPerTs + fuNbOverMsPerTs;
447 }
448 
450  LOG(info) << "create Histos for " << fuNrOfGdpbs << " gDPBs ";
451 
452  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
453 
454  TString name {""};
455  TString title {""};
456 
457  // Full Fee time difference test
458  UInt_t uNbBinsDt =
459  kuNbBinsDt
460  + 1; // To account for extra bin due to shift by 1/2 bin of both ranges
461 
463  + (0 != fuNrOfFeePerGdpb % fuNbFeePlot ? 1 : 0);
464  Double_t dBinSzG4v2 = (6250. / 112.);
465  dMinDt = -1. * (kuNbBinsDt * dBinSzG4v2 / 2.) - dBinSzG4v2 / 2.;
466  dMaxDt = 1. * (kuNbBinsDt * dBinSzG4v2 / 2.) + dBinSzG4v2 / 2.;
467 
468  /*******************************************************************/
469  name = "hMessageType";
470  title = "Nb of message for each type; Type";
471  // Test Big Data readout with plotting
472  fhMessType = new TH1I(name,
473  title,
475  0.,
477  fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_HIT, "HIT");
478  fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_EPOCH, "EPOCH");
479  fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SLOWC, "SLOWC");
480  fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SYST, "SYST");
481  fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_A, "TRI_A");
482  fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_B, "TRI_B");
483  fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_C, "TRI_C");
484  fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_D, "TRI_D");
485 
486  /*******************************************************************/
487  name = "hSysMessType";
488  title = "Nb of system message for each type; System Type";
489  fhSysMessType = new TH1I(
490  name, title, 1 + gdpbv100::SYS_PATTERN, 0., 1 + gdpbv100::SYS_PATTERN);
491  fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_ERROR,
492  "GET4 ERROR");
493  fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GDPB_UNKWN,
494  "UNKW GET4 MSG");
495  fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_SYNC_MISS,
496  "SYS_GET4_SYNC_MISS");
497  fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_PATTERN,
498  "SYS_PATTERN");
499 
500  /*******************************************************************/
501  name = "hGet4MessType";
502  title = "Nb of message for each type per GET4; GET4 chip # ; Type";
503  fhGet4MessType = new TH2I(name, title, fuNrOfGet4, 0., fuNrOfGet4, 4, 0., 4.);
504  fhGet4MessType->GetYaxis()->SetBinLabel(1, "DATA 32b");
505  fhGet4MessType->GetYaxis()->SetBinLabel(2, "EPOCH");
506  fhGet4MessType->GetYaxis()->SetBinLabel(3, "S.C. M");
507  fhGet4MessType->GetYaxis()->SetBinLabel(4, "ERROR");
508  // fhGet4MessType->GetYaxis()->SetBinLabel( 5, "DATA 24b");
509  // fhGet4MessType->GetYaxis()->SetBinLabel( 6, "STAR Trigger");
510 
511  /*******************************************************************/
512  name = "hGet4ChanScm";
513  title = "SC messages per GET4 channel; GET4 channel # ; SC type";
514  fhGet4ChanScm = new TH2I(name,
515  title,
517  0.,
519  5,
520  0.,
521  5.);
522  fhGet4ChanScm->GetYaxis()->SetBinLabel(1, "Hit Scal");
523  fhGet4ChanScm->GetYaxis()->SetBinLabel(2, "Deadtime");
524  fhGet4ChanScm->GetYaxis()->SetBinLabel(3, "SPI");
525  fhGet4ChanScm->GetYaxis()->SetBinLabel(4, "SEU Scal");
526  fhGet4ChanScm->GetYaxis()->SetBinLabel(5, "START");
527 
528  /*******************************************************************/
529  name = "hGet4ChanErrors";
530  title = "Error messages per GET4 channel; GET4 channel # ; Error";
531  fhGet4ChanErrors = new TH2I(name,
532  title,
534  0.,
536  21,
537  0.,
538  21.);
539  fhGet4ChanErrors->GetYaxis()->SetBinLabel(1, "0x00: Readout Init ");
540  fhGet4ChanErrors->GetYaxis()->SetBinLabel(2, "0x01: Sync ");
541  fhGet4ChanErrors->GetYaxis()->SetBinLabel(3, "0x02: Epoch count sync");
542  fhGet4ChanErrors->GetYaxis()->SetBinLabel(4, "0x03: Epoch ");
543  fhGet4ChanErrors->GetYaxis()->SetBinLabel(5, "0x04: FIFO Write ");
544  fhGet4ChanErrors->GetYaxis()->SetBinLabel(6, "0x05: Lost event ");
545  fhGet4ChanErrors->GetYaxis()->SetBinLabel(7, "0x06: Channel state ");
546  fhGet4ChanErrors->GetYaxis()->SetBinLabel(8, "0x07: Token Ring state");
547  fhGet4ChanErrors->GetYaxis()->SetBinLabel(9, "0x08: Token ");
548  fhGet4ChanErrors->GetYaxis()->SetBinLabel(10, "0x09: Error Readout ");
549  fhGet4ChanErrors->GetYaxis()->SetBinLabel(11, "0x0a: SPI ");
550  fhGet4ChanErrors->GetYaxis()->SetBinLabel(
551  12, "0x0b: DLL Lock error "); // <- From GET4 v1.2
552  fhGet4ChanErrors->GetYaxis()->SetBinLabel(
553  13, "0x0c: DLL Reset invoc."); // <- From GET4 v1.2
554  fhGet4ChanErrors->GetYaxis()->SetBinLabel(14, "0x11: Overwrite ");
555  fhGet4ChanErrors->GetYaxis()->SetBinLabel(15, "0x12: ToT out of range");
556  fhGet4ChanErrors->GetYaxis()->SetBinLabel(16, "0x13: Event Discarded ");
557  fhGet4ChanErrors->GetYaxis()->SetBinLabel(
558  17, "0x14: Add. Rising edge"); // <- From GET4 v1.3
559  fhGet4ChanErrors->GetYaxis()->SetBinLabel(
560  18, "0x15: Unpaired Falling"); // <- From GET4 v1.3
561  fhGet4ChanErrors->GetYaxis()->SetBinLabel(
562  19, "0x16: Sequence error "); // <- From GET4 v1.3
563  fhGet4ChanErrors->GetYaxis()->SetBinLabel(20, "0x7f: Unknown ");
564  fhGet4ChanErrors->GetYaxis()->SetBinLabel(21, "Corrupt/unsuprtd error");
565 
566  /*******************************************************************/
567  name = "hGet4EpochFlags";
568  title = "Epoch flags per GET4; GET4 chip # ; Type";
570  new TH2I(name, title, fuNrOfGet4, 0., fuNrOfGet4, 4, 0., 4.);
571  fhGet4EpochFlags->GetYaxis()->SetBinLabel(1, "SYNC");
572  fhGet4EpochFlags->GetYaxis()->SetBinLabel(2, "Ep LOSS");
573  fhGet4EpochFlags->GetYaxis()->SetBinLabel(3, "Da LOSS");
574  fhGet4EpochFlags->GetYaxis()->SetBinLabel(4, "MISSMAT");
575 
576  /*******************************************************************/
577  name = "hGdpbMessageType";
578  title = "Nb of message for each type per Gdpb; Type; Gdpb Idx []";
579  // Test Big Data readout with plotting
580  fhGdpbMessType = new TH2I(name,
581  title,
583  0.,
585  fuNrOfGdpbs,
586  -0.5,
587  fuNrOfGdpbs - 0.5);
588  fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_HIT, "HIT");
589  fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_EPOCH, "EPOCH");
590  fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SLOWC, "SLOWC");
591  fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SYST, "SYST");
592  fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_A,
593  "TRI_A");
594  fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_B,
595  "TRI_B");
596  fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_C,
597  "TRI_C");
598  fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_D,
599  "TRI_D");
600 
601  /*******************************************************************/
602  name = "hGdpbSysMessType";
603  title =
604  "Nb of system message for each type per Gdpb; System Type; Gdpb Idx []";
605  fhGdpbSysMessType = new TH2I(name,
606  title,
608  0.,
610  fuNrOfGdpbs,
611  -0.5,
612  fuNrOfGdpbs - 0.5);
613  fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_ERROR,
614  "GET4 ERROR");
615  fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GDPB_UNKWN,
616  "UNKW GET4 MSG");
617  fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_SYNC_MISS,
618  "SYS_GET4_SYNC_MISS");
619  fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_PATTERN,
620  "SYS_PATTERN");
621 
622  /*******************************************************************/
623  name = "hGdpbSysMessPattType";
624  title =
625  "Nb of pattern message for each type per Gdpb; Pattern Type; Gdpb Idx []";
626  fhGdpbSysMessPattType = new TH2I(name,
627  title,
629  0.,
631  fuNrOfGdpbs,
632  -0.5,
633  fuNrOfGdpbs - 0.5);
634  fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_MISSMATCH,
635  "PATT_MISSMATCH");
636  fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_ENABLE,
637  "PATT_ENABLE");
638  fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_RESYNC,
639  "PATT_RESYNC");
640 
641  /*******************************************************************/
642  name = "hGdpbEpochFlags";
643  title = "Epoch flags per gDPB; gDPB # ; Type";
645  new TH2I(name, title, fuNrOfGdpbs, 0., fuNrOfGdpbs, 4, 0., 4.);
646  fhGdpbEpochFlags->GetYaxis()->SetBinLabel(1, "SYNC");
647  fhGdpbEpochFlags->GetYaxis()->SetBinLabel(2, "Ep LOSS");
648  fhGdpbEpochFlags->GetYaxis()->SetBinLabel(3, "Da LOSS");
649  fhGdpbEpochFlags->GetYaxis()->SetBinLabel(4, "MISSMAT");
650 
651  /*******************************************************************/
652  name = Form("hGdpbEpochSyncEvo");
653  title = Form("Epoch SYNC per second and gDPB; Time[s]; gDPB #; SYNC Nb");
654  fhGdpbEpochSyncEvo = new TH2D(name.Data(),
655  title.Data(),
657  0,
659  fuNrOfGdpbs,
660  0.,
661  fuNrOfGdpbs);
662 
663  /*******************************************************************/
664  name = Form("hGdpbEpochMissEvo");
665  title =
666  Form("Epoch Missmatch per second and gDPB; Time[s]; gDPB #; Missmatch Nb");
667  fhGdpbEpochMissEvo = new TH2D(name.Data(),
668  title.Data(),
670  0,
672  fuNrOfGdpbs,
673  0.,
674  fuNrOfGdpbs);
675 
676  /*******************************************************************/
677  // Slow control messages analysis
678  name = "hScmScalerCounters";
679  title =
680  "Content of Scaler counter SC messages; Scaler counter [hit]; Channel []";
681  fhScmScalerCounters = new TH2I(name,
682  title,
684  0.,
686  8192,
687  0.,
688  8192.);
689 
690  name = "hScmDeadtimeCounters";
691  title = "Content of Deadtime counter SC messages; Deadtime [Clk Cycles]; "
692  "Channel []";
693  fhScmDeadtimeCounters = new TH2I(name,
694  title,
696  0.,
698  8192,
699  0.,
700  8192.);
701 
702  name = "hScmSeuCounters";
703  title = "Content of SEU counter SC messages; SEU []; Channel []";
704  fhScmSeuCounters = new TH2I(name,
705  title,
707  0.,
709  8192,
710  0.,
711  8192.);
712 
713  name = "hScmSeuCountersEvo";
714  title =
715  "SEU counter rate from SC messages; Time in Run [s]; Channel []; SEU []";
716  fhScmSeuCountersEvo = new TH2I(name,
717  title,
719  0.,
722  0.,
724 
725  /*******************************************************************/
726  name = "hPatternMissmatch";
727  title = "Missmatch pattern integral per Gdpb; ASIC Pattern []; Gdpb Idx []";
728  fhPatternMissmatch = new TH2I(name,
729  title,
731  0.,
733  fuNrOfGdpbs,
734  -0.5,
735  fuNrOfGdpbs - 0.5);
736  name = "hPatternEnable";
737  title = "Enable pattern integral per Gdpb; ASIC Pattern []; Gdpb Idx []";
738  fhPatternEnable = new TH2I(name,
739  title,
741  0.,
743  fuNrOfGdpbs,
744  -0.5,
745  fuNrOfGdpbs - 0.5);
746  name = "hPatternResync";
747  title = "Resync pattern integral per Gdpb; ASIC Pattern []; Gdpb Idx []";
748  fhPatternResync = new TH2I(name,
749  title,
751  0.,
753  fuNrOfGdpbs,
754  -0.5,
755  fuNrOfGdpbs - 0.5);
756 
757 
758  /*******************************************************************/
759  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
760 
761  /*******************************************************************/
762  name = Form("hGdpbGet4MessType_%02u", uGdpb);
763  title = Form(
764  "Nb of message for each type per GET4 in gDPB %02u; GET4 chip # ; Type",
765  uGdpb);
766  fvhGdpbGet4MessType.push_back(new TH2I(
767  name, title, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, 4, 0., 4.));
768  fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(1, "DATA 32b");
769  fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(2, "EPOCH");
770  fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(3, "S.C. M");
771  fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(4, "ERROR");
772 
773  /*******************************************************************/
774  name = Form("hGdpbGet4ChanScm_%02u", uGdpb);
775  title = Form(
776  "SC messages per GET4 channel in gDPB %02u; GET4 channel # ; SC type",
777  uGdpb);
778  fvhGdpbGet4ChanScm.push_back(new TH2I(name,
779  title,
781  0.,
783  5,
784  0.,
785  5.));
786  fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(1, "Hit Scal");
787  fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(2, "Deadtime");
788  fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(3, "SPI");
789  fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(4, "SEU Scal");
790  fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(5, "START");
791 
792  /*******************************************************************/
793  name = Form("hGdpbGet4ChanErrors_%02u", uGdpb);
794  title = Form(
795  "Error messages per GET4 channel in gDPB %02u; GET4 channel # ; Error",
796  uGdpb);
797  fvhGdpbGet4ChanErrors.push_back(new TH2I(name,
798  title,
800  0.,
802  22,
803  0.,
804  22.));
805  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
806  1, "0x00: Readout Init ");
807  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
808  2, "0x01: Sync ");
809  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
810  3, "0x02: Epoch count sync");
811  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
812  4, "0x03: Epoch ");
813  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
814  5, "0x04: FIFO Write ");
815  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
816  6, "0x05: Lost event ");
817  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
818  7, "0x06: Channel state ");
819  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
820  8, "0x07: Token Ring state");
821  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
822  9, "0x08: Token ");
823  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
824  10, "0x09: Error Readout ");
825  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
826  11, "0x0a: SPI ");
827  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
828  12, "0x0b: DLL Lock error "); // <- From GET4 v1.2
829  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
830  13, "0x0c: DLL Reset invoc."); // <- From GET4 v1.2
831  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
832  14, "0x11: Overwrite "); // <- From GET4 v1.0 to 1.3
833  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
834  15, "0x12: ToT out of range");
835  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
836  16, "0x13: Event Discarded ");
837  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
838  17, "0x14: Add. Rising edge"); // <- From GET4 v1.3
839  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
840  18, "0x15: Unpaired Falling"); // <- From GET4 v1.3
841  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
842  19, "0x16: Sequence error "); // <- From GET4 v1.3
843  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
844  20, "0x17: Epoch Overflow "); // <- From GET4 v2.0
845  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
846  21, "0x7f: Unknown ");
847  fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(
848  22, "Corrupt/unsuprtd error");
849 
850  /*******************************************************************/
851  name = Form("hGdpbPatternMissmatchEvo_%02u", uGdpb);
852  title =
853  Form("Missmatch pattern vs TS index in gDPB %02u; TS # ; ASIC Pattern []",
854  uGdpb);
855  fvhGdpbPatternMissmatchEvo.push_back(new TH2I(name,
856  title,
857  10000,
858  0.,
859  100000,
861  0.,
863 
864  name = Form("hGdpbPatternEnableEvo_%02u", uGdpb);
865  title = Form(
866  "Enable pattern vs TS index in gDPB %02u; TS # ; ASIC Pattern []", uGdpb);
867  fvhGdpbPatternEnableEvo.push_back(new TH2I(name,
868  title,
869  10000,
870  0.,
871  100000,
873  0.,
875 
876  name = Form("hGdpbPatternResyncEvo%02u", uGdpb);
877  title = Form(
878  "Resync pattern vs TS index in gDPB %02u; TS # ; ASIC Pattern []", uGdpb);
879  fvhGdpbPatternResyncEvo.push_back(new TH2I(name,
880  title,
881  10000,
882  0.,
883  100000,
885  0.,
887 
889  name = Form("RawFt_gDPB_%02u", uGdpb);
890  title =
891  Form("Raw FineTime gDPB %02u Plot 0; channel; FineTime [bin]", uGdpb);
892  fvhRawFt_gDPB.push_back(new TH2F(name.Data(),
893  title.Data(),
895  0,
897  128,
898  0,
899  128));
900 
902  name = Form("RawTot_gDPB_%02u", uGdpb);
903  title = Form("Raw TOT gDPB %02u; channel; TOT [bin]", uGdpb);
904  fvhRawTot_gDPB.push_back(new TH2F(name.Data(),
905  title.Data(),
907  0,
909  256,
910  0,
911  256));
912 
914  name = Form("ChCount_gDPB_%02u", uGdpb);
915  title = Form("Channel counts gDPB %02u; channel; Hits", uGdpb);
916  fvhChCount_gDPB.push_back(
917  new TH1I(name.Data(),
918  title.Data(),
920  0,
922 
924  name = Form("ChRate_gDPB_%02u", uGdpb);
925  title = Form("Channel rate gDPB %02u; Time in run [s]; channel; Rate [1/s]",
926  uGdpb);
927  fvhChannelRate_gDPB.push_back(
928  new TH2D(name.Data(),
929  title.Data(),
931  0,
934  0,
936 
938  name = Form("RemapTot_gDPB_%02u", uGdpb);
939  title = Form("Raw TOT gDPB %02u remapped; PADI channel; TOT [bin]", uGdpb);
940  fvhRemapTot_gDPB.push_back(new TH2F(name.Data(),
941  title.Data(),
943  0,
945  256,
946  0,
947  256));
948 
950  name = Form("RemapChCount_gDPB_%02u", uGdpb);
951  title =
952  Form("Channel counts gDPB %02u remapped; PADI channel; Hits", uGdpb);
953  fvhRemapChCount_gDPB.push_back(
954  new TH1I(name.Data(),
955  title.Data(),
957  0,
959 
961  name = Form("RemapChRate_gDPB_%02u", uGdpb);
962  title = Form(
963  "PADI channel rate gDPB %02u; Time in run [s]; PADI channel; Rate [1/s]",
964  uGdpb);
965  fvhRemapChRate_gDPB.push_back(
966  new TH2D(name.Data(),
967  title.Data(),
969  0,
972  0,
974 
976  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee) {
977  name = Form("FeeRate_gDPB_g%02u_f%1u", uGdpb, uFee);
978  title =
979  Form("Counts per second in Fee %1u of gDPB %02u; Time[s] ; Counts",
980  uFee,
981  uGdpb);
982  fvhFeeRate_gDPB.push_back(new TH1D(
983  name.Data(), title.Data(), fuHistoryHistoSize, 0, fuHistoryHistoSize));
984 
985  name = Form("FeeErrorRate_gDPB_g%02u_f%1u", uGdpb, uFee);
986  title = Form("Error Counts per second in Fee %1u of gDPB %02u; Time[s] ; "
987  "Error Counts",
988  uFee,
989  uGdpb);
990  fvhFeeErrorRate_gDPB.push_back(new TH1D(
991  name.Data(), title.Data(), fuHistoryHistoSize, 0, fuHistoryHistoSize));
992 
993  name = Form("FeeErrorRatio_gDPB_g%02u_f%1u", uGdpb, uFee);
994  title = Form("Error to data ratio per second in Fee %1u of gDPB %02u; "
995  "Time[s] ; Error ratio[]",
996  uFee,
997  uGdpb);
998  fvhFeeErrorRatio_gDPB.push_back(new TProfile(
999  name.Data(), title.Data(), fuHistoryHistoSize, 0, fuHistoryHistoSize));
1000 
1001  name = Form("FeeRateLong_gDPB_g%02u_f%1u", uGdpb, uFee);
1002  title =
1003  Form("Counts per minutes in Fee %1u of gDPB %02u; Time[min] ; Counts",
1004  uFee,
1005  uGdpb);
1006  fvhFeeRateLong_gDPB.push_back(new TH1D(name.Data(),
1007  title.Data(),
1009  0,
1011 
1012  name = Form("FeeErrorRateLong_gDPB_g%02u_f%1u", uGdpb, uFee);
1013  title = Form("Error Counts per minutes in Fee %1u of gDPB %02u; "
1014  "Time[min] ; Error Counts",
1015  uFee,
1016  uGdpb);
1017  fvhFeeErrorRateLong_gDPB.push_back(new TH1D(name.Data(),
1018  title.Data(),
1020  0,
1022 
1023  name = Form("FeeErrorRatioLong_gDPB_g%02u_f%1u", uGdpb, uFee);
1024  title = Form("Error to data ratio per minutes in Fee %1u of gDPB %02u; "
1025  "Time[min] ; Error ratio[]",
1026  uFee,
1027  uGdpb);
1028  fvhFeeErrorRatioLong_gDPB.push_back(new TProfile(name.Data(),
1029  title.Data(),
1031  0,
1033  } // for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; uFee++)
1034 
1036  name = Form("hTokenMsgType_gDPB_%02u", uGdpb);
1038  title = Form("STAR trigger Messages type gDPB %02u; Type ; Counts", uGdpb);
1039  fvhTokenMsgType.push_back(new TH1F(name, title, 4, 0, 4));
1040  fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(1, "A"); // gDPB TS high
1041  fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(
1042  2, "B"); // gDPB TS low, STAR TS high
1043  fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(3, "C"); // STAR TS mid
1044  fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(
1045  4, "D"); // STAR TS low, token, CMDs
1046  if (server) server->Register("/StarRaw", fvhTokenMsgType[uGdpb]);
1047 
1048  name = Form("hTriggerRate_gDPB_%02u", uGdpb);
1049  title = Form("STAR trigger signals per second gDPB %02u; Time[s] ; Counts",
1050  uGdpb);
1051  fvhTriggerRate.push_back(
1052  new TH1F(name, title, fuHistoryHistoSize, 0, fuHistoryHistoSize));
1053  if (server) server->Register("/StarRaw", fvhTriggerRate[uGdpb]);
1054 
1055  name = Form("hCmdDaqVsTrig_gDPB_%02u", uGdpb);
1056  title =
1057  Form("STAR daq command VS STAR trigger command gDPB %02u; DAQ ; TRIGGER",
1058  uGdpb);
1059  fvhCmdDaqVsTrig.push_back(new TH2I(name, title, 16, 0, 16, 16, 0, 16));
1060  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1061  1, "0x0: no-trig "); // idle link
1062  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1063  2, "0x1: clear "); // clears redundancy counters on the readout boards
1064  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1065  3, "0x2: mast-rst"); // general reset of the whole front-end logic
1066  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1067  4, "0x3: spare "); // reserved
1068  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1069  5, "0x4: trigg. 0"); // Default physics readout, all det support required
1070  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(6, "0x5: trigg. 1"); //
1071  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(7, "0x6: trigg. 2"); //
1072  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(8, "0x7: trigg. 3"); //
1073  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(9, "0x8: puls. 0"); //
1074  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(10, "0x9: puls. 1"); //
1075  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(11, "0xA: puls. 2"); //
1076  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(12, "0xB: puls. 3"); //
1077  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1078  13,
1079  "0xC: config "); // housekeeping trigger: return geographic info of FE
1080  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1081  14, "0xD: abort "); // aborts and clears an active event
1082  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(15, "0xE: L1accept"); //
1083  fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(16, "0xF: L2accept"); //
1084  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1085  1, "0x0: 0"); // To be filled at STAR
1086  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1087  2, "0x1: 1"); // To be filled at STAR
1088  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1089  3, "0x2: 2"); // To be filled at STAR
1090  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1091  4, "0x3: 3"); // To be filled at STAR
1092  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1093  5, "0x4: 4"); // To be filled at STAR
1094  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1095  6, "0x5: 5"); // To be filled at STAR
1096  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1097  7, "0x6: 6"); // To be filled at STAR
1098  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1099  8, "0x7: 7"); // To be filled at STAR
1100  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1101  9, "0x8: 8"); // To be filled at STAR
1102  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1103  10, "0x9: 9"); // To be filled at STAR
1104  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1105  11, "0xA: 10"); // To be filled at STAR
1106  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1107  12, "0xB: 11"); // To be filled at STAR
1108  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1109  13, "0xC: 12"); // To be filled at STAR
1110  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1111  14, "0xD: 13"); // To be filled at STAR
1112  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1113  15, "0xE: 14"); // To be filled at STAR
1114  fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(
1115  16, "0xF: 15"); // To be filled at STAR
1116  if (server) server->Register("/StarRaw", fvhCmdDaqVsTrig[uGdpb]);
1117 
1118  name = Form("hStarTokenEvo_gDPB_%02u", uGdpb);
1119  title = Form("STAR token value VS time gDPB %02u; Time in Run [s] ; STAR "
1120  "Token; Counts",
1121  uGdpb);
1122  fvhStarTokenEvo.push_back(new TH2I(
1123  name, title, fuHistoryHistoSize, 0, fuHistoryHistoSize, 410, 0, 4100));
1124 
1125 
1126  name = Form("hStarTrigGdpbTsEvo_gDPB_%02u", uGdpb);
1127  title = Form(
1128  "gDPB TS in STAR triger tokens for gDPB %02u; Time in Run [s] ; gDPB TS;",
1129  uGdpb);
1130  fvhStarTrigGdpbTsEvo.push_back(
1131  new TProfile(name, title, fuHistoryHistoSize, 0, fuHistoryHistoSize));
1132 
1133  name = Form("hStarTrigStarTsEvo_gDPB_%02u", uGdpb);
1134  title = Form(
1135  "STAR TS in STAR triger tokens for gDPB %02u; Time in Run [s] ; STAR TS;",
1136  uGdpb);
1137  fvhStarTrigStarTsEvo.push_back(
1138  new TProfile(name, title, fuHistoryHistoSize, 0, fuHistoryHistoSize));
1139  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1140 
1141  /*******************************************************************/
1143  for (UInt_t uMod = 0; uMod < fuNrOfModules; uMod++) {
1144  name = Form("RemapTotSideA_mod_%02u", uMod);
1145  title = Form("Raw TOT module %02u Side A; PADI channel; TOT [bin]", uMod);
1146  fvhRemapTotSideA_mod.push_back(new TH2F(name.Data(),
1147  title.Data(),
1149  0,
1151  256,
1152  0,
1153  256));
1154  name = Form("RemapTotSideB_mod_%02u", uMod);
1155  title = Form("Raw TOT module %02u Side B; PADI channel; TOT [bin]", uMod);
1156  fvhRemapTotSideB_mod.push_back(new TH2F(name.Data(),
1157  title.Data(),
1159  0,
1161  256,
1162  0,
1163  256));
1164 
1165  name = Form("ModRate_gDPB_m%02u", uMod);
1166  title = Form("Counts per second in Module %02u; Time[s] ; Counts", uMod);
1167  fvhModRate.push_back(new TH1D(
1168  name.Data(), title.Data(), fuHistoryHistoSize, 0, fuHistoryHistoSize));
1169 
1170  name = Form("ModErrorRate_m%02u", uMod);
1171  title = Form(
1172  "Error Counts per second in Module %02u; Time[s] ; Error Counts", uMod);
1173  fvhModErrorRate.push_back(new TH1D(
1174  name.Data(), title.Data(), fuHistoryHistoSize, 0, fuHistoryHistoSize));
1175 
1176  name = Form("ModErrorRatio_m%02u", uMod);
1177  title = Form(
1178  "Error to data ratio per second in Module %02u; Time[s] ; Error ratio[]",
1179  uMod);
1180  fvhModErrorRatio.push_back(new TProfile(
1181  name.Data(), title.Data(), fuHistoryHistoSize, 0, fuHistoryHistoSize));
1182  } // for( UInt_t uMod = 0; uMod < fuNrOfModules; uMod ++ )
1183 
1184  /*******************************************************************/
1186  if (kTRUE == fbPulserModeEnable) {
1188  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++) {
1190  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++) {
1191  if (uFeeA < uFeeB) {
1192  UInt_t uGdpbA = uFeeA / (fuNrOfFeePerGdpb);
1193  UInt_t uFeeIdA = uFeeA - (fuNrOfFeePerGdpb * uGdpbA);
1194  UInt_t uGdpbB = uFeeB / (fuNrOfFeePerGdpb);
1195  UInt_t uFeeIdB = uFeeB - (fuNrOfFeePerGdpb * uGdpbB);
1196  fvhTimeDiffPulser[uFeeA][uFeeB] =
1197  new TH1I(Form("hTimeDiffPulser_g%02u_f%1u_g%02u_f%1u",
1198  uGdpbA,
1199  uFeeIdA,
1200  uGdpbB,
1201  uFeeIdB),
1202  Form("Time difference for pulser on gDPB %02u FEE %1u and "
1203  "gDPB %02u FEE %1u; DeltaT [ps]; Counts",
1204  uGdpbA,
1205  uFeeIdA,
1206  uGdpbB,
1207  uFeeIdB),
1208  uNbBinsDt,
1209  dMinDt,
1210  dMaxDt);
1211  } // if( uFeeA < uFeeB )
1212  else
1213  fvhTimeDiffPulser[uFeeA][uFeeB] = NULL;
1214  } // for( UInt_t uFeeB = uFeeA; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs - 1; uFeeB++)
1215  } // for( UInt_t uFeeA = 0; uFeeA < kuNbChanTest - 1; uFeeA++)
1216 
1217  name = "hTimeMeanPulser";
1218  fhTimeMeanPulser = new TH2D(
1219  name.Data(),
1220  "Time difference Mean for each FEE pairs; FEE A; FEE B ; Mean [ps]",
1222  -0.5,
1223  fuNrOfFeePerGdpb * fuNrOfGdpbs - 1.5,
1225  0.5,
1226  fuNrOfFeePerGdpb * fuNrOfGdpbs - 0.5);
1227 
1228  name = "hTimeRmsPulser";
1229  fhTimeRmsPulser = new TH2D(
1230  name.Data(),
1231  "Time difference RMS for each FEE pairs; FEE A; FEE B ; RMS [ps]",
1233  -0.5,
1234  fuNrOfFeePerGdpb * fuNrOfGdpbs - 1.5,
1236  0.5,
1237  fuNrOfFeePerGdpb * fuNrOfGdpbs - 0.5);
1238 
1239  name = "hTimeRmsZoomFitPuls";
1240  fhTimeRmsZoomFitPuls = new TH2D(name.Data(),
1241  "Time difference RMS after zoom for each "
1242  "FEE pairs; FEE A; FEE B ; RMS [ps]",
1244  -0.5,
1245  fuNrOfFeePerGdpb * fuNrOfGdpbs - 1.5,
1247  0.5,
1248  fuNrOfFeePerGdpb * fuNrOfGdpbs - 0.5);
1249 
1250  name = "hTimeResFitPuls";
1251  fhTimeResFitPuls = new TH2D(name.Data(),
1252  "Time difference Res from fit for each FEE "
1253  "pairs; FEE A; FEE B ; Sigma [ps]",
1255  -0.5,
1256  fuNrOfFeePerGdpb * fuNrOfGdpbs - 1.5,
1258  0.5,
1259  fuNrOfFeePerGdpb * fuNrOfGdpbs - 0.5);
1260 
1263  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1264  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx) {
1265  name =
1266  Form("hPulserTimeDiffEvoGdpb%02uGbtx00Gbtx%02u", uGdpb, uGbtx + 1);
1267  fvhPulserTimeDiffEvoGbtxGbtx[uGdpb * (kuNbGbtxPerGdpb - 1) + uGbtx] =
1268  new TProfile(
1269  name.Data(),
1270  Form("Time difference of the 1st FEE in the 1st GBTx of gDPB %02u "
1271  "vs GBTx %02u; time in run [min]; dt [ps]",
1272  uGdpb,
1273  uGbtx + 1),
1275  0,
1277  } // for( UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb; ++uGbtx )
1278 
1279  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb].resize(fuNrOfGdpbs, NULL);
1280  for (UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB) {
1281  name = Form("hPulserTimeDiffEvoGdpb%02uGdpb%02u", uGdpb, uGdpbB);
1282  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB] =
1283  new TProfile(name.Data(),
1284  Form("Time difference of the 1st FEE in the 1st GBTx of "
1285  "gDPB %02u vs %02u; time in run [min]; dt [ps]",
1286  uGdpb,
1287  uGdpbB),
1289  0,
1291  } // for( UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB )
1292  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1293  } // if( kTRUE == fbPulserModeEnable )
1294 
1296  if (kTRUE == fbCoincMapsEnable) {
1297  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1298  name = Form("hCoincMapAllChanGdpb%02u", uGdpb);
1299  fvhCoincMapAllChanGdpb.push_back(
1300  new TH2D(name.Data(),
1301  Form("Coincidence map of all channels of gDPB %02u; Chan A "
1302  "[]; Chan B[]; Coinc. []",
1303  uGdpb),
1305  -0.5,
1306  fuNrOfChannelsPerGdpb - 0.5,
1308  -0.5,
1309  fuNrOfChannelsPerGdpb - 0.5));
1310 
1311  name = Form("hCoincMeanAllChanGdpb%02u", uGdpb);
1312  fvhCoincMeanAllChanGdpb.push_back(
1313  new TProfile2D(name.Data(),
1314  Form("Coincidence mean of all channels of gDPB %02u; "
1315  "Chan A []; Chan B[]; Mean dt [ps]",
1316  uGdpb),
1318  -0.5,
1319  fuNrOfChannelsPerGdpb - 0.5,
1321  -0.5,
1322  fuNrOfChannelsPerGdpb - 0.5));
1323  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1324  } // if( kTRUE == fbCoincMapsEnable )
1325 
1326  if (server) {
1327  server->Register("/TofRaw", fhMessType);
1328  server->Register("/TofRaw", fhSysMessType);
1329  server->Register("/TofRaw", fhGet4MessType);
1330  server->Register("/TofRaw", fhGet4ChanScm);
1331  server->Register("/TofRaw", fhGet4ChanErrors);
1332  server->Register("/TofRaw", fhGet4EpochFlags);
1333 
1334  server->Register("/TofRaw", fhGdpbMessType);
1335  server->Register("/TofRaw", fhGdpbSysMessType);
1336  server->Register("/TofRaw", fhGdpbSysMessPattType);
1337  server->Register("/TofRaw", fhGdpbEpochFlags);
1338  server->Register("/TofRaw", fhGdpbEpochSyncEvo);
1339  server->Register("/TofRaw", fhGdpbEpochMissEvo);
1340 
1341  server->Register("/TofRaw", fhScmScalerCounters);
1342  server->Register("/TofRaw", fhScmDeadtimeCounters);
1343  server->Register("/TofRaw", fhScmSeuCounters);
1344  server->Register("/TofRaw", fhScmSeuCountersEvo);
1345 
1346  server->Register("/TofRaw", fhPatternMissmatch);
1347  server->Register("/TofRaw", fhPatternEnable);
1348  server->Register("/TofRaw", fhPatternResync);
1349 
1350  for (UInt_t uTotPlot = 0; uTotPlot < fvhRawTot_gDPB.size(); ++uTotPlot)
1351  server->Register("/TofRaw", fvhRawTot_gDPB[uTotPlot]);
1352 
1353  for (UInt_t uTotPlot = 0; uTotPlot < fvhRemapTot_gDPB.size(); ++uTotPlot)
1354  server->Register("/TofRaw", fvhRemapTot_gDPB[uTotPlot]);
1355 
1356  for (UInt_t uMod = 0; uMod < fuNrOfModules; uMod++) {
1357  server->Register("/TofRaw", fvhRemapTotSideA_mod[uMod]);
1358  server->Register("/TofRaw", fvhRemapTotSideB_mod[uMod]);
1359  server->Register("/TofMod", fvhModRate[uMod]);
1360  server->Register("/TofMod", fvhModErrorRate[uMod]);
1361  server->Register("/TofMod", fvhModErrorRatio[uMod]);
1362  } // for( UInt_t uMod = 0; uMod < fuNrOfModules; uMod ++ )
1363 
1364  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1365  server->Register("/TofRaw", fvhGdpbGet4MessType[uGdpb]);
1366  server->Register("/TofRaw", fvhGdpbGet4ChanScm[uGdpb]);
1367  server->Register("/TofRaw", fvhGdpbGet4ChanErrors[uGdpb]);
1368 
1369  server->Register("/TofRaw", fvhGdpbPatternMissmatchEvo[uGdpb]);
1370  server->Register("/TofRaw", fvhGdpbPatternEnableEvo[uGdpb]);
1371  server->Register("/TofRaw", fvhGdpbPatternResyncEvo[uGdpb]);
1372 
1373  server->Register("/TofRaw", fvhRawFt_gDPB[uGdpb]);
1374  server->Register("/TofRaw", fvhChCount_gDPB[uGdpb]);
1375  server->Register("/TofRates", fvhChannelRate_gDPB[uGdpb]);
1376  server->Register("/TofRaw", fvhRemapChCount_gDPB[uGdpb]);
1377  server->Register("/TofRates", fvhRemapChRate_gDPB[uGdpb]);
1378 
1379  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee) {
1380  server->Register("/TofRates",
1381  fvhFeeRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]);
1382  server->Register("/TofRates",
1383  fvhFeeErrorRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]);
1384  server->Register(
1385  "/TofRates", fvhFeeErrorRatio_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]);
1386  server->Register("/TofRates",
1387  fvhFeeRateLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]);
1388  server->Register(
1389  "/TofRates",
1390  fvhFeeErrorRateLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]);
1391  server->Register(
1392  "/TofRates",
1394  } // for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++ uFee)
1395 
1396  server->Register("/StarRaw", fvhTokenMsgType[uGdpb]);
1397  server->Register("/StarRaw", fvhTriggerRate[uGdpb]);
1398  server->Register("/StarRaw", fvhCmdDaqVsTrig[uGdpb]);
1399  server->Register("/StarRaw", fvhStarTokenEvo[uGdpb]);
1400  server->Register("/StarRaw", fvhStarTrigGdpbTsEvo[uGdpb]);
1401  server->Register("/StarRaw", fvhStarTrigStarTsEvo[uGdpb]);
1402  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1403 
1404  if (kTRUE == fbPulserModeEnable) {
1405  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
1406  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
1407  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB])
1408  server->Register("/TofDt", fvhTimeDiffPulser[uFeeA][uFeeB]);
1409 
1410  server->Register("/TofRaw", fhTimeMeanPulser);
1411  server->Register("/TofRaw", fhTimeRmsPulser);
1412  server->Register("/TofRaw", fhTimeRmsZoomFitPuls);
1413  server->Register("/TofRaw", fhTimeResFitPuls);
1414 
1415  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1416  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx)
1417  if (NULL
1419  + uGbtx])
1420  server->Register(
1421  "/TofDtEvo",
1423  + uGbtx]);
1424 
1425  for (UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB)
1426  if (NULL != fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB])
1427  server->Register("/TofDtEvo",
1428  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB]);
1429  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1430  } // if( kTRUE == fbPulserModeEnable )
1431  if (kTRUE == fbCoincMapsEnable) {
1432  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1433  server->Register("/TofCoinc", fvhCoincMapAllChanGdpb[uGdpb]);
1434  server->Register("/TofCoinc", fvhCoincMeanAllChanGdpb[uGdpb]);
1435  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1436  } // if( kTRUE == fbCoincMapsEnable )
1437 
1438  server->RegisterCommand("/Reset_All_eTOF", "bMcbmMoniTofResetHistos=kTRUE");
1439  server->RegisterCommand("/Save_All_eTof", "bMcbmMoniTofSaveHistos=kTRUE");
1440  server->RegisterCommand("/Update_PulsFit",
1441  "bMcbmMoniTofUpdateZoomedFit=kTRUE");
1442  server->RegisterCommand("/Print_Raw_Data",
1443  "bMcbmMoniTofRawDataPrint=kTRUE");
1444  server->RegisterCommand("/Print_AllHits",
1445  "bMcbmMoniTofPrintAllHitsEna=kTRUE");
1446  server->RegisterCommand("/Print_AllEps",
1447  "bMcbmMoniTofPrintAllEpochsEna=kTRUE");
1448 
1449  server->Restrict("/Reset_All_eTof", "allow=admin");
1450  server->Restrict("/Save_All_eTof", "allow=admin");
1451  server->Restrict("/Update_PulsFit", "allow=admin");
1452  server->Restrict("/Print_Raw_Data", "allow=admin");
1453  server->Restrict("/Print_AllHits", "allow=admin");
1454  server->Restrict("/Print_AllEps", "allow=admin");
1455  } // if( server )
1456 
1458  Double_t w = 10;
1459  Double_t h = 10;
1460  TCanvas* cSummary = new TCanvas("cSummary", "gDPB Monitoring Summary", w, h);
1461  cSummary->Divide(2, 3);
1462 
1463  // 1st Column: Messages types
1464  cSummary->cd(1);
1465  gPad->SetLogy();
1466  fhMessType->Draw();
1467 
1468  cSummary->cd(2);
1469  gPad->SetLogy();
1470  fhSysMessType->Draw();
1471 
1472  cSummary->cd(3);
1473  gPad->SetLogz();
1474  fhGet4MessType->Draw("colz");
1475 
1476  // 2nd Column: GET4 Errors + Epoch flags + SCm
1477  cSummary->cd(4);
1478  gPad->SetLogz();
1479  fhGet4ChanErrors->Draw("colz");
1480 
1481  cSummary->cd(5);
1482  gPad->SetLogz();
1483  fhGet4EpochFlags->Draw("colz");
1484 
1485  cSummary->cd(6);
1486  fhGet4ChanScm->Draw("colz");
1487  /*****************************/
1488 
1490  TCanvas* cSummaryGdpb =
1491  new TCanvas("cSummaryGdpb", "gDPB Monitoring Summary", w, h);
1492  cSummaryGdpb->Divide(2, 3);
1493 
1494  cSummaryGdpb->cd(1);
1495  gPad->SetLogz();
1496  fhGdpbMessType->Draw("colz");
1497 
1498  cSummaryGdpb->cd(3);
1499  gPad->SetLogz();
1500  fhGdpbSysMessType->Draw("colz");
1501 
1502  cSummaryGdpb->cd(5);
1503  gPad->SetLogz();
1504  fhGdpbEpochFlags->Draw("text colz");
1505 
1506  cSummaryGdpb->cd(4);
1507  fhGdpbEpochSyncEvo->Draw("colz");
1508 
1509  cSummaryGdpb->cd(6);
1510  gPad->SetLogz();
1511  fhGdpbEpochMissEvo->Draw("colz");
1512  /*****************************/
1513 
1515  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1516  TCanvas* cSumGdpbGet4 =
1517  new TCanvas(Form("cSumGdpbGet4_g%02u", uGdpb),
1518  Form("Summary per GET4 or channel for gDPB %02u", uGdpb),
1519  w,
1520  h);
1521  cSumGdpbGet4->Divide(2, 2);
1522 
1523  cSumGdpbGet4->cd(1);
1524  gPad->SetLogz();
1525  fvhGdpbGet4MessType[uGdpb]->Draw("colz");
1526 
1527  cSumGdpbGet4->cd(2);
1528  gPad->SetLogz();
1529  fvhGdpbGet4ChanScm[uGdpb]->Draw("colz");
1530 
1531  cSumGdpbGet4->cd(3);
1532  gPad->SetLogz();
1533  fvhGdpbGet4ChanErrors[uGdpb]->Draw("colz");
1534  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1535  /*****************************/
1536 
1538  TCanvas* cFeeRates =
1539  new TCanvas("cFeeRates", "gDPB Monitoring FEE rates", w, h);
1540  // cFeeRates->Divide(fuNrOfFeePerGdpb, fuNrOfGdpbs );
1541  cFeeRates->Divide(kuNbFeePerGbtx, kuNbGbtxPerGdpb * fuNrOfGdpbs);
1542  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1543  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee) {
1544  cFeeRates->cd(1 + uGdpb * fuNrOfFeePerGdpb + uFee);
1545  gPad->SetLogy();
1546  fvhFeeRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Draw("hist");
1547 
1548  fvhFeeErrorRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->SetLineColor(kRed);
1549  fvhFeeErrorRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Draw("same hist");
1550  } // for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee )
1551  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1552  /*****************************/
1553 
1555  TCanvas* cFeeErrRatio =
1556  new TCanvas("cFeeErrRatio", "gDPB Monitoring FEE error ratios", w, h);
1557  // cFeeErrRatio->Divide(fuNrOfFeePerGdpb, fuNrOfGdpbs );
1558  cFeeErrRatio->Divide(kuNbFeePerGbtx, kuNbGbtxPerGdpb * fuNrOfGdpbs);
1559  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1560  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee) {
1561  cFeeErrRatio->cd(1 + uGdpb * fuNrOfFeePerGdpb + uFee);
1562  gPad->SetLogy();
1563  fvhFeeErrorRatio_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Draw("hist le0");
1564  } // for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee )
1565  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1566  /*****************************/
1567 
1568 
1570  TCanvas* cFeeRatesLong =
1571  new TCanvas("cFeeRatesLong", "gDPB Monitoring FEE rates", w, h);
1572  // cFeeRatesLong->Divide(fuNrOfFeePerGdpb, fuNrOfGdpbs );
1573  cFeeRatesLong->Divide(kuNbFeePerGbtx, kuNbGbtxPerGdpb * fuNrOfGdpbs);
1574  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1575  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee) {
1576  cFeeRatesLong->cd(1 + uGdpb * fuNrOfFeePerGdpb + uFee);
1577  gPad->SetLogy();
1578  fvhFeeRateLong_gDPB[uGdpb]->Draw("hist");
1579 
1580  fvhFeeErrorRateLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->SetLineColor(
1581  kRed);
1582  fvhFeeErrorRateLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Draw(
1583  "same hist");
1584  } // for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee )
1585  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1586  /*****************************/
1587 
1589  TCanvas* cFeeErrRatioLong =
1590  new TCanvas("cFeeErrRatioLong", "gDPB Monitoring FEE error ratios", w, h);
1591  // cFeeErrRatioLong->Divide(fuNrOfFeePerGdpb, fuNrOfGdpbs );
1592  cFeeErrRatioLong->Divide(kuNbFeePerGbtx, kuNbGbtxPerGdpb * fuNrOfGdpbs);
1593  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1594  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee) {
1595  cFeeErrRatioLong->cd(1 + uGdpb * fuNrOfFeePerGdpb + uFee);
1596  gPad->SetLogy();
1597  fvhFeeErrorRatioLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Draw(
1598  "hist le0");
1599  } // for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee )
1600  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1601  /*****************************/
1602 
1604  TCanvas* cGdpbChannelCount = new TCanvas(
1605  "cGdpbChannelCount", "Integrated Get4 channel counts per gDPB", w, h);
1606  cGdpbChannelCount->Divide(1, fuNrOfGdpbs);
1607  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1608  cGdpbChannelCount->cd(1 + uGdpb);
1609  gPad->SetGridx();
1610  gPad->SetGridy();
1611  gPad->SetLogy();
1612  fvhChCount_gDPB[uGdpb]->Draw();
1613  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1614  /*****************************/
1615 
1617  TCanvas* cGdpbRemapChCount = new TCanvas(
1618  "cGdpbRemapChCount", "Integrated PADI channel counts per gDPB", w, h);
1619  cGdpbRemapChCount->Divide(1, fuNrOfGdpbs);
1620  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1621  cGdpbRemapChCount->cd(1 + uGdpb);
1622  gPad->SetGridx();
1623  gPad->SetGridy();
1624  gPad->SetLogy();
1625  fvhRemapChCount_gDPB[uGdpb]->Draw();
1626  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1627  /*****************************/
1628 
1630  TCanvas* cGdpbChannelRate =
1631  new TCanvas("cGdpbChannelRate", "Get4 channel rate per gDPB", w, h);
1632  cGdpbChannelRate->Divide(1, fuNrOfGdpbs);
1633  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1634  cGdpbChannelRate->cd(1 + uGdpb);
1635  gPad->SetGridx();
1636  gPad->SetGridy();
1637  gPad->SetLogz();
1638  fvhChannelRate_gDPB[uGdpb]->Draw("colz");
1639  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1640  /*****************************/
1641 
1643  TCanvas* cGdpbRemapChRate =
1644  new TCanvas("cGdpbRemapChRate", "PADI channel rate per gDPB", w, h);
1645  cGdpbRemapChRate->Divide(1, fuNrOfGdpbs);
1646  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1647  cGdpbRemapChRate->cd(1 + uGdpb);
1648  gPad->SetGridx();
1649  gPad->SetGridy();
1650  gPad->SetLogz();
1651  fvhRemapChRate_gDPB[uGdpb]->Draw("colz");
1652  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1653  /*****************************/
1654 
1656  TCanvas* cTotPnt = NULL;
1657  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1658  cTotPnt = new TCanvas(Form("cTot_g%02u", uGdpb),
1659  Form("gDPB %02u TOT distributions", uGdpb),
1660  w,
1661  h);
1662 
1663  cTotPnt->cd();
1664  gPad->SetGridx();
1665  gPad->SetGridy();
1666  gPad->SetLogz();
1667 
1668  fvhRawTot_gDPB[uGdpb]->Draw("colz");
1669  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1670  cTotPnt = new TCanvas("cTot_all", "TOT distributions", w, h);
1671  cTotPnt->Divide(fuNrOfGdpbs);
1672  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1673  cTotPnt->cd(1 + uGdpb);
1674  gPad->SetGridx();
1675  gPad->SetGridy();
1676  gPad->SetLogz();
1677 
1678  fvhRawTot_gDPB[uGdpb]->Draw("colz");
1679  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1680 
1681  /**************************************************/
1682 
1684  cTotPnt = NULL;
1685  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1686  cTotPnt = new TCanvas(Form("cTotRemap_g%02u", uGdpb),
1687  Form("PADI ch gDPB %02u TOT distributions", uGdpb),
1688  w,
1689  h);
1690 
1691  cTotPnt->cd();
1692  gPad->SetGridx();
1693  gPad->SetGridy();
1694  gPad->SetLogz();
1695 
1696  fvhRemapTot_gDPB[uGdpb]->Draw("colz");
1697  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1698  cTotPnt = new TCanvas("cTotRemap_all", "TOT distributions", w, h);
1699  cTotPnt->Divide(fuNrOfGdpbs);
1700  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1701  cTotPnt->cd(1 + uGdpb);
1702  gPad->SetGridx();
1703  gPad->SetGridy();
1704  gPad->SetLogz();
1705 
1706  fvhRemapTot_gDPB[uGdpb]->Draw("colz");
1707  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1708 
1709  /**************************************************/
1710 
1712  cTotPnt = NULL;
1713  for (UInt_t uMod = 0; uMod < fuNrOfModules; uMod++) {
1714  cTotPnt = new TCanvas(Form("cTotRemapSides_m%02u", uMod),
1715  Form("Sides ch module %02u TOT distributions", uMod),
1716  w,
1717  h);
1718  cTotPnt->Divide(1, 2);
1719 
1720  cTotPnt->cd(1);
1721  gPad->SetGridx();
1722  gPad->SetGridy();
1723  gPad->SetLogz();
1724 
1725  fvhRemapTotSideA_mod[uMod]->Draw("colz");
1726 
1727  cTotPnt->cd(2);
1728  gPad->SetGridx();
1729  gPad->SetGridy();
1730  gPad->SetLogz();
1731  fvhRemapTotSideB_mod[uMod]->Draw("colz");
1732  } // for( UInt_t uMod = 0; uMod < fuNrOfModules; uMod ++ )
1733 
1734  /**************************************************/
1735 
1737  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; uGdpb++) {
1738  TCanvas* cStarToken =
1739  new TCanvas(Form("cStarToken_g%02u", uGdpb),
1740  Form("STAR token detection info for gDPB %02u", uGdpb),
1741  w,
1742  h);
1743  cStarToken->Divide(2, 2);
1744 
1745  cStarToken->cd(1);
1746  fvhTriggerRate[uGdpb]->Draw();
1747 
1748  cStarToken->cd(2);
1749  fvhCmdDaqVsTrig[uGdpb]->Draw("colz");
1750 
1751  cStarToken->cd(3);
1752  fvhStarTokenEvo[uGdpb]->Draw();
1753 
1754  cStarToken->cd(4);
1755  fvhStarTrigGdpbTsEvo[uGdpb]->Draw("hist le0");
1756  fvhStarTrigStarTsEvo[uGdpb]->SetLineColor(kRed);
1757  fvhStarTrigStarTsEvo[uGdpb]->Draw("same hist le0");
1758  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; uGdpb ++)
1759  /*****************************/
1760 
1761  if (kTRUE == fbPulserModeEnable) {
1763  TCanvas* cPulser = new TCanvas(
1764  "cPulser",
1765  "Time difference RMS for pulser channels when FEE pulser mode is ON",
1766  w,
1767  h);
1768  cPulser->Divide(2, 2);
1769 
1770  cPulser->cd(1);
1771  gPad->SetGridx();
1772  gPad->SetGridy();
1773  fhTimeRmsPulser->Draw("colz");
1774 
1775  cPulser->cd(2);
1776  gPad->SetGridx();
1777  gPad->SetGridy();
1778  fhTimeMeanPulser->Draw("colz");
1779 
1780  cPulser->cd(3);
1781  gPad->SetGridx();
1782  gPad->SetGridy();
1783  fhTimeRmsZoomFitPuls->Draw("colz");
1784 
1785  cPulser->cd(4);
1786  gPad->SetGridx();
1787  gPad->SetGridy();
1788  fhTimeResFitPuls->Draw("colz");
1789  /*****************************/
1790 
1792  TCanvas* cPulserEvo = new TCanvas(
1793  "cPulserEvo",
1794  "Time difference evolution between 1st FEE of 1st GBTx of gDPB pairs",
1795  w,
1796  h);
1797  cPulserEvo->Divide(1, fuNrOfGdpbs - 1);
1798  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs - 1; uGdpb++) {
1799  cPulserEvo->cd(1 + uGdpb);
1800  gPad->SetGridx();
1801  gPad->SetGridy();
1802  if (NULL != fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpb + 1])
1803  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpb + 1]->Draw();
1804 
1805  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs - 1; uGdpb ++)
1806  /*****************************/
1808  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; uGdpb++) {
1809  TCanvas* cPulserEvoGbtx =
1810  new TCanvas(Form("cPulserEvoGbtx%02u", uGdpb),
1811  Form("Time difference evolution between 1st FEE of GBTx "
1812  "pairs in gDPB %02u",
1813  uGdpb),
1814  w,
1815  h);
1816  cPulserEvoGbtx->Divide(1, kuNbGbtxPerGdpb - 1);
1817 
1818  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx) {
1819  cPulserEvoGbtx->cd(1 + uGbtx);
1820  gPad->SetGridx();
1821  gPad->SetGridy();
1822 
1823  if (NULL
1825  + uGbtx])
1826  fvhPulserTimeDiffEvoGbtxGbtx[uGdpb * (kuNbGbtxPerGdpb - 1) + uGbtx]
1827  ->Draw();
1828  } // for( UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx )
1829  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; uGdpb ++)
1830  /*****************************/
1831  } // if( kTRUE == fbPulserModeEnable )
1832 
1834  for (UInt_t uMod = 0; uMod < fuNrOfModules; uMod++) {
1835  TCanvas* cModRates =
1836  new TCanvas(Form("cModRate_m%02u", uMod),
1837  Form("Hit and error Rates for module %02u", uMod),
1838  w,
1839  h);
1840  cModRates->cd();
1841  gPad->SetLogy();
1842  fvhModRate[uMod]->Draw("hist");
1843 
1844  fvhModErrorRate[uMod]->SetLineColor(kRed);
1845  fvhModErrorRate[uMod]->Draw("same hist");
1846  } // for( UInt_t uMod = 0; uMod < fuNrOfModules; uMod ++ )
1847  /*****************************/
1848 
1850  // Try to recover canvas in case it was created already by another monitor
1851  // If not existing, create it
1852  fcMsSizeAll = dynamic_cast<TCanvas*>(gROOT->FindObject("cMsSizeAll"));
1853  if (NULL == fcMsSizeAll) {
1854  fcMsSizeAll =
1855  new TCanvas("cMsSizeAll", "Evolution of MS size in last 300 s", w, h);
1856  fcMsSizeAll->Divide(4, 3);
1857  LOG(info) << "Created MS size canvas in TOF monitor";
1858  } // if( NULL == fcMsSizeAll )
1859  else
1860  LOG(info) << "Recovered MS size canvas in TOF monitor";
1861 
1862  LOG(info) << "Leaving CreateHistograms";
1863 }
1864 
1865 Bool_t CbmStar2019MonitorTof::DoUnpack(const fles::Timeslice& ts,
1866  size_t component) {
1868  LOG(info) << "Reset eTOF STAR histos ";
1869  ResetAllHistos();
1870  bMcbmMoniTofResetHistos = kFALSE;
1871  } // if( bMcbmMoniTofResetHistos )
1872  if (bMcbmMoniTofSaveHistos) {
1873  LOG(info) << "Start saving eTOF STAR histos ";
1874  SaveAllHistos("data/histos_Shift_StarTof.root");
1875  bMcbmMoniTofSaveHistos = kFALSE;
1876  } // if( bSaveStsHistos )
1878  UpdateZoomedFit();
1879  bMcbmMoniTofUpdateZoomedFit = kFALSE;
1880  } // if (bMcbmMoniTofUpdateZoomedFit)
1883  bMcbmMoniTofRawDataPrint = kFALSE;
1884  } // if( bMcbmMoniTofRawDataPrint )
1887  bMcbmMoniTofPrintAllHitsEna = kFALSE;
1888  } // if( bMcbmMoniTofPrintAllHitsEna )
1891  bMcbmMoniTofPrintAllHitsEna = kFALSE;
1892  } // if( bMcbmMoniTofPrintAllEpochsEna )
1893 
1895  std::chrono::time_point<std::chrono::system_clock> timeCurrent =
1896  std::chrono::system_clock::now();
1897  std::chrono::duration<double> elapsed_seconds =
1898  timeCurrent - fTimeLastHistoSaving;
1899  if (0 == fTimeLastHistoSaving.time_since_epoch().count()) {
1900  fTimeLastHistoSaving = timeCurrent;
1901  // fulNbBuiltSubEventLastPrintout = fulNbBuiltSubEvent;
1902  // fulNbStarSubEventLastPrintout = fulNbStarSubEvent;
1903  } // if( 0 == fTimeLastHistoSaving.time_since_epoch().count() )
1904  else if (300 < elapsed_seconds.count()) {
1905  std::time_t cTimeCurrent =
1906  std::chrono::system_clock::to_time_t(timeCurrent);
1907  char tempBuff[80];
1908  std::strftime(tempBuff, 80, "%F %T", localtime(&cTimeCurrent));
1909  /*
1910  LOG(info) << "CbmTofStarEventBuilder2018::DoUnpack => " << tempBuff
1911  << " Total number of Built events: " << std::setw(9) << fulNbBuiltSubEvent
1912  << ", " << std::setw(9) << (fulNbBuiltSubEvent - fulNbBuiltSubEventLastPrintout)
1913  << " events in last " << std::setw(4) << elapsed_seconds.count() << " s";
1914  fTimeLastPrintoutNbStarEvent = timeCurrent;
1915  fulNbBuiltSubEventLastPrintout = fulNbBuiltSubEvent;
1916 */
1917  fTimeLastHistoSaving = timeCurrent;
1918  SaveAllHistos("data/histos_shift.root");
1919  } // else if( 300 < elapsed_seconds.count() )
1920 
1921  LOG(debug1) << "Timeslice contains " << ts.num_microslices(component)
1922  << "microslices.";
1923 
1925  UInt_t uNbMsLoop = fuNbCoreMsPerTs;
1926  if (kFALSE == fbIgnoreOverlapMs) uNbMsLoop += fuNbOverMsPerTs;
1927 
1928  Int_t messageType = -111;
1929  Double_t dTsStartTime = -1;
1930 
1932  for (UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx++) {
1933  if (fuMsAcceptsPercent < uMsIdx) continue;
1934 
1935  fuCurrentMs = uMsIdx;
1936 
1937  if (0 == fulCurrentTsIndex && 0 == uMsIdx) {
1938  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
1939  ++uMsCompIdx) {
1940  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
1941  auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
1942  LOG(info)
1943  << "hi hv eqid flag si sv idx/start crc size offset";
1944  LOG(info) << Form(
1945  "%02x %02x %04x %04x %02x %02x %016lx %08x %08x %016lx",
1946  static_cast<unsigned int>(msDescriptor.hdr_id),
1947  static_cast<unsigned int>(msDescriptor.hdr_ver),
1948  msDescriptor.eq_id,
1949  msDescriptor.flags,
1950  static_cast<unsigned int>(msDescriptor.sys_id),
1951  static_cast<unsigned int>(msDescriptor.sys_ver),
1952  msDescriptor.idx,
1953  msDescriptor.crc,
1954  msDescriptor.size,
1955  msDescriptor.offset);
1956  } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
1957  } // if( 0 == fulCurrentTsIndex && 0 == uMsIdx )
1958 
1960  for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size();
1961  ++uMsCompIdx) {
1962  constexpr uint32_t kuBytesPerMessage = 8;
1963 
1964  UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
1965  auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
1966  fiEquipmentId = msDescriptor.eq_id;
1967  fdMsIndex = static_cast<double>(msDescriptor.idx);
1968  const uint8_t* msContent =
1969  reinterpret_cast<const uint8_t*>(ts.content(uMsComp, uMsIdx));
1970 
1971  uint32_t size = msDescriptor.size;
1972  // fulLastMsIdx = msDescriptor.idx;
1973  if (size > 0)
1974  LOG(debug) << "Microslice: " << msDescriptor.idx
1975  << " has size: " << size;
1976  /*
1977  if( numCompMsInTs - fuOverlapMsNb <= m )
1978  {
1979 // LOG(info) << "Ignore overlap Microslice: " << msDescriptor.idx;
1980  continue;
1981  } // if( numCompMsInTs - fuOverlapMsNb <= m )
1982 */
1983  if (0 == uMsIdx && 0 == uMsCompIdx) dTsStartTime = (1e-9) * fdMsIndex;
1984 
1985  if (fdStartTimeMsSz < 0) fdStartTimeMsSz = (1e-9) * fdMsIndex;
1986  fvhMsSzPerLink[uMsComp]->Fill(size);
1987  if (2 * fuHistoryHistoSize < (1e-9) * fdMsIndex - fdStartTimeMsSz) {
1988  // Reset the evolution Histogram and the start time when we reach the end of the range
1989  fvhMsSzTimePerLink[uMsComp]->Reset();
1990  fdStartTimeMsSz = (1e-9) * fdMsIndex;
1991  } // if( 2 * fuHistoryHistoSize < (1e-9) * fdMsIndex - fdStartTimeMsSz )
1992  fvhMsSzTimePerLink[uMsComp]->Fill((1e-9) * fdMsIndex - fdStartTimeMsSz,
1993  size);
1994 
1995  // If not integer number of message in input buffer, print warning/error
1996  if (0 != (size % kuBytesPerMessage))
1997  LOG(error) << "The input microslice buffer does NOT "
1998  << "contain only complete nDPB messages!";
1999 
2000  // Compute the number of complete messages in the input microslice buffer
2001  uint32_t uNbMessages =
2002  (size - (size % kuBytesPerMessage)) / kuBytesPerMessage;
2003 
2004  // Get the gDPB ID from the MS header
2006 
2008  auto it = fGdpbIdIndexMap.find(fuGdpbId);
2009  if (it == fGdpbIdIndexMap.end()) {
2010  LOG(info)
2011  << "---------------------------------------------------------------";
2012  LOG(info)
2013  << "hi hv eqid flag si sv idx/start crc size offset";
2014  LOG(info) << Form(
2015  "%02x %02x %04x %04x %02x %02x %016lx %08x %08x %016lx",
2016  static_cast<unsigned int>(msDescriptor.hdr_id),
2017  static_cast<unsigned int>(msDescriptor.hdr_ver),
2018  msDescriptor.eq_id,
2019  msDescriptor.flags,
2020  static_cast<unsigned int>(msDescriptor.sys_id),
2021  static_cast<unsigned int>(msDescriptor.sys_ver),
2022  msDescriptor.idx,
2023  msDescriptor.crc,
2024  msDescriptor.size,
2025  msDescriptor.offset);
2026  LOG(fatal) << "Could not find the gDPB index for AFCK id 0x" << std::hex
2027  << fuGdpbId << std::dec << " in timeslice "
2028  << fulCurrentTsIndex << " in microslice " << fdMsIndex
2029  << " component " << uMsCompIdx << "\n"
2030  << "If valid this index has to be added in the TOF "
2031  "parameter file in the RocIdArray field";
2032  continue;
2033  } // if( it == fGdpbIdIndexMap.end() )
2034  else
2036 
2037  // Prepare variables for the loop on contents
2038  const uint64_t* pInBuff = reinterpret_cast<const uint64_t*>(msContent);
2039  for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
2040  // Fill message
2041  uint64_t ulData = static_cast<uint64_t>(pInBuff[uIdx]);
2042 
2044  if (0 == uIdx && kFALSE == fbOldFwData) {
2045  ProcessEpochCycle(ulData);
2046  continue;
2047  } // if( 0 == uIdx && kFALSE == fbOldFwData )
2048 
2049  gdpbv100::Message mess(ulData);
2050 
2052  || gLogger->IsLogNeeded(fair::Severity::debug2)) {
2053  mess.printDataCout();
2055  } // if( fuRawDataPrintMsgIdx < fuRawDataPrintMsgNb || gLogger->IsLogNeeded( fair::Severity::debug2 ) )
2056 
2057  // Increment counter for different message types
2058  // and fill the corresponding histogram
2059  messageType = mess.getMessageType();
2060  fviMsgCounter[messageType]++;
2061  fhMessType->Fill(messageType);
2062  fhGdpbMessType->Fill(messageType, fuGdpbNr);
2063 
2067  if (fuGdpbNr == fuDiamondDpbIdx) fuGet4Id = mess.getGdpbGenChipId();
2069 
2070  if (fuNrOfGet4PerGdpb <= fuGet4Id && !mess.isStarTrigger()
2072  LOG(warning) << "Message with Get4 ID too high: " << fuGet4Id
2073  << " VS " << fuNrOfGet4PerGdpb << " set in parameters.";
2074 
2075  switch (messageType) {
2076  case gdpbv100::MSG_HIT: {
2077  if (mess.getGdpbHitIs24b()) {
2078  fhGet4MessType->Fill(fuGet4Nr, 4);
2080  PrintGenInfo(mess);
2081  } // if( getGdpbHitIs24b() )
2082  else {
2083  fhGet4MessType->Fill(fuGet4Nr, 0);
2085  fvmEpSupprBuffer[fuGet4Nr].push_back(mess);
2086  } // else of if( getGdpbHitIs24b() )
2087  break;
2088  } // case gdpbv100::MSG_HIT:
2089  case gdpbv100::MSG_EPOCH: {
2091  if (1 == mess.getGdpbEpSync()) {
2092  fhGdpbEpochFlags->Fill(fuGdpbNr, 0);
2093  fhGdpbEpochSyncEvo->Fill((1e-9) * fdMsIndex - fdStartTimeMsSz,
2094  fuGdpbNr);
2095  } // if (1 == mess.getGdpbEpSync())
2096 
2097  if (1 == mess.getGdpbEpDataLoss())
2098  fhGdpbEpochFlags->Fill(fuGdpbNr, 1);
2099 
2100  if (1 == mess.getGdpbEpEpochLoss())
2101  fhGdpbEpochFlags->Fill(fuGdpbNr, 2);
2102 
2103  if (1 == mess.getGdpbEpMissmatch()) {
2104  fhGdpbEpochFlags->Fill(fuGdpbNr, 3);
2105  fhGdpbEpochMissEvo->Fill((1e-9) * fdMsIndex - fdStartTimeMsSz,
2106  fuGdpbNr);
2107  } // if (1 == mess.getGdpbEpMissmatch())
2108 
2109  for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb;
2110  uGet4Index++) {
2111  fuGet4Id = uGet4Index;
2113  gdpbv100::Message tmpMess(mess);
2114  tmpMess.setGdpbGenChipId(uGet4Index);
2115 
2116  fhGet4MessType->Fill(fuGet4Nr, 1);
2118  FillEpochInfo(tmpMess);
2119  } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGetIndex ++ )
2120 
2121  if (kTRUE == fbPrintAllEpochsEnable) {
2122  LOG(info) << "Epoch: " << Form("0x%08x ", fuGdpbId) << ", Merg"
2123  << ", Link " << std::setw(1) << mess.getGdpbEpLinkId()
2124  << ", epoch " << std::setw(8)
2125  << mess.getGdpbEpEpochNb() << ", Sync "
2126  << std::setw(1) << mess.getGdpbEpSync()
2127  << ", Data loss " << std::setw(1)
2128  << mess.getGdpbEpDataLoss() << ", Epoch loss "
2129  << std::setw(1) << mess.getGdpbEpEpochLoss()
2130  << ", Epoch miss " << std::setw(1)
2131  << mess.getGdpbEpMissmatch();
2132  } // if( kTRUE == fbPrintAllEpochsEnable )
2133  } // if this epoch message is a merged one valid for all chips
2134  else {
2135  fhGet4MessType->Fill(fuGet4Nr, 1);
2138  // FillEpochInfo(mess);
2139 
2140  if (kTRUE == fbPrintAllEpochsEnable) {
2141  LOG(info) << "Epoch: " << Form("0x%08x ", fuGdpbId) << ", "
2142  << std::setw(4) << fuGet4Nr << ", Link "
2143  << std::setw(1) << mess.getGdpbEpLinkId()
2144  << ", epoch " << std::setw(8)
2145  << mess.getGdpbEpEpochNb() << ", Sync "
2146  << std::setw(1) << mess.getGdpbEpSync()
2147  << ", Data loss " << std::setw(1)
2148  << mess.getGdpbEpDataLoss() << ", Epoch loss "
2149  << std::setw(1) << mess.getGdpbEpEpochLoss()
2150  << ", Epoch miss " << std::setw(1)
2151  << mess.getGdpbEpMissmatch();
2152  } // if( kTRUE == fbPrintAllEpochsEnable )
2153  } // if single chip epoch message
2154  break;
2155  } // case gdpbv100::MSG_EPOCH:
2156  case gdpbv100::MSG_SLOWC: {
2157  fhGet4MessType->Fill(fuGet4Nr, 2);
2159  PrintSlcInfo(mess);
2160  break;
2161  } // case gdpbv100::MSG_SLOWC:
2162  case gdpbv100::MSG_SYST: {
2163  fhSysMessType->Fill(mess.getGdpbSysSubType());
2166  fhGet4MessType->Fill(fuGet4Nr, 3);
2168 
2169  UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
2170  if (0 <= fdStartTime) {
2172  ->Fill(1e-9
2174  - fdStartTime));
2176  ->Fill(1e-9
2178  - fdStartTime),
2179  1,
2180  1);
2181 
2182  UInt_t uGbtxNr = (uFeeNr / kuNbFeePerGbtx);
2183  UInt_t uGbtxNrInSys = fuGdpbNr * kuNbGbtxPerGdpb + uGbtxNr;
2184  fvhModErrorRate[fviModuleId[uGbtxNrInSys]]->Fill(
2185  1e-9
2187  - fdStartTime));
2188  fvhModErrorRatio[fviModuleId[uGbtxNrInSys]]->Fill(
2189  1e-9
2191  - fdStartTime),
2192  1,
2193  1);
2194  } // if (0 <= fdStartTime)
2195  if (0 <= fdStartTimeLong) {
2197  ->Fill(1e-9 / 60.0
2199  - fdStartTimeLong),
2200  1 / 60.0);
2202  + uFeeNr]
2203  ->Fill(1e-9 / 60.0
2205  - fdStartTimeLong),
2206  1,
2207  1 / 60.0);
2208  } // if (0 <= fdStartTime)
2209 
2210  Int_t dGdpbChId =
2212  Int_t dFullChId =
2214  switch (mess.getGdpbSysErrData()) {
2216  fhGet4ChanErrors->Fill(dFullChId, 0);
2217  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 0);
2218  break;
2220  fhGet4ChanErrors->Fill(dFullChId, 1);
2221  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 1);
2222  break;
2224  fhGet4ChanErrors->Fill(dFullChId, 2);
2225  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 2);
2226  break;
2228  fhGet4ChanErrors->Fill(dFullChId, 3);
2229  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 3);
2230  break;
2232  fhGet4ChanErrors->Fill(dFullChId, 4);
2233  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 4);
2234  break;
2236  fhGet4ChanErrors->Fill(dFullChId, 5);
2237  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 5);
2238  break;
2240  fhGet4ChanErrors->Fill(dFullChId, 6);
2241  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 6);
2242  break;
2244  fhGet4ChanErrors->Fill(dFullChId, 7);
2245  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 7);
2246  break;
2248  fhGet4ChanErrors->Fill(dFullChId, 8);
2249  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 8);
2250  break;
2252  fhGet4ChanErrors->Fill(dFullChId, 9);
2253  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 9);
2254  break;
2256  fhGet4ChanErrors->Fill(dFullChId, 10);
2257  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 10);
2258  break;
2260  fhGet4ChanErrors->Fill(dFullChId, 11);
2261  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 11);
2262  break;
2264  fhGet4ChanErrors->Fill(dFullChId, 12);
2265  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 12);
2266  break;
2268  fhGet4ChanErrors->Fill(dFullChId, 13);
2269  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 13);
2270  break;
2272  fhGet4ChanErrors->Fill(dFullChId, 14);
2273  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 14);
2274  break;
2276  fhGet4ChanErrors->Fill(dFullChId, 15);
2277  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 15);
2278  break;
2280  fhGet4ChanErrors->Fill(dFullChId, 16);
2281  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 16);
2282  break;
2284  fhGet4ChanErrors->Fill(dFullChId, 17);
2285  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 17);
2286  break;
2288  fhGet4ChanErrors->Fill(dFullChId, 18);
2289  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 18);
2290  break;
2292  fhGet4ChanErrors->Fill(dFullChId, 19);
2293  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 19);
2294  break;
2296  fhGet4ChanErrors->Fill(dFullChId, 20);
2297  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 20);
2298  break;
2299  default: // Corrupt error or not yet supported error
2300  fhGet4ChanErrors->Fill(dFullChId, 21);
2301  fvhGdpbGet4ChanErrors[fuGdpbNr]->Fill(dGdpbChId, 21);
2302  break;
2303  } // Switch( mess.getGdpbSysErrData() )
2304  } // if( gdpbv100::SYSMSG_GET4_EVENT == mess.getGdpbSysSubType() )
2305  if (gdpbv100::SYS_PATTERN == mess.getGdpbSysSubType()) {
2307  FillPattInfo(mess);
2308  } // if( gdpbv100::SYS_PATTERN == mess.getGdpbSysSubType() )
2309  PrintSysInfo(mess);
2310  break;
2311  } // case gdpbv100::MSG_SYST:
2316  // fhGet4MessType->Fill(fuGet4Nr, 5);
2317  FillStarTrigInfo(mess);
2318  break;
2319  default:
2320  LOG(error) << "Message type " << std::hex << std::setw(2)
2321  << static_cast<uint16_t>(messageType)
2322  << " not included in Get4 unpacker.";
2323  } // switch( mess.getMessageType() )
2324  } // for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx ++)
2325  } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
2326 
2328  if (kTRUE == fbPulserModeEnable) {
2330  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeA) {
2331  if (1 != fvuFeeNbHitsLastMs[uFeeA]) {
2333  fvuFeeNbHitsLastMs[uFeeA] = 0;
2334  continue;
2335  } // if( 1 != fvuFeeNbHitsLastMs[ uFeeA ] )
2336 
2337  UInt_t uGdpbNr = uFeeA / fuNrOfFeePerGdpb;
2338  UInt_t uGbtxNr = uFeeA / kuNbFeePerGbtx;
2340  for (UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs;
2341  ++uFeeB) {
2342  if (1 != fvuFeeNbHitsLastMs[uFeeB]) continue;
2343 
2344  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB]) {
2345  Double_t dTimeDiff =
2346  1e3 * (fdTsLastPulserHit[uFeeB] - fdTsLastPulserHit[uFeeA]);
2347  if (TMath::Abs(dTimeDiff) < kdMaxDtPulserPs) {
2348  fvhTimeDiffPulser[uFeeA][uFeeB]->Fill(dTimeDiff);
2349 
2351  if (0 == uFeeA % kuNbFeePerGbtx && 0 == uFeeB % kuNbFeePerGbtx) {
2353  if (uGdpbNr == uFeeB / fuNrOfFeePerGdpb) {
2354  if (0 == uGbtxNr) {
2355  UInt_t uPlotIdx =
2356  uGdpbNr * (kuNbGbtxPerGdpb - 1)
2357  + (uFeeB - uGdpbNr * fuNrOfFeePerGdpb) / kuNbFeePerGbtx
2358  - 1;
2359  fvhPulserTimeDiffEvoGbtxGbtx[uPlotIdx]->Fill(
2360  1e-9 / 60.0 * (fdTsLastPulserHit[uFeeA] - fdStartTime),
2361  dTimeDiff);
2362  } // if( 0 == uGbtxNr )
2363  } // if( uGdpbNr == uFeeB / fuNrOfFeePerGdpb )
2364  else // if( NULL != fvvhPulserTimeDiffEvoGdpbGdpb[ uFeeB / fuNrOfFeePerGdpb ][ uGdpbNr ] )
2365  {
2367  if (0 == uGbtxNr && 0 == uFeeB / kuNbFeePerGbtx)
2368  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpbNr][uFeeB
2369  / fuNrOfFeePerGdpb]
2370  ->Fill(1e-9 / 60.0
2371  * (fdTsLastPulserHit[uFeeA] - fdStartTime),
2372  dTimeDiff);
2373  } // else of if( uGdpbNr == uFeeB / fuNrOfFeePerGdpb )
2374  } // if( 0 == uFeeA % kuNbFeePerGbtx && 0 == uFeeB % kuNbFeePerGbtx )
2375  } // if( TMath::Abs( dTimeDiff ) < kdMaxDtPulserPs )
2376  // else if( 10 == uFeeA && 20 == uFeeB )
2377  // LOG(info) << "new in 10 " << dTimeDiff;
2378  } // if( NULL != fvhTimeDiffPulser[uFeeA][uFeeB] )
2379  } // for( UInt_t uFeeB = uFeeA + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeB)
2380 
2382  fvuFeeNbHitsLastMs[uFeeA] = 0;
2383  } // for( UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; ++uFeeA)
2384  } // if( kTRUE == fbPulserModeEnable )
2385 
2386  if (kTRUE == fbCoincMapsEnable) {
2387  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2388  for (UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerGdpb; ++uChanA) {
2389  if (0 == fvuCoincNbHitsLastMs[uGdpb][uChanA]) {
2391  continue;
2392  } // if( 0 == fvuCoincNbHitsLastMs[ uGdpb ][ uChanA ] )
2393 
2394  for (UInt_t uChanB = uChanA + 1; uChanB < fuNrOfChannelsPerGdpb;
2395  ++uChanB) {
2396  if (0 == fvuCoincNbHitsLastMs[uGdpb][uChanB]) {
2398  continue;
2399  } // if( 0 == fvuCoincNbHitsLastMs[ uGdpb ][ uChanB ] )
2400 
2401  Double_t dTimeDiff = 1e3
2402  * (fvdCoincTsLastHit[uGdpb][uChanB]
2403  - fvdCoincTsLastHit[uGdpb][uChanA]);
2404 
2405  fvhCoincMeanAllChanGdpb[uGdpb]->Fill(uChanA, uChanB, dTimeDiff);
2406 
2407  if (TMath::Abs(dTimeDiff) < kdMaxDtPulserPs) {
2408  fvhCoincMapAllChanGdpb[uGdpb]->Fill(uChanA, uChanB);
2409  } // if( TMath::Abs( dTimeDiff ) < kdMaxDtPulserPs )
2410  } // for( UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerGdpb; ++uChan A )
2411 
2413  fvuCoincNbHitsLastMs[uGdpb][uChanA] = 0;
2414  } // for( UInt_t uChanA = 0; uChanA < fuNrOfChannelsPerGdpb; ++uChan A )
2415  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2416  } // if( kTRUE == fbCoincMapsEnable )
2417  } // for( UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx ++ )
2418 
2419  // Update RMS plots only every 10s in data
2420  if (kTRUE == fbPulserModeEnable) {
2421  if (10.0 < dTsStartTime - fdLastRmsUpdateTime) {
2422  // Reset summary histograms for safety
2423  fhTimeMeanPulser->Reset();
2424  fhTimeRmsPulser->Reset();
2425 
2426  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
2427  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
2428  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB]) {
2429  fhTimeMeanPulser->Fill(
2430  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetMean());
2431  fhTimeRmsPulser->Fill(
2432  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetRMS());
2433  } // for( UInt_t uChan = 0; uChan < kuNbChanTest - 1; uChan++)
2434  fdLastRmsUpdateTime = dTsStartTime;
2435  } // if( 10.0 < dTsStartTime - fdLastRmsUpdateTime )
2436  } // if( kTRUE == fbPulserModeEnable )
2437 
2439 
2440  return kTRUE;
2441 }
2442 
2443 void CbmStar2019MonitorTof::ProcessEpochCycle(uint64_t ulCycleData) {
2444  uint64_t ulEpochCycleVal = ulCycleData & gdpbv100::kulEpochCycleFieldSz;
2445 
2447  || gLogger->IsLogNeeded(fair::Severity::debug2)) {
2448  LOG(info) << "CbmMcbm2018MonitorTof::ProcessEpochCyle => "
2449  << Form(" TS %5lu MS %3lu In data 0x%016lX Cycle 0x%016lX",
2451  fuCurrentMs,
2452  ulCycleData,
2453  ulEpochCycleVal);
2455  } // if( fuRawDataPrintMsgIdx < fuRawDataPrintMsgNb || gLogger->IsLogNeeded( fair::Severity::debug2 ) )
2456 
2457  for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index++) {
2458  fuGet4Id = uGet4Index;
2460  /*
2461  if( !( ulEpochCycleVal == fvulCurrentEpochCycle[fuGet4Nr] ||
2462  ulEpochCycleVal == fvulCurrentEpochCycle[fuGet4Nr] + 1 ) )
2463  LOG(error) << "CbmMcbm2018MonitorTof::ProcessEpochCyle => "
2464  << " Missmatch in epoch cycles detected, probably fake cycles due to epoch index corruption! "
2465  << Form( " Current cycle 0x%09X New cycle 0x%09X", fvulCurrentEpochCycle[fuGet4Nr], ulEpochCycleVal );
2466 */
2467  fvulCurrentEpochCycle[fuGet4Nr] = ulEpochCycleVal;
2468  } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index ++ )
2469  return;
2470 }
2471 
2473  UInt_t uChannel = mess.getGdpbHitChanId();
2474  UInt_t uTot = mess.getGdpbHit32Tot();
2475  UInt_t uFts = mess.getGdpbHitFineTs();
2476 
2477  ULong64_t ulCurEpochGdpbGet4 = fvulCurrentEpoch[fuGet4Nr];
2478 
2479  // In Ep. Suppr. Mode, receive following epoch instead of previous
2480  if (0 < ulCurEpochGdpbGet4)
2481  ulCurEpochGdpbGet4--;
2482  else
2483  ulCurEpochGdpbGet4 = gdpbv100::kuEpochCounterSz; // Catch epoch cycle!
2484 
2485  UInt_t uChannelNr = fuGet4Id * fuNrOfChannelsPerGet4 + uChannel;
2486  UInt_t uChannelNrInFee =
2488  UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
2489  UInt_t uFeeNrInSys = fuGdpbNr * fuNrOfFeePerGdpb + uFeeNr;
2490  UInt_t uRemappedChannelNr =
2491  uFeeNr * fuNrOfChannelsPerFee + fvuGet4ToPadi[uChannelNrInFee];
2492  UInt_t uGbtxNr = (uFeeNr / kuNbFeePerGbtx);
2493  UInt_t uFeeInGbtx = (uFeeNr % kuNbFeePerGbtx);
2494  UInt_t uGbtxNrInSys = fuGdpbNr * kuNbGbtxPerGdpb + uGbtxNr;
2495 
2496  ULong_t ulHitTime = mess.getMsgFullTime(ulCurEpochGdpbGet4);
2497  Double_t dHitTime = mess.getMsgFullTimeD(ulCurEpochGdpbGet4);
2498 
2499  // In 32b mode the coarse counter is already computed back to 112 FTS bins
2500  // => need to hide its contribution from the Finetime
2501  // => FTS = Fullt TS modulo 112
2502  uFts = mess.getGdpbHitFullTs() % 112;
2503 
2504  fvhChCount_gDPB[fuGdpbNr]->Fill(uChannelNr);
2505  fvhRawFt_gDPB[fuGdpbNr]->Fill(uChannelNr, uFts);
2506  fvhRawTot_gDPB[fuGdpbNr]->Fill(uChannelNr, uTot);
2507 
2509  fvhRemapChCount_gDPB[fuGdpbNr]->Fill(uRemappedChannelNr);
2510  fvhRemapTot_gDPB[fuGdpbNr]->Fill(uRemappedChannelNr, uTot);
2511 
2512  if (uGbtxNrInSys < fuNrOfGbtx) {
2513  UInt_t uOffset = uGbtxNrInSys * kuNbFeeSide * fuNrOfChannelsPerFee;
2514  if (fviRpcSide[uGbtxNrInSys])
2515  fvhRemapTotSideB_mod[fviModuleId[uGbtxNrInSys]]->Fill(
2516  uRemappedChannelNr - uOffset, uTot);
2517  else
2518  fvhRemapTotSideA_mod[fviModuleId[uGbtxNrInSys]]->Fill(
2519  uRemappedChannelNr - uOffset, uTot);
2520  } // if( uGbtxNrInSys < fuNrOfGbtx )
2521  /*
2522  switch( ( uRemappedChannelNr / fuNrOfChannelsPerFee ) / kuNbFeeSide )
2523  {
2524  case 0: // Module 1 Side A
2525  fvhRemapTotSideA_mod[ fuGdpbNr ]->Fill( uRemappedChannelNr , uTot);
2526  case 1: // Module 1 Side B
2527  fvhRemapTotSideB_mod[ fuGdpbNr ]->Fill( uRemappedChannelNr - 160 , uTot);
2528  case 2: // Module 2 Side A
2529  fvhRemapTotSideA_mod[ fuGdpbNr ]->Fill( uRemappedChannelNr - 160 , uTot);
2530  case 3: // Module 2 Side B
2531  fvhRemapTotSideB_mod[ fuGdpbNr ]->Fill( uRemappedChannelNr - 320, uTot);
2532  } // switch( ( uRemappedChannelNr / fuNrOfChannelsPerFee ) % kuNbFeeSide )
2533 */
2534  // In Run rate evolution
2535  if (fdStartTime < 0) fdStartTime = dHitTime;
2536 
2537  // Reset the evolution Histogram and the start time when we reach the end of the range
2538  if (fuHistoryHistoSize < 1e-9 * (dHitTime - fdStartTime)) {
2540  fdStartTime = dHitTime;
2541  } // if( fuHistoryHistoSize < 1e-9 * (dHitTime - fdStartTime) )
2542 
2543  // In Run rate evolution
2544  if (fdStartTimeLong < 0) fdStartTimeLong = dHitTime;
2545 
2546  // Reset the evolution Histogram and the start time when we reach the end of the range
2547  if (fuHistoryHistoSizeLong < 1e-9 * (dHitTime - fdStartTimeLong) / 60.0) {
2549  fdStartTimeLong = dHitTime;
2550  } // if( fuHistoryHistoSize < 1e-9 * (dHitTime - fdStartTime) / 60.0 )
2551 
2553  if (kTRUE == fbPulserModeEnable) {
2556  if (gdpbv100::kuFeePulserChannel == uChannelNrInFee) {
2557  fdTsLastPulserHit[uFeeNrInSys] = dHitTime;
2558  fvuFeeNbHitsLastMs[uFeeNrInSys]++;
2559  /*
2561  for( UInt_t uFeeB = 0; uFeeB < uFeeNrInSys; uFeeB++)
2562  if( NULL != fvhTimeDiffPulser[uFeeB][uFeeNrInSys] )
2563  {
2564  Double_t dTimeDiff = 1e3 * ( fdTsLastPulserHit[ uFeeNrInSys ] - fdTsLastPulserHit[ uFeeB ] );
2565  if( TMath::Abs( dTimeDiff ) < kdMaxDtPulserPs )
2566  {
2567  fvhTimeDiffPulser[uFeeB][uFeeNrInSys]->Fill( dTimeDiff );
2568 
2570  if( 0 == uFeeInGbtx && 0 == uFeeB % kuNbFeePerGbtx )
2571  {
2573  if( fuGdpbNr == uFeeB / fuNrOfFeePerGdpb )
2574  {
2575  if( 0 == uFeeB / kuNbFeePerGbtx )
2576  {
2577  UInt_t uPlotIdx = fuGdpbNr * ( kuNbGbtxPerGdpb - 1) + uGbtxNr - 1;
2578  fvhPulserTimeDiffEvoGbtxGbtx[ uPlotIdx ]->Fill( 1e-9 / 60.0 * (dHitTime - fdStartTime), dTimeDiff );
2579  }
2580  } // if( fuGdpbNr == uFeeB / fuNrOfFeePerGdpb )
2581  else // if( NULL != fvvhPulserTimeDiffEvoGdpbGdpb[ uFeeB / fuNrOfFeePerGdpb ][ fuGdpbNr ] )
2582  {
2584  if( 0 == uGbtxNr && 0 == uFeeB / kuNbFeePerGbtx )
2585  fvvhPulserTimeDiffEvoGdpbGdpb[ uFeeB / fuNrOfFeePerGdpb ][ fuGdpbNr ]->Fill(
2586  1e-9 / 60.0 * (dHitTime - fdStartTime), dTimeDiff );
2587  } // else of if( fuGdpbNr == uFeeB / fuNrOfFeePerGdpb )
2588  } // if( 0 == uFeeInGbtx && 0 == uFeeB % kuNbFeePerGbtx )
2589  } // if( TMath::Abs( dTimeDiff ) < kdMaxDtPulserPs )
2590  // else if( 10 == uFeeB && 20 == uFeeNrInSys )
2591  // LOG(info) << "new in 20 " << dTimeDiff;
2592  } // if( NULL != fvhTimeDiffPulser[uFeeB][uFeeB] )
2593 
2595  for( UInt_t uFeeB = uFeeNrInSys + 1; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
2596  if( NULL != fvhTimeDiffPulser[uFeeNrInSys][uFeeB] )
2597  {
2598  Double_t dTimeDiff = 1e3 * ( fdTsLastPulserHit[ uFeeB ] - fdTsLastPulserHit[ uFeeNrInSys ] );
2599  if( TMath::Abs( dTimeDiff ) < kdMaxDtPulserPs )
2600  {
2601  fvhTimeDiffPulser[uFeeNrInSys][uFeeB]->Fill( dTimeDiff );
2602 
2604  if( 0 == uFeeInGbtx && 0 == uFeeB % kuNbFeePerGbtx )
2605  {
2607  if( fuGdpbNr == uFeeB / fuNrOfFeePerGdpb )
2608  {
2609  if( 0 == uGbtxNr )
2610  {
2611  UInt_t uPlotIdx = fuGdpbNr * ( kuNbGbtxPerGdpb - 1)
2612  + ( uFeeB - fuGdpbNr * fuNrOfFeePerGdpb) / kuNbFeePerGbtx - 1;
2613  fvhPulserTimeDiffEvoGbtxGbtx[ uPlotIdx ]->Fill( 1e-9 / 60.0 * (dHitTime - fdStartTime), dTimeDiff );
2614  } // if( 0 == uGbtxNr )
2615  } // if( fuGdpbNr == uFeeB / fuNrOfFeePerGdpb )
2616  else // if( NULL != fvvhPulserTimeDiffEvoGdpbGdpb[ uFeeB / fuNrOfFeePerGdpb ][ fuGdpbNr ] )
2617  {
2619  if( 0 == uGbtxNr && 0 == uFeeB / kuNbFeePerGbtx )
2620  fvvhPulserTimeDiffEvoGdpbGdpb[ fuGdpbNr ][ uFeeB / fuNrOfFeePerGdpb ]->Fill(
2621  1e-9 / 60.0 * (dHitTime - fdStartTime), dTimeDiff );
2622  } // else of if( fuGdpbNr == uFeeB / fuNrOfFeePerGdpb )
2623  } // if( 0 == uFeeInGbtx && 0 == uFeeB % kuNbFeePerGbtx )
2624  } // if( TMath::Abs( dTimeDiff ) < kdMaxDtPulserPs )
2625  // else if( 10 == uFeeNrInSys && 20 == uFeeB )
2626  // LOG(info) << "new in 10 " << dTimeDiff;
2627  } // if( NULL != fvhTimeDiffPulser[uFeeNrInSys][uFeeB] )
2628 */
2629  } // if( gdpbv100::kuFeePulserChannel == uChannelNrInFee )
2631  else if (fuGdpbNr == fuDiamondDpbIdx && 0 == uChannelNrInFee) {
2632  fdTsLastPulserHit[uFeeNrInSys] = dHitTime;
2633  fvuFeeNbHitsLastMs[uFeeNrInSys]++;
2634  } // if( fuGdpbNr == fuDiamondDpbIdx && 0 == uChannelNrInFee )
2635  } // if( kTRUE == fbPulserModeEnable )
2636 
2638  if (kTRUE == fbCoincMapsEnable) {
2639  fvdCoincTsLastHit[fuGdpbNr][uRemappedChannelNr] = dHitTime;
2640  fvuCoincNbHitsLastMs[fuGdpbNr][uRemappedChannelNr]++;
2641  } // if( kTRUE == fbCoincMapsEnable )
2642 
2643  if (0 <= fdStartTime) {
2644  fvhChannelRate_gDPB[fuGdpbNr]->Fill(1e-9 * (dHitTime - fdStartTime),
2645  uChannelNr);
2646  fvhRemapChRate_gDPB[fuGdpbNr]->Fill(1e-9 * (dHitTime - fdStartTime),
2647  uRemappedChannelNr);
2649  1e-9 * (dHitTime - fdStartTime));
2651  1e-9 * (dHitTime - fdStartTime), 0, 1);
2652 
2653  fvhModRate[fviModuleId[uGbtxNrInSys]]->Fill(1e-9
2654  * (dHitTime - fdStartTime));
2655  fvhModErrorRatio[fviModuleId[uGbtxNrInSys]]->Fill(
2656  1e-9 * (dHitTime - fdStartTime), 0, 1);
2657  } // if (0 <= fdStartTime)
2658 
2659  if (0 <= fdStartTimeLong) {
2661  1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 1 / 60.0);
2663  1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 0, 1 / 60.0);
2664  } // if (0 <= fdStartTimeLong)
2665 
2666  if (kTRUE == fbPrintAllHitsEnable) {
2667  LOG(info) << "Hit: " << Form("0x%08x ", fuGdpbId) << ", " << std::setw(2)
2668  << fuGet4Nr << ", " << std::setw(3) << uChannel << ", "
2669  << std::setw(3) << uTot << ", epoch " << std::setw(3)
2670  << ulCurEpochGdpbGet4 << ", FullTime Clk "
2671  << Form("%12lu ", ulHitTime) << ", FullTime s "
2672  << Form("%12.9f ", dHitTime / 1e9) << ", FineTime " << uFts;
2673  } // if( kTRUE == fbPrintAllHitsEnable )
2674 }
2675 
2677  ULong64_t ulEpochNr = mess.getGdpbEpEpochNb();
2678  /*
2679  if( fvulCurrentEpoch[fuGet4Nr] < ulEpochNr )
2680  fvulCurrentEpochCycle[fuGet4Nr]++;
2681 */
2682  fvulCurrentEpoch[fuGet4Nr] = ulEpochNr;
2685 
2686  if (1 == mess.getGdpbEpSync()) fhGet4EpochFlags->Fill(fuGet4Nr, 0);
2687  if (1 == mess.getGdpbEpDataLoss()) fhGet4EpochFlags->Fill(fuGet4Nr, 1);
2688  if (1 == mess.getGdpbEpEpochLoss()) fhGet4EpochFlags->Fill(fuGet4Nr, 2);
2689  if (1 == mess.getGdpbEpMissmatch()) fhGet4EpochFlags->Fill(fuGet4Nr, 3);
2690 
2691  fulCurrentEpochTime = mess.getMsgFullTime(ulEpochNr);
2692 
2695  if (0 < ulEpochNr)
2696  mess.setGdpbEpEpochNb(ulEpochNr - 1);
2697  else
2699 
2700  Int_t iBufferSize = fvmEpSupprBuffer[fuGet4Nr].size();
2701  if (0 < iBufferSize) {
2702  LOG(debug) << "Now processing stored messages for for get4 " << fuGet4Nr
2703  << " with epoch number " << (fvulCurrentEpoch[fuGet4Nr] - 1);
2704 
2707  std::stable_sort(fvmEpSupprBuffer[fuGet4Nr].begin(),
2708  fvmEpSupprBuffer[fuGet4Nr].begin());
2709 
2710  for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
2712  } // for( Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++ )
2713 
2714  fvmEpSupprBuffer[fuGet4Nr].clear();
2715  } // if( 0 < fvmEpSupprBuffer[fuGet4Nr] )
2716 }
2717 
2719  if (fGdpbIdIndexMap.end() != fGdpbIdIndexMap.find(fuGdpbId)) {
2720  UInt_t uChip = mess.getGdpbGenChipId();
2721  UInt_t uChan = mess.getGdpbSlcChan();
2722  UInt_t uEdge = mess.getGdpbSlcEdge();
2723  UInt_t uData = mess.getGdpbSlcData();
2724  UInt_t uType = mess.getGdpbSlcType();
2725  Double_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4
2726  + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
2727  Double_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4
2728  + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
2729  Double_t dMessTime = static_cast<Double_t>(fulCurrentEpochTime) * 1.e-9;
2730 
2731  switch (uType) {
2732  case 0: // Scaler counter
2733  {
2734  fhGet4ChanScm->Fill(dFullChId, uType);
2735  fvhGdpbGet4ChanScm[fuGdpbNr]->Fill(dGdpbChId, uType);
2736  fhScmScalerCounters->Fill(uData, dFullChId);
2737  break;
2738  }
2739  case 1: // Deadtime counter
2740  {
2741  fhGet4ChanScm->Fill(dFullChId, uType);
2742  fvhGdpbGet4ChanScm[fuGdpbNr]->Fill(dGdpbChId, uType);
2743  fhScmDeadtimeCounters->Fill(uData, dFullChId);
2744  break;
2745  }
2746  case 2: // SPI message
2747  {
2748  /*
2749  LOG(info) << "GET4 Slow Control message, epoch "
2750  << static_cast<Int_t>(fvulCurrentEpoch[fuGet4Nr]) << ", time " << std::setprecision(9)
2751  << std::fixed << dMessTime << " s "
2752  << " for board ID " << std::hex << std::setw(4) << fuGdpbId
2753  << std::dec << "\n"
2754  << " +++++++ > Chip = "
2755  << std::setw(2) << uChip << ", Chan = "
2756  << std::setw(1) << uChan << ", Edge = "
2757  << std::setw(1) << uEdge << ", Type = "
2758  << std::setw(1) << mess.getGdpbSlcType() << ", Data = 0x"
2759 // << std::hex << std::setw(6) << mess.getGdpbSlcData()
2760  << Form( "%06x", uData )
2761  << std::dec << ", CRC = " << uCRC
2762 // << " RAW: " << Form( "%08x", mess.getGdpbSlcMess() );
2763 */
2764  fhGet4ChanScm->Fill(dFullChId, uType);
2765  fvhGdpbGet4ChanScm[fuGdpbNr]->Fill(dGdpbChId, uType);
2766  break;
2767  }
2768  case 3: // Start message or SEU counter
2769  {
2770  if (0 == mess.getGdpbSlcChan()
2771  && 0 == mess.getGdpbSlcEdge()) // START message
2772  {
2773  /*
2774  LOG(info) << std::setprecision(9)
2775  << std::fixed << dMessTime << " s ";
2776  LOG(info) << "GET4 Slow Control message, epoch "
2777  << static_cast<Int_t>(fvulCurrentEpoch[fuGet4Nr]) << ", time " << std::setprecision(9)
2778  << std::fixed << dMessTime << " s "
2779  << " for board ID " << std::hex << std::setw(4) << fuGdpbId
2780  << std::dec << "\n"
2781  << " +++++++ > Chip = "
2782  << std::setw(2) << mess.getGdpbGenChipId() << ", Chan = "
2783  << std::setw(1) << mess.getGdpbSlcChan() << ", Edge = "
2784  << std::setw(1) << mess.getGdpbSlcEdge() << ", Type = "
2785  << std::setw(1) << mess.getGdpbSlcType() << ", Data = 0x"
2786  // << std::hex << std::setw(6) << mess.getGdpbSlcData()
2787  << Form( "%06x", mess.getGdpbSlcData() )
2788  << std::dec << ", CRC = " << mess.getGdpbSlcCrc();
2789 */
2790  fhGet4ChanScm->Fill(dFullChId, uType + 1);
2791  fvhGdpbGet4ChanScm[fuGdpbNr]->Fill(dGdpbChId, uType + 1);
2792  } // if( 0 == mess.getGdpbSlcChan() && 0 == mess.getGdpbSlcEdge() )
2793  else if (0 == mess.getGdpbSlcChan()
2794  && 1 == mess.getGdpbSlcEdge()) // SEU counter message
2795  {
2796  /*
2797  LOG(info) << "GET4 Slow Control message, epoch "
2798  << static_cast<Int_t>(fvulCurrentEpoch[fuGet4Nr]) << ", time " << std::setprecision(9)
2799  << std::fixed << dMessTime << " s "
2800  << " for board ID " << std::hex << std::setw(4) << fuGdpbId
2801  << std::dec << "\n"
2802  << " +++++++ > Chip = "
2803  << std::setw(2) << mess.getGdpbGenChipId() << ", Chan = "
2804  << std::setw(1) << mess.getGdpbSlcChan() << ", Edge = "
2805  << std::setw(1) << mess.getGdpbSlcEdge() << ", Type = "
2806  << std::setw(1) << mess.getGdpbSlcType() << ", Data = 0x"
2807 // << std::hex << std::setw(6) << mess.getGdpbSlcData()
2808  << Form( "%06x", mess.getGdpbSlcData() )
2809  << std::dec << ", CRC = " << mess.getGdpbSlcCrc();
2810 */
2811  fhGet4ChanScm->Fill(dFullChId, uType);
2812  fvhGdpbGet4ChanScm[fuGdpbNr]->Fill(dGdpbChId, uType);
2813  fhScmSeuCounters->Fill(uData, dFullChId);
2814  fhScmSeuCountersEvo->Fill(
2815  dMessTime - fdStartTime * 1.e-9, uData, dFullChId);
2816  } // else if( 0 == mess.getGdpbSlcChan() && 1 == mess.getGdpbSlcEdge() )
2817  break;
2818  }
2819  default: // Should never happen
2820  break;
2821  } // switch( mess.getGdpbSlcType() )
2822  }
2823 }
2824 
2826  Int_t mType = mess.getMessageType();
2827  Int_t channel = mess.getGdpbHitChanId();
2828  uint64_t uData = mess.getData();
2829 
2830  LOG(debug) << "Get4 MSG type " << mType << " from gdpbId " << fuGdpbId
2831  << ", getId " << fuGet4Id << ", (hit channel) " << channel
2832  << " data " << std::hex << uData;
2833 }
2834 
2836  if (fGdpbIdIndexMap.end() != fGdpbIdIndexMap.find(fuGdpbId))
2837  LOG(debug) << "GET4 System message, epoch "
2838  << static_cast<Int_t>(fvulCurrentEpoch[fuGet4Nr]) << ", time "
2839  << std::setprecision(9) << std::fixed
2840  << Double_t(fulCurrentEpochTime) * 1.e-9 << " s "
2841  << " for board ID " << std::hex << std::setw(4) << fuGdpbId
2842  << std::dec;
2843 
2844  switch (mess.getGdpbSysSubType()) {
2845  case gdpbv100::SYS_GET4_ERROR: {
2846  uint32_t uData = mess.getGdpbSysErrData();
2853  LOG(debug) << " +++++++ > gDPB: " << std::hex << std::setw(4)
2854  << fuGdpbId << std::dec << ", Chip = " << std::setw(2)
2855  << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
2856  << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1)
2857  << mess.getGdpbSysErrEdge() << ", Empt = " << std::setw(1)
2858  << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
2859  << std::setw(2) << uData << std::dec
2860  << " -- GET4 V1 Error Event";
2861  else
2862  LOG(debug) << " +++++++ >gDPB: " << std::hex << std::setw(4) << fuGdpbId
2863  << std::dec << ", Chip = " << std::setw(2)
2864  << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
2865  << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1)
2866  << mess.getGdpbSysErrEdge() << ", Empt = " << std::setw(1)
2867  << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
2868  << std::setw(2) << uData << std::dec
2869  << " -- GET4 V1 Error Event ";
2870  break;
2871  } // case gdpbv100::SYSMSG_GET4_EVENT
2872  case gdpbv100::SYS_GDPB_UNKWN: {
2873  LOG(debug) << "Unknown GET4 message, data: " << std::hex << std::setw(8)
2874  << mess.getGdpbSysUnkwData() << std::dec
2875  << " Full message: " << std::hex << std::setw(16)
2876  << mess.getData() << std::dec;
2877  break;
2878  } // case gdpbv100::SYS_GDPB_UNKWN:
2880  LOG(debug) << "GET4 synchronization pulse missing";
2881  break;
2882  } // case gdpbv100::SYS_GET4_SYNC_MISS:
2883  case gdpbv100::SYS_PATTERN: {
2884  LOG(debug) << "ASIC pattern for missmatch, disable or resync";
2885  break;
2886  } // case gdpbv100::SYS_PATTERN:
2887  default: {
2888  LOG(debug) << "Crazy system message, subtype "
2889  << mess.getGdpbSysSubType();
2890  break;
2891  } // default
2892 
2893  } // switch( getGdpbSysSubType() )
2894 }
2895 
2897  uint16_t usType = mess.getGdpbSysPattType();
2898  uint16_t usIndex = mess.getGdpbSysPattIndex();
2899  uint32_t uPattern = mess.getGdpbSysPattPattern();
2900 
2901  switch (usType) {
2902  case gdpbv100::PATT_MISSMATCH: {
2903  LOG(debug) << Form(
2904  "Missmatch pattern message => Type %d, Index %2d, Pattern 0x%08X",
2905  usType,
2906  usIndex,
2907  uPattern);
2908  for (UInt_t uBit = 0; uBit < 32; ++uBit)
2909  if ((uPattern >> uBit) & 0x1) {
2910  UInt_t uBadAsic = ConvertElinkToGet4(32 * usIndex + uBit);
2912  if (fuGdpbNr == fuDiamondDpbIdx) uBadAsic = 32 * usIndex + uBit;
2913  fhPatternMissmatch->Fill(uBadAsic, fuGdpbNr);
2915  uBadAsic);
2916  } // if( ( uPattern >> uBit ) & 0x1 )
2917 
2918  break;
2919  } // case gdpbv100::PATT_MISSMATCH:
2920  case gdpbv100::PATT_ENABLE: {
2921  for (UInt_t uBit = 0; uBit < 32; ++uBit)
2922  if ((uPattern >> uBit) & 0x1) {
2923  UInt_t uBadAsic = ConvertElinkToGet4(32 * usIndex + uBit);
2925  if (fuGdpbNr == fuDiamondDpbIdx) uBadAsic = 32 * usIndex + uBit;
2926  fhPatternEnable->Fill(uBadAsic, fuGdpbNr);
2928  } // if( ( uPattern >> uBit ) & 0x1 )
2929 
2930  break;
2931  } // case gdpbv100::PATT_ENABLE:
2932  case gdpbv100::PATT_RESYNC: {
2933  LOG(debug) << Form(
2934  "RESYNC pattern message => Type %d, Index %2d, Pattern 0x%08X",
2935  usType,
2936  usIndex,
2937  uPattern);
2938 
2939  for (UInt_t uBit = 0; uBit < 32; ++uBit)
2940  if ((uPattern >> uBit) & 0x1) {
2941  UInt_t uBadAsic = ConvertElinkToGet4(32 * usIndex + uBit);
2943  if (fuGdpbNr == fuDiamondDpbIdx) uBadAsic = 32 * usIndex + uBit;
2944  fhPatternResync->Fill(uBadAsic, fuGdpbNr);
2946  } // if( ( uPattern >> uBit ) & 0x1 )
2947 
2948  break;
2949  } // case gdpbv100::PATT_RESYNC:
2950  default: {
2951  LOG(debug) << "Crazy pattern message, subtype " << usType;
2952  break;
2953  } // default
2954  } // switch( usType )
2955 
2956  return;
2957 }
2958 
2960  Int_t iMsgIndex = mess.getStarTrigMsgIndex();
2961 
2962  switch (iMsgIndex) {
2963  case 0:
2964  fvhTokenMsgType[fuGdpbNr]->Fill(0);
2966  break;
2967  case 1:
2968  fvhTokenMsgType[fuGdpbNr]->Fill(1);
2971  break;
2972  case 2:
2973  fvhTokenMsgType[fuGdpbNr]->Fill(2);
2975  break;
2976  case 3: {
2977  fvhTokenMsgType[fuGdpbNr]->Fill(3);
2978 
2979  ULong64_t ulNewGdpbTsFull =
2981  ULong64_t ulNewStarTsFull = (fvulStarTsMsb[fuGdpbNr] << 48)
2982  + (fvulStarTsMid[fuGdpbNr] << 8)
2983  + mess.getStarTsLsbStarD();
2984  UInt_t uNewToken = mess.getStarTokenStarD();
2985  UInt_t uNewDaqCmd = mess.getStarDaqCmdStarD();
2986  UInt_t uNewTrigCmd = mess.getStarTrigCmdStarD();
2987 
2988  if ((uNewToken == fvuStarTokenLast[fuGdpbNr])
2989  && (ulNewGdpbTsFull == fvulGdpbTsFullLast[fuGdpbNr])
2990  && (ulNewStarTsFull == fvulStarTsFullLast[fuGdpbNr])
2991  && (uNewDaqCmd == fvuStarDaqCmdLast[fuGdpbNr])
2992  && (uNewTrigCmd == fvuStarTrigCmdLast[fuGdpbNr])) {
2993  UInt_t uTrigWord = ((fvuStarTrigCmdLast[fuGdpbNr] & 0x00F) << 16)
2994  + ((fvuStarDaqCmdLast[fuGdpbNr] & 0x00F) << 12)
2995  + ((fvuStarTokenLast[fuGdpbNr] & 0xFFF));
2996  LOG(warning) << "Possible error: identical STAR tokens found twice in "
2997  "a row => ignore 2nd! "
2998  << " TS " << fulCurrentTsIndex << " gDBB #" << fuGdpbNr
2999  << " " << Form("token = %5u ", fvuStarTokenLast[fuGdpbNr])
3000  << Form("gDPB ts = %12llu ", fvulGdpbTsFullLast[fuGdpbNr])
3001  << Form("STAR ts = %12llu ", fvulStarTsFullLast[fuGdpbNr])
3002  << Form("DAQ cmd = %2u ", fvuStarDaqCmdLast[fuGdpbNr])
3003  << Form("TRG cmd = %2u ", fvuStarTrigCmdLast[fuGdpbNr])
3004  << Form("TRG Wrd = %5x ", uTrigWord);
3005  return;
3006  } // if exactly same message repeated
3007  /*
3008  if( (uNewToken != fuStarTokenLast[fuGdpbNr] + 1) &&
3009  0 < fvulGdpbTsFullLast[fuGdpbNr] && 0 < fvulStarTsFullLast[fuGdpbNr] &&
3010  ( 4095 != fvuStarTokenLast[fuGdpbNr] || 1 != uNewToken) )
3011  LOG(warning) << "Possible error: STAR token did not increase by exactly 1! "
3012  << " gDBB #" << fuGdpbNr << " "
3013  << Form("old = %5u vs new = %5u ", fvuStarTokenLast[fuGdpbNr], uNewToken)
3014  << Form("old = %12llu vs new = %12llu ", fvulGdpbTsFullLast[fuGdpbNr], ulNewGdpbTsFull)
3015  << Form("old = %12llu vs new = %12llu ", fvulStarTsFullLast[fuGdpbNr], ulNewStarTsFull)
3016  << Form("old = %2u vs new = %2u ", fvuStarDaqCmdLast[fuGdpbNr], uNewDaqCmd)
3017  << Form("old = %2u vs new = %2u ", fvuStarTrigCmdLast[fuGdpbNr], uNewTrigCmd);
3018 */
3019  // STAR TS counter reset detection
3020  if (ulNewStarTsFull < fvulStarTsFullLast[fuGdpbNr])
3021  LOG(debug) << "Probable reset of the STAR TS: old = "
3022  << Form("%16llu", fvulStarTsFullLast[fuGdpbNr])
3023  << " new = " << Form("%16llu", ulNewStarTsFull)
3024  << " Diff = -"
3025  << Form("%8llu",
3026  fvulStarTsFullLast[fuGdpbNr] - ulNewStarTsFull);
3027 
3028  /*
3029  LOG(info) << "Updating trigger token for " << fuGdpbNr
3030  << " " << fuStarTokenLast[fuGdpbNr] << " " << uNewToken;
3031 */
3032  ULong64_t ulGdpbTsDiff = ulNewGdpbTsFull - fvulGdpbTsFullLast[fuGdpbNr];
3033  fvulGdpbTsFullLast[fuGdpbNr] = ulNewGdpbTsFull;
3034  fvulStarTsFullLast[fuGdpbNr] = ulNewStarTsFull;
3035  fvuStarTokenLast[fuGdpbNr] = uNewToken;
3036  fvuStarDaqCmdLast[fuGdpbNr] = uNewDaqCmd;
3037  fvuStarTrigCmdLast[fuGdpbNr] = uNewTrigCmd;
3038 
3040  if (fuCurrentMs < fuCoreMs) {
3042  if (0 <= fdStartTime) {
3044  if (fuHistoryHistoSize
3045  < 1e-9
3047  - fdStartTime)) {
3049  fdStartTime =
3051  } // if( fuHistoryHistoSize < 1e-9 * (fulGdpbTsFullLast * gdpbv100::kdClockCycleSizeNs - fdStartTime) )
3052 
3053  fvhTriggerRate[fuGdpbNr]->Fill(
3054  1e-9
3056  - fdStartTime));
3057  fvhStarTokenEvo[fuGdpbNr]->Fill(
3058  1e-9
3060  - fdStartTime),
3063  1e-9
3065  - fdStartTime),
3068  1e-9
3070  - fdStartTime),
3072  } // if( 0 < fdStartTime )
3073  else
3074  fdStartTime =
3078  } // if( fuCurrentMs < fuCoreMs )
3079 
3080  break;
3081  } // case 3
3082  default: LOG(error) << "Unknown Star Trigger messageindex: " << iMsgIndex;
3083  } // switch( iMsgIndex )
3084 }
3085 
3087 
3089  // Printout some stats on what was unpacked
3090  TString message_type;
3091  for (unsigned int i = 0; i < fviMsgCounter.size(); ++i) {
3092  switch (i) {
3093  case 0: message_type = "NOP"; break;
3094  case 1: message_type = "HIT"; break;
3095  case 2: message_type = "EPOCH"; break;
3096  case 3: message_type = "SYNC"; break;
3097  case 4: message_type = "AUX"; break;
3098  case 5: message_type = "EPOCH2"; break;
3099  case 6: message_type = "GET4"; break;
3100  case 7: message_type = "SYS"; break;
3101  case 8: message_type = "GET4_SLC"; break;
3102  case 9: message_type = "GET4_32B"; break;
3103  case 10: message_type = "GET4_SYS"; break;
3104  default: message_type = "UNKNOWN"; break;
3105  } // switch(i)
3106  LOG(info) << message_type << " messages: " << fviMsgCounter[i];
3107  } // for (unsigned int i=0; i< fviMsgCounter.size(); ++i)
3108 
3109  LOG(info) << "-------------------------------------";
3110  for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
3111  for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j) {
3112  LOG(info) << "Last epoch for gDPB: " << std::hex << std::setw(4) << i
3113  << std::dec << " , GET4 " << std::setw(4) << j << " => "
3115  } // for (UInt_t j = 0; j < fuNrOfGet4PerGdpb; ++j)
3116  } // for (UInt_t i = 0; i < fuNrOfGdpbs; ++i)
3117  LOG(info) << "-------------------------------------";
3118 
3119 
3121  if (kTRUE == fbPulserModeEnable) {
3123  fhTimeMeanPulser->Reset();
3124  fhTimeRmsPulser->Reset();
3125 
3126  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
3127  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
3128  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB]) {
3129  fhTimeMeanPulser->Fill(
3130  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetMean());
3131  fhTimeRmsPulser->Fill(
3132  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetRMS());
3133  } // for( UInt_t uChan = 0; uChan < kuNbChanTest - 1; uChan++)
3134 
3136  UpdateZoomedFit();
3137  } // if( kTRUE == fbPulserModeEnable )
3138 
3139  SaveAllHistos();
3140 }
3141 
3142 void CbmStar2019MonitorTof::SaveAllHistos(TString sFileName) {
3143  TDirectory* oldDir = NULL;
3144  TFile* histoFile = NULL;
3145  if ("" != sFileName) {
3146  // Store current directory position to allow restore later
3147  oldDir = gDirectory;
3148  // open separate histo file in recreate mode
3149  histoFile = new TFile(sFileName, "RECREATE");
3150  histoFile->cd();
3151  } // if( "" != sFileName )
3152 
3153  gDirectory->mkdir("Tof_Raw_gDPB");
3154  gDirectory->cd("Tof_Raw_gDPB");
3155 
3156  fhMessType->Write();
3157  fhSysMessType->Write();
3158  fhGet4MessType->Write();
3159  fhGet4ChanScm->Write();
3160  fhGet4ChanErrors->Write();
3161  fhGet4EpochFlags->Write();
3162 
3163  fhGdpbMessType->Write();
3164  fhGdpbSysMessType->Write();
3165  fhGdpbSysMessPattType->Write();
3166  fhGdpbEpochFlags->Write();
3167  fhGdpbEpochSyncEvo->Write();
3168  fhGdpbEpochMissEvo->Write();
3169 
3170  fhScmScalerCounters->Write();
3171  fhScmDeadtimeCounters->Write();
3172  fhScmSeuCounters->Write();
3173  fhScmSeuCountersEvo->Write();
3174 
3175  fhPatternMissmatch->Write();
3176  fhPatternEnable->Write();
3177  fhPatternResync->Write();
3178 
3179  for (UInt_t uTotPlot = 0; uTotPlot < fvhRawTot_gDPB.size(); ++uTotPlot)
3180  fvhRawTot_gDPB[uTotPlot]->Write();
3181 
3182  for (UInt_t uTotPlot = 0; uTotPlot < fvhRemapTot_gDPB.size(); ++uTotPlot)
3183  fvhRemapTot_gDPB[uTotPlot]->Write();
3184 
3185  for (UInt_t uMod = 0; uMod < fuNrOfModules; uMod++) {
3186  fvhRemapTotSideA_mod[uMod]->Write();
3187  fvhRemapTotSideB_mod[uMod]->Write();
3188 
3189  fvhModRate[uMod]->Write();
3190  fvhModErrorRate[uMod]->Write();
3191  fvhModErrorRatio[uMod]->Write();
3192  } // for( UInt_t uMod = 0; uMod < fuNrOfModules; uMod ++ )
3193 
3194  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
3195  fvhGdpbGet4MessType[uGdpb]->Write();
3196  fvhGdpbGet4ChanScm[uGdpb]->Write();
3197  fvhGdpbGet4ChanErrors[uGdpb]->Write();
3198 
3199  fvhGdpbPatternMissmatchEvo[uGdpb]->Write();
3200  fvhGdpbPatternEnableEvo[uGdpb]->Write();
3201  fvhGdpbPatternResyncEvo[uGdpb]->Write();
3202 
3203  fvhRawFt_gDPB[uGdpb]->Write();
3204  fvhChCount_gDPB[uGdpb]->Write();
3205  fvhChannelRate_gDPB[uGdpb]->Write();
3206  fvhRemapChCount_gDPB[uGdpb]->Write();
3207  fvhRemapChRate_gDPB[uGdpb]->Write();
3208 
3209  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee) {
3210  fvhFeeRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Write();
3211  fvhFeeErrorRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Write();
3212  fvhFeeErrorRatio_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Write();
3213  fvhFeeRateLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Write();
3214  fvhFeeErrorRateLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Write();
3215  fvhFeeErrorRatioLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Write();
3216  } // for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++ uFee)
3217 
3218  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
3219  if (kTRUE == fbPulserModeEnable) {
3220  fhTimeMeanPulser->Write();
3221  fhTimeRmsPulser->Write();
3222  fhTimeRmsZoomFitPuls->Write();
3223  fhTimeResFitPuls->Write();
3224  } // if( kTRUE == fbPulserModeEnable )
3225  gDirectory->cd("..");
3226 
3228  gDirectory->mkdir("Star_Raw");
3229  gDirectory->cd("Star_Raw");
3230  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
3231  fvhTokenMsgType[uGdpb]->Write();
3232  fvhTriggerRate[uGdpb]->Write();
3233  fvhCmdDaqVsTrig[uGdpb]->Write();
3234  fvhStarTokenEvo[uGdpb]->Write();
3235  fvhStarTrigGdpbTsEvo[uGdpb]->Write();
3236  fvhStarTrigStarTsEvo[uGdpb]->Write();
3237  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
3238  gDirectory->cd("..");
3239 
3241  if (kTRUE == fbPulserModeEnable) {
3242  gDirectory->mkdir("TofDt");
3243  gDirectory->cd("TofDt");
3244  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
3245  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
3246  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB])
3247  fvhTimeDiffPulser[uFeeA][uFeeB]->Write();
3248  gDirectory->cd("..");
3249 
3251  gDirectory->mkdir("TofDtEvo");
3252  gDirectory->cd("TofDtEvo");
3253  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
3254  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx)
3255  fvhPulserTimeDiffEvoGbtxGbtx[uGdpb * (kuNbGbtxPerGdpb - 1) + uGbtx]
3256  ->Write();
3257 
3258  for (UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB)
3259  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB]->Write();
3260  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
3261  gDirectory->cd("..");
3262  } // if( kTRUE == fbPulserModeEnable )
3263 
3265  if (kTRUE == fbCoincMapsEnable) {
3266  gDirectory->mkdir("TofCoinc");
3267  gDirectory->cd("TofCoinc");
3268  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
3269  fvhCoincMapAllChanGdpb[uGdpb]->Write();
3270  fvhCoincMeanAllChanGdpb[uGdpb]->Write();
3271  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
3272  gDirectory->cd("..");
3273  } // if( kTRUE == fbCoincMapsEnable )
3274 
3275  gDirectory->mkdir("Flib_Raw");
3276  gDirectory->cd("Flib_Raw");
3277  for (UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++) {
3278  if (NULL == fvhMsSzPerLink[uLinks]) continue;
3279 
3280  fvhMsSzPerLink[uLinks]->Write();
3281  fvhMsSzTimePerLink[uLinks]->Write();
3282  } // for( UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++ )
3283 
3284  TH1* pMissedTsH1 = dynamic_cast<TH1*>(gROOT->FindObjectAny("Missed_TS"));
3285  if (NULL != pMissedTsH1) pMissedTsH1->Write();
3286 
3287  TProfile* pMissedTsEvoP =
3288  dynamic_cast<TProfile*>(gROOT->FindObjectAny("Missed_TS_Evo"));
3289  if (NULL != pMissedTsEvoP) pMissedTsEvoP->Write();
3290 
3291  gDirectory->cd("..");
3292 
3293 
3294  if ("" != sFileName) {
3295  // Restore original directory position
3296  histoFile->Close();
3297  oldDir->cd();
3298  } // if( "" != sFileName )
3299  if ("" != sFileName) {
3300  // Restore original directory position
3301  histoFile->Close();
3302  oldDir->cd();
3303  } // if( "" != sFileName )
3304 }
3305 
3307  LOG(info) << "Reseting all TOF histograms.";
3308 
3309  fhMessType->Reset();
3310  fhSysMessType->Reset();
3311  fhGet4MessType->Reset();
3312  fhGet4ChanScm->Reset();
3313  fhGet4ChanErrors->Reset();
3314  fhGet4EpochFlags->Reset();
3315 
3316  fhGdpbMessType->Reset();
3317  fhGdpbSysMessType->Reset();
3318  fhGdpbSysMessPattType->Reset();
3319  fhGdpbEpochFlags->Reset();
3320  fhGdpbEpochSyncEvo->Reset();
3321  fhGdpbEpochMissEvo->Reset();
3322 
3323  fhScmScalerCounters->Reset();
3324  fhScmDeadtimeCounters->Reset();
3325  fhScmSeuCounters->Reset();
3326  fhScmSeuCountersEvo->Reset();
3327 
3328  fhPatternMissmatch->Reset();
3329  fhPatternEnable->Reset();
3330  fhPatternResync->Reset();
3331 
3332  for (UInt_t uTotPlot = 0; uTotPlot < fvhRawTot_gDPB.size(); ++uTotPlot)
3333  fvhRawTot_gDPB[uTotPlot]->Reset();
3334 
3335  for (UInt_t uTotPlot = 0; uTotPlot < fvhRemapTot_gDPB.size(); ++uTotPlot)
3336  fvhRemapTot_gDPB[uTotPlot]->Reset();
3337 
3338  for (UInt_t uMod = 0; uMod < fuNrOfModules; uMod++) {
3339  fvhRemapTotSideA_mod[uMod]->Reset();
3340  fvhRemapTotSideB_mod[uMod]->Reset();
3341 
3342  fvhModRate[uMod]->Reset();
3343  fvhModErrorRate[uMod]->Reset();
3344  fvhModErrorRatio[uMod]->Reset();
3345  } // for( UInt_t uMod = 0; uMod < fuNrOfModules; uMod ++ )
3346 
3347  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
3348  fvhGdpbGet4MessType[uGdpb]->Reset();
3349  fvhGdpbGet4ChanScm[uGdpb]->Reset();
3350  fvhGdpbGet4ChanErrors[uGdpb]->Reset();
3351 
3352  fvhGdpbPatternMissmatchEvo[uGdpb]->Reset();
3353  fvhGdpbPatternEnableEvo[uGdpb]->Reset();
3354  fvhGdpbPatternResyncEvo[uGdpb]->Reset();
3355 
3356  fvhRawFt_gDPB[uGdpb]->Reset();
3357  fvhChCount_gDPB[uGdpb]->Reset();
3358  fvhChannelRate_gDPB[uGdpb]->Reset();
3359  fvhRemapChCount_gDPB[uGdpb]->Reset();
3360  fvhRemapChRate_gDPB[uGdpb]->Reset();
3361 
3362  for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++uFee) {
3363  fvhFeeRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Reset();
3364  fvhFeeErrorRate_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Reset();
3365  fvhFeeErrorRatio_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Reset();
3366  fvhFeeRateLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Reset();
3367  fvhFeeErrorRateLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Reset();
3368  fvhFeeErrorRatioLong_gDPB[uGdpb * fuNrOfFeePerGdpb + uFee]->Reset();
3369  } // for (UInt_t uFee = 0; uFee < fuNrOfFeePerGdpb; ++ uFee)
3370 
3371  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
3372 
3374  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
3375  fvhTokenMsgType[uGdpb]->Reset();
3376  fvhTriggerRate[uGdpb]->Reset();
3377  fvhCmdDaqVsTrig[uGdpb]->Reset();
3378  fvhStarTokenEvo[uGdpb]->Reset();
3379  fvhStarTrigGdpbTsEvo[uGdpb]->Reset();
3380  fvhStarTrigStarTsEvo[uGdpb]->Reset();
3381  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
3382 
3384  if (kTRUE == fbPulserModeEnable) {
3385  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
3386  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
3387  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB])
3388  fvhTimeDiffPulser[uFeeA][uFeeB]->Reset();
3389 
3390  fhTimeMeanPulser->Reset();
3391  fhTimeRmsPulser->Reset();
3392  fhTimeRmsZoomFitPuls->Reset();
3393  fhTimeResFitPuls->Reset();
3394 
3395  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
3396  for (UInt_t uGbtx = 0; uGbtx < kuNbGbtxPerGdpb - 1; ++uGbtx)
3397  fvhPulserTimeDiffEvoGbtxGbtx[uGdpb * (kuNbGbtxPerGdpb - 1) + uGbtx]
3398  ->Reset();
3399 
3400  for (UInt_t uGdpbB = uGdpb + 1; uGdpbB < fuNrOfGdpbs; ++uGdpbB)
3401  fvvhPulserTimeDiffEvoGdpbGdpb[uGdpb][uGdpbB]->Reset();
3402  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
3403  } // if( kTRUE == fbPulserModeEnable )
3404 
3406  if (kTRUE == fbCoincMapsEnable) {
3407  for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
3408  fvhCoincMapAllChanGdpb[uGdpb]->Reset();
3409  fvhCoincMeanAllChanGdpb[uGdpb]->Reset();
3410  } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
3411  } // if( kTRUE == fbCoincMapsEnable )
3412 
3413  for (UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++) {
3414  if (NULL == fvhMsSzPerLink[uLinks]) continue;
3415 
3416  fvhMsSzPerLink[uLinks]->Reset();
3417  fvhMsSzTimePerLink[uLinks]->Reset();
3418  } // for( UInt_t uLinks = 0; uLinks < fvhMsSzPerLink.size(); uLinks++ )
3419 
3420  fdStartTime = -1;
3421  fdStartTimeLong = -1;
3422  fdStartTimeMsSz = -1;
3423 }
3425  for (UInt_t uGdpbLoop = 0; uGdpbLoop < fuNrOfGdpbs; ++uGdpbLoop) {
3426  fvhChannelRate_gDPB[uGdpbLoop]->Reset();
3427  fvhRemapChRate_gDPB[uGdpbLoop]->Reset();
3428  for (UInt_t uFeeLoop = 0; uFeeLoop < fuNrOfFeePerGdpb; ++uFeeLoop) {
3429  fvhFeeRate_gDPB[(uGdpbLoop * fuNrOfFeePerGdpb) + uFeeLoop]->Reset();
3430  fvhFeeErrorRate_gDPB[(uGdpbLoop * fuNrOfFeePerGdpb) + uFeeLoop]->Reset();
3431  fvhFeeErrorRatio_gDPB[(uGdpbLoop * fuNrOfFeePerGdpb) + uFeeLoop]->Reset();
3432  } // for( UInt_t uFeeLoop = 0; uFeeLoop < fuNrOfFeePerGdpb; ++uFeeLoop )
3433  fvhTriggerRate[uGdpbLoop]->Reset();
3434  fvhStarTokenEvo[uGdpbLoop]->Reset();
3435  fvhStarTrigGdpbTsEvo[uGdpbLoop]->Reset();
3436  fvhStarTrigStarTsEvo[uGdpbLoop]->Reset();
3437  } // for( UInt_t uGdpbLoop = 0; uGdpbLoop < fuNrOfGdpbs; ++uGdpbLoop )
3438 
3439  for (UInt_t uMod = 0; uMod < fuNrOfModules; uMod++) {
3440  fvhModRate[uMod]->Reset();
3441  fvhModErrorRate[uMod]->Reset();
3442  fvhModErrorRatio[uMod]->Reset();
3443  } // for( UInt_t uMod = 0; uMod < fuNrOfModules; uMod ++ )
3444 
3445  fdStartTime = -1;
3446 }
3448  for (UInt_t uGdpbLoop = 0; uGdpbLoop < fuNrOfGdpbs; uGdpbLoop++) {
3449  for (UInt_t uFeeLoop = 0; uFeeLoop < fuNrOfFeePerGdpb; uFeeLoop++) {
3450  fvhFeeRateLong_gDPB[(uGdpbLoop * fuNrOfFeePerGdpb) + uFeeLoop]->Reset();
3451  fvhFeeErrorRateLong_gDPB[(uGdpbLoop * fuNrOfFeePerGdpb) + uFeeLoop]
3452  ->Reset();
3453  fvhFeeErrorRatioLong_gDPB[(uGdpbLoop * fuNrOfFeePerGdpb) + uFeeLoop]
3454  ->Reset();
3455  } // for (UInt_t uFeeLoop = 0; uFeeLoop < fuNrOfFeePerGdpb; uFeeLoop++)
3456  } // for (UInt_t uFeeLoop = 0; uFeeLoop < fuNrOfFeePerGdpb; uFeeLoop++)
3457 
3458  fdStartTimeLong = -1;
3459 }
3460 
3462  if (kFALSE == fbPulserModeEnable) {
3463  LOG(error) << "CbmStar2019MonitorTof::UpdateZoomedFit => "
3464  << "Pulser mode not enabled in root macro, doinb nothing !!! ";
3465  return;
3466  } // if( kFALSE == fbPulserModeEnable )
3467 
3468  // Only do something is the user defined the width he want for the zoom
3469  if (0.0 < fdFitZoomWidthPs) {
3470  // Reset summary histograms for safety
3471  fhTimeRmsZoomFitPuls->Reset();
3472  fhTimeResFitPuls->Reset();
3473 
3474  Double_t dRes = 0;
3475  TF1* fitFuncPairs[fuNrOfFeePerGdpb * fuNrOfGdpbs]
3477 
3478  for (UInt_t uFeeA = 0; uFeeA < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeA++)
3479  for (UInt_t uFeeB = 0; uFeeB < fuNrOfFeePerGdpb * fuNrOfGdpbs; uFeeB++)
3480  if (NULL != fvhTimeDiffPulser[uFeeA][uFeeB]) {
3481  // Check that we have at least 1 entry
3482  if (0 == fvhTimeDiffPulser[uFeeA][uFeeB]->GetEntries()) {
3483  fhTimeRmsZoomFitPuls->Fill(uFeeA, uFeeB, 0.0);
3484  fhTimeResFitPuls->Fill(uFeeA, uFeeB, 0.0);
3485  LOG(info)
3486  << "CbmStar2019MonitorTof::UpdateZoomedFit => Empty input "
3487  << "for FEE pair " << uFeeA << " and " << uFeeB << " !!! ";
3488  continue;
3489  } // if( 0 == fvhTimeDiffPulser[uFeeA][uFeeB]->GetEntries() )
3490 
3491  // Read the peak position (bin with max counts) + total nb of entries
3492  Int_t iBinWithMax = fvhTimeDiffPulser[uFeeA][uFeeB]->GetMaximumBin();
3493  Double_t dNbCounts = fvhTimeDiffPulser[uFeeA][uFeeB]->Integral();
3494 
3495  // Zoom the X axis to +/- ZoomWidth around the peak position
3496  Double_t dPeakPos =
3497  fvhTimeDiffPulser[uFeeA][uFeeB]->GetXaxis()->GetBinCenter(
3498  iBinWithMax);
3499  fvhTimeDiffPulser[uFeeA][uFeeB]->GetXaxis()->SetRangeUser(
3500  dPeakPos - fdFitZoomWidthPs, dPeakPos + fdFitZoomWidthPs);
3501 
3502  // Read integral and check how much we lost due to the zoom (% loss allowed)
3503  Double_t dZoomCounts = fvhTimeDiffPulser[uFeeA][uFeeB]->Integral();
3504  if ((dZoomCounts / dNbCounts) < 0.99) {
3505  fhTimeRmsZoomFitPuls->Fill(uFeeA, uFeeB, 0.0);
3506  fhTimeResFitPuls->Fill(uFeeA, uFeeB, 0.0);
3507  LOG(warning)
3508  << "CbmStar2019MonitorTof::UpdateZoomedFit => Zoom too strong, "
3509  << "more than 1% loss for FEE pair " << uFeeA << " and " << uFeeB
3510  << " !!! ";
3511  continue;
3512  } // if( ( dZoomCounts / dNbCounts ) < 0.99 )
3513 
3514  // Fill new RMS after zoom into summary histo
3515  fhTimeRmsZoomFitPuls->Fill(
3516  uFeeA, uFeeB, fvhTimeDiffPulser[uFeeA][uFeeB]->GetRMS());
3517 
3518 
3519  // Fit using zoomed boundaries + starting gaussian width, store into summary histo
3520  dRes = 0;
3521  fitFuncPairs[uFeeA][uFeeB] =
3522  new TF1(Form("fPair_%02d_%02d", uFeeA, uFeeB),
3523  "gaus",
3524  dPeakPos - fdFitZoomWidthPs,
3525  dPeakPos + fdFitZoomWidthPs);
3526  // Fix the Mean fit value around the Histogram Mean
3527  fitFuncPairs[uFeeA][uFeeB]->SetParameter(0, dZoomCounts);
3528  fitFuncPairs[uFeeA][uFeeB]->SetParameter(1, dPeakPos);
3529  fitFuncPairs[uFeeA][uFeeB]->SetParameter(
3530  2, 200.0); // Hardcode start with ~4*BinWidth, do better later
3531  // Using integral instead of bin center seems to lead to unrealistic values => no "I"
3532  fvhTimeDiffPulser[uFeeA][uFeeB]->Fit(
3533  Form("fPair_%02d_%02d", uFeeA, uFeeB), "QRM0");
3534  // Get Sigma
3535  dRes = fitFuncPairs[uFeeA][uFeeB]->GetParameter(2);
3536  // Cleanup memory
3537  delete fitFuncPairs[uFeeA][uFeeB];
3538  // Fill summary
3539  fhTimeResFitPuls->Fill(uFeeA, uFeeB, dRes / TMath::Sqrt2());
3540 
3541 
3542  LOG(info) << "CbmStar2019MonitorTof::UpdateZoomedFit => "
3543  << "For FEE pair " << uFeeA << " and " << uFeeB
3544  << " we have zoomed RMS = "
3545  << fvhTimeDiffPulser[uFeeA][uFeeB]->GetRMS()
3546  << " and a resolution of " << dRes / TMath::Sqrt2();
3547 
3548  // Restore original axis state?
3549  fvhTimeDiffPulser[uFeeA][uFeeB]->GetXaxis()->UnZoom();
3550  } // loop on uFeeA and uFeeB + check if corresponding fvhTimeDiffPulser exists
3551  } // if( 0.0 < fdFitZoomWidthPs )
3552  else {
3553  LOG(error)
3554  << "CbmStar2019MonitorTof::UpdateZoomedFit => Zoom width not defined, "
3555  << "please use SetFitZoomWidthPs, e.g. in macro, before trying this "
3556  "update !!!";
3557  } // else of if( 0.0 < fdFitZoomWidthPs )
3558 }
3559 
gdpbv100::Message::getStarTrigCmdStarD
uint32_t getStarTrigCmdStarD() const
Definition: gDpbMessv100.h:278
CbmStar2019MonitorTof::fuNrOfChannelsPerGdpb
UInt_t fuNrOfChannelsPerGdpb
Definition: CbmStar2019MonitorTof.h:119
CbmStar2019MonitorTof::fvhGdpbPatternEnableEvo
std::vector< TH2 * > fvhGdpbPatternEnableEvo
Definition: CbmStar2019MonitorTof.h:251
CbmStar2019MonitorTof::fuGdpbNr
UInt_t fuGdpbNr
Definition: CbmStar2019MonitorTof.h:145
gdpbv100::MSG_STAR_TRI_A
@ MSG_STAR_TRI_A
Definition: gDpbMessv100.h:63
gdpbv100::Message
Definition: gDpbMessv100.h:133
bMcbmMoniTofPrintAllEpochsEna
Bool_t bMcbmMoniTofPrintAllEpochsEna
Definition: CbmStar2019MonitorTof.cxx:46
CbmStar2019MonitorTof::CreateHistograms
void CreateHistograms()
Definition: CbmStar2019MonitorTof.cxx:449
CbmStar2019TofPar::GetNrOfRpc
Int_t GetNrOfRpc(UInt_t uGbtx)
Definition: CbmStar2019TofPar.cxx:207
CbmStar2019MonitorTof::fvhGdpbPatternMissmatchEvo
std::vector< TH2 * > fvhGdpbPatternMissmatchEvo
Per MS in gDPB.
Definition: CbmStar2019MonitorTof.h:250
bMcbmMoniTofSaveHistos
Bool_t bMcbmMoniTofSaveHistos
Definition: CbmStar2019MonitorTof.cxx:42
gdpbv100::Message::getGdpbSlcType
uint32_t getGdpbSlcType() const
Definition: gDpbMessv100.h:241
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
CbmStar2019MonitorTof::fvhRemapTotSideB_mod
std::vector< TH2 * > fvhRemapTotSideB_mod
Definition: CbmStar2019MonitorTof.h:272
CbmMcbm2018MonitorTof::fvulGdpbTsMsb
std::vector< ULong64_t > fvulGdpbTsMsb
Definition: CbmMcbm2018MonitorTof.h:168
CbmStar2019MonitorTof::SetParContainers
void SetParContainers()
Definition: CbmStar2019MonitorTof.cxx:198
gdpbv100::kdClockCycleSizeNs
const double kdClockCycleSizeNs
Definition: gDpbMessv100.h:10
gdpbv100::Message::getGdpbTsMsbStarA
uint64_t getGdpbTsMsbStarA() const
Definition: gDpbMessv100.h:266
gdpbv100::Message::getGdpbEpEpochNb
uint32_t getGdpbEpEpochNb() const
Definition: gDpbMessv100.h:231
CbmStar2019MonitorTof::dMinDt
Double_t dMinDt
Definition: CbmStar2019MonitorTof.h:197
CbmStar2019MonitorTof::fvhGdpbGet4ChanErrors
std::vector< TH2 * > fvhGdpbGet4ChanErrors
Definition: CbmStar2019MonitorTof.h:239
CbmMcbm2018MonitorTof::fvuStarTrigCmdLast
std::vector< UInt_t > fvuStarTrigCmdLast
Definition: CbmMcbm2018MonitorTof.h:176
CbmMcbm2018MonitorTof::fvhStarTrigGdpbTsEvo
std::vector< TProfile * > fvhStarTrigGdpbTsEvo
Definition: CbmMcbm2018MonitorTof.h:313
CbmStar2019MonitorTof::fvhRawTot_gDPB
std::vector< TH2 * > fvhRawTot_gDPB
Definition: CbmStar2019MonitorTof.h:257
CbmStar2019MonitorTof::fvulGdpbTsLsb
std::vector< ULong64_t > fvulGdpbTsLsb
Definition: CbmStar2019MonitorTof.h:155
CbmMcbm2018MonitorTof::fuGdpbNr
UInt_t fuGdpbNr
Definition: CbmMcbm2018MonitorTof.h:159
gdpbv100::GET4_V2X_ERR_TOT_OVERWRT
@ GET4_V2X_ERR_TOT_OVERWRT
Definition: gDpbMessv100.h:121
CbmStar2019TofPar::GetNrOfChannelsPerGet4
static constexpr UInt_t GetNrOfChannelsPerGet4()
Definition: CbmStar2019TofPar.h:45
CbmStar2019MonitorTof::ResetEvolutionHistograms
void ResetEvolutionHistograms()
Definition: CbmStar2019MonitorTof.cxx:3424
CbmStar2019MonitorTof::Finish
virtual void Finish()
Definition: CbmStar2019MonitorTof.cxx:3088
CbmStar2019MonitorTof::fdTsCoreSizeInNs
Double_t fdTsCoreSizeInNs
Definition: CbmStar2019MonitorTof.h:105
CbmStar2019MonitorTof::fvhMsSzTimePerLink
std::vector< TProfile * > fvhMsSzTimePerLink
Definition: CbmStar2019MonitorTof.h:218
CbmStar2019MonitorTof::fdMsIndex
Double_t fdMsIndex
Definition: CbmStar2019MonitorTof.h:142
CbmStar2019MonitorTof::Init
virtual Bool_t Init()
Definition: CbmStar2019MonitorTof.cxx:187
gdpbv100::Message::getGdpbSlcChan
uint32_t getGdpbSlcChan() const
Definition: gDpbMessv100.h:239
CbmStar2019MonitorTof::fuGdpbId
UInt_t fuGdpbId
Definition: CbmStar2019MonitorTof.h:143
CbmStar2019MonitorTof::fhPatternEnable
TH2 * fhPatternEnable
Definition: CbmStar2019MonitorTof.h:247
gdpbv100::Message::getGdpbEpSync
bool getGdpbEpSync() const
Definition: gDpbMessv100.h:232
CbmStar2019MonitorTof::fuOverlapMsNb
size_t fuOverlapMsNb
Definition: CbmStar2019MonitorTof.h:102
gdpbv100::SYS_GET4_ERROR
@ SYS_GET4_ERROR
Definition: gDpbMessv100.h:70
CbmStar2019MonitorTof::fviMsgCounter
std::vector< int > fviMsgCounter
Definition: CbmStar2019MonitorTof.h:151
CbmStar2019MonitorTof::FillEpochInfo
void FillEpochInfo(gdpbv100::Message)
Definition: CbmStar2019MonitorTof.cxx:2676
CbmStar2019MonitorTof::fuNbFeePlotsPerGdpb
UInt_t fuNbFeePlotsPerGdpb
Definition: CbmStar2019MonitorTof.h:201
CbmStar2019MonitorTof::fhScmSeuCounters
TH2 * fhScmSeuCounters
Definition: CbmStar2019MonitorTof.h:243
CbmStar2019MonitorTof::fbIgnoreOverlapMs
Bool_t fbIgnoreOverlapMs
Definition: CbmStar2019MonitorTof.h:95
CbmStar2019MonitorTof::fhScmSeuCountersEvo
TH2 * fhScmSeuCountersEvo
Definition: CbmStar2019MonitorTof.h:244
gdpbv100::MSG_HIT
@ MSG_HIT
Definition: gDpbMessv100.h:59
CbmStar2019TofPar::GetNrOfGbtx
Int_t GetNrOfGbtx()
Definition: CbmStar2019TofPar.h:86
CbmStar2019MonitorTof::fhGet4MessType
TH2 * fhGet4MessType
Per GET4 in system.
Definition: CbmStar2019MonitorTof.h:225
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmStar2019MonitorTof::fulCurrentEpochTime
ULong64_t fulCurrentEpochTime
Epoch + Epoch Cycle.
Definition: CbmStar2019MonitorTof.h:176
gdpbv100::Message::getGdpbSysPattType
uint16_t getGdpbSysPattType() const
Definition: gDpbMessv100.h:259
gdpbv100::MSG_SLOWC
@ MSG_SLOWC
Definition: gDpbMessv100.h:61
gdpbv100::Message::setGdpbGenChipId
void setGdpbGenChipId(uint32_t v)
Definition: gDpbMessv100.h:215
CbmStar2019MonitorTof::FillHitInfo
void FillHitInfo(gdpbv100::Message)
Definition: CbmStar2019MonitorTof.cxx:2472
bMcbmMoniTofResetHistos
Bool_t bMcbmMoniTofResetHistos
Definition: CbmStar2019MonitorTof.cxx:41
CbmStar2019MonitorTof::fuHistoryHistoSizeLong
UInt_t fuHistoryHistoSizeLong
Definition: CbmStar2019MonitorTof.h:211
CbmStar2019MonitorTof::fvhFeeRate_gDPB
std::vector< TH1 * > fvhFeeRate_gDPB
Definition: CbmStar2019MonitorTof.h:263
CbmStar2019MonitorTof::SaveAllHistos
void SaveAllHistos(TString sFileName="")
Definition: CbmStar2019MonitorTof.cxx:3142
CbmMcbm2018MonitorTof::fvulStarTsMid
std::vector< ULong64_t > fvulStarTsMid
Definition: CbmMcbm2018MonitorTof.h:171
CbmStar2019MonitorTof::fvhModErrorRatio
std::vector< TProfile * > fvhModErrorRatio
Definition: CbmStar2019MonitorTof.h:276
CbmStar2019MonitorTof::GetArrayIndex
Int_t GetArrayIndex(Int_t gdpbId, Int_t get4Id)
Definition: CbmStar2019MonitorTof.h:311
CbmStar2019MonitorTof::fvmEpSupprBuffer
std::vector< std::vector< gdpbv100::Message > > fvmEpSupprBuffer
Buffer for suppressed epoch processing.
Definition: CbmStar2019MonitorTof.h:182
GetRMS
static Double_t GetRMS(const char *name)
Definition: GenNoiseElectrons.cxx:34
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
gdpbv100::MSG_STAR_TRI_D
@ MSG_STAR_TRI_D
Definition: gDpbMessv100.h:66
CbmMcbm2018MonitorTof::fvuStarDaqCmdLast
std::vector< UInt_t > fvuStarDaqCmdLast
Definition: CbmMcbm2018MonitorTof.h:175
CbmMcbm2018MonitorTof::fvhStarTrigStarTsEvo
std::vector< TProfile * > fvhStarTrigStarTsEvo
Definition: CbmMcbm2018MonitorTof.h:314
gdpbv100::Message::getGdpbSysSubType
uint16_t getGdpbSysSubType() const
Definition: gDpbMessv100.h:245
CbmStar2019MonitorTof::dMaxDt
Double_t dMaxDt
Definition: CbmStar2019MonitorTof.h:198
gdpbv100::Message::setGdpbEpEpochNb
void setGdpbEpEpochNb(uint32_t v)
Definition: gDpbMessv100.h:283
CbmStar2019MonitorTof::fuNbCoreMsPerTs
size_t fuNbCoreMsPerTs
Definition: CbmStar2019MonitorTof.h:92
CbmStar2019MonitorTof::fcMsSizeAll
TCanvas * fcMsSizeAll
Definition: CbmStar2019MonitorTof.h:216
CbmStar2019MonitorTof::fvhCoincMeanAllChanGdpb
std::vector< TProfile2D * > fvhCoincMeanAllChanGdpb
Definition: CbmStar2019MonitorTof.h:298
CbmStar2019MonitorTof::fdStartTime
Double_t fdStartTime
Definition: CbmStar2019MonitorTof.h:204
CbmStar2019MonitorTof::fviRpcType
std::vector< Int_t > fviRpcType
Definition: CbmStar2019MonitorTof.h:124
gdpbv100::GET4_V2X_ERR_TOKEN
@ GET4_V2X_ERR_TOKEN
Definition: gDpbMessv100.h:116
CbmStar2019MonitorTof::fhSysMessType
TH1 * fhSysMessType
Definition: CbmStar2019MonitorTof.h:223
gdpbv100::GET4_V2X_ERR_CHAN_STATE
@ GET4_V2X_ERR_CHAN_STATE
Definition: gDpbMessv100.h:114
CbmStar2019MonitorTof::fiEquipmentId
Int_t fiEquipmentId
Definition: CbmStar2019MonitorTof.h:150
gdpbv100::kuEpochCounterSz
const uint32_t kuEpochCounterSz
Definition: gDpbMessv100.h:40
CbmStar2019MonitorTof::fvulGdpbTsMsb
std::vector< ULong64_t > fvulGdpbTsMsb
Definition: CbmStar2019MonitorTof.h:154
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
CbmStar2019MonitorTof::DoUnpack
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
Definition: CbmStar2019MonitorTof.cxx:1865
CbmMcbm2018MonitorTof::fvhStarTokenEvo
std::vector< TH2 * > fvhStarTokenEvo
Definition: CbmMcbm2018MonitorTof.h:312
CbmStar2019MonitorTof::fuCoreMs
size_t fuCoreMs
Definition: CbmStar2019MonitorTof.h:103
CbmMcbm2018MonitorTof::fvuStarTokenLast
std::vector< UInt_t > fvuStarTokenLast
Definition: CbmMcbm2018MonitorTof.h:174
CbmStar2019MonitorTof::fviNrOfRpc
std::vector< Int_t > fviNrOfRpc
Definition: CbmStar2019MonitorTof.h:123
gdpbv100::Message::getGdpbSysErrData
uint16_t getGdpbSysErrData() const
Definition: gDpbMessv100.h:253
CbmMcbm2018MonitorTof::fvhTriggerRate
std::vector< TH1 * > fvhTriggerRate
Definition: CbmMcbm2018MonitorTof.h:310
gdpbv100::Message::getGdpbSysPattIndex
uint16_t getGdpbSysPattIndex() const
Definition: gDpbMessv100.h:260
CbmStar2019MonitorTof::kuNbFeeSide
const UInt_t kuNbFeeSide
Definition: CbmStar2019MonitorTof.h:270
CbmHistManager.h
Histogram manager.
CbmStar2019TofPar::GetGdpbId
Int_t GetGdpbId(Int_t i)
Definition: CbmStar2019TofPar.h:39
CbmStar2019MonitorTof::CbmStar2019MonitorTof
CbmStar2019MonitorTof()
Definition: CbmStar2019MonitorTof.cxx:48
CbmStar2019MonitorTof::fhGdpbSysMessPattType
TH2 * fhGdpbSysMessPattType
Definition: CbmStar2019MonitorTof.h:232
CbmStar2019MonitorTof::fhScmDeadtimeCounters
TH2 * fhScmDeadtimeCounters
Definition: CbmStar2019MonitorTof.h:242
CbmStar2019MonitorTof::fvhTokenMsgType
std::vector< TH1 * > fvhTokenMsgType
Definition: CbmStar2019MonitorTof.h:279
CbmMcbm2018MonitorTof::fdStartTime
Double_t fdStartTime
Definition: CbmMcbm2018MonitorTof.h:218
CbmMcbm2018MonitorTof::fvulStarTsMsb
std::vector< ULong64_t > fvulStarTsMsb
Definition: CbmMcbm2018MonitorTof.h:170
gdpbv100::Message::getGdpbEpLinkId
bool getGdpbEpLinkId() const
Definition: gDpbMessv100.h:230
CbmMcbm2018MonitorTof::fvulGdpbTsFullLast
std::vector< ULong64_t > fvulGdpbTsFullLast
Definition: CbmMcbm2018MonitorTof.h:172
gdpbv100::GET4_V2X_ERR_DLL_LOCK
@ GET4_V2X_ERR_DLL_LOCK
Definition: gDpbMessv100.h:119
CbmStar2019MonitorTof::fvhRemapChRate_gDPB
std::vector< TH2 * > fvhRemapChRate_gDPB
Definition: CbmStar2019MonitorTof.h:262
gdpbv100::GET4_V2X_ERR_FIFO_WRITE
@ GET4_V2X_ERR_FIFO_WRITE
Definition: gDpbMessv100.h:112
CbmStar2019MonitorTof::fvhTimeDiffPulser
std::vector< std::vector< TH1 * > > fvhTimeDiffPulser
Definition: CbmStar2019MonitorTof.h:288
gdpbv100::Message::getStarTsLsbStarD
uint64_t getStarTsLsbStarD() const
Definition: gDpbMessv100.h:273
CbmStar2019MonitorTof::fvdCoincTsLastHit
std::vector< std::vector< Double_t > > fvdCoincTsLastHit
[ fuNrOfGdpbs ][ fuNrOfChannelsPerGdpb ]
Definition: CbmStar2019MonitorTof.h:192
gdpbv100::PATT_MISSMATCH
@ PATT_MISSMATCH
Definition: gDpbMessv100.h:81
CbmStar2019MonitorTof::fuNrOfGdpbs
UInt_t fuNrOfGdpbs
Definition: CbmStar2019MonitorTof.h:111
CbmStar2019MonitorTof::fvhFeeErrorRatioLong_gDPB
std::vector< TProfile * > fvhFeeErrorRatioLong_gDPB
Definition: CbmStar2019MonitorTof.h:268
CbmMcbm2018MonitorTof::fuCoreMs
size_t fuCoreMs
Definition: CbmMcbm2018MonitorTof.h:113
gdpbv100::GET4_V2X_ERR_UNKNOWN
@ GET4_V2X_ERR_UNKNOWN
Definition: gDpbMessv100.h:130
CbmStar2019MonitorTof::SetNbMsInTs
virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
Definition: CbmStar2019MonitorTof.cxx:442
CbmStar2019MonitorTof::fvhStarTokenEvo
std::vector< TH2 * > fvhStarTokenEvo
Definition: CbmStar2019MonitorTof.h:282
gdpbv100::MSG_STAR_TRI_C
@ MSG_STAR_TRI_C
Definition: gDpbMessv100.h:65
gdpbv100::PATT_RESYNC
@ PATT_RESYNC
Definition: gDpbMessv100.h:83
CbmStar2019MonitorTof::fvhModErrorRate
std::vector< TH1 * > fvhModErrorRate
Definition: CbmStar2019MonitorTof.h:275
CbmStar2019TofPar::GetNrOfModules
Int_t GetNrOfModules()
Definition: CbmStar2019TofPar.h:87
gdpbv100::GET4_V2X_ERR_EP
@ GET4_V2X_ERR_EP
Definition: gDpbMessv100.h:111
CbmStar2019MonitorTof::fvulStarTsMsb
std::vector< ULong64_t > fvulStarTsMsb
Definition: CbmStar2019MonitorTof.h:156
h
Data class with information on a STS local track.
CbmStar2019MonitorTof::fbPrintAllEpochsEnable
Bool_t fbPrintAllEpochsEnable
Definition: CbmStar2019MonitorTof.h:135
CbmStar2019MonitorTof::fvulStarTsMid
std::vector< ULong64_t > fvulStarTsMid
Definition: CbmStar2019MonitorTof.h:157
gdpbv100::Message::getData
uint64_t getData() const
Definition: gDpbMessv100.h:156
CbmStar2019MonitorTof::fvhPulserTimeDiffEvoGbtxGbtx
std::vector< TProfile * > fvhPulserTimeDiffEvoGbtxGbtx
Definition: CbmStar2019MonitorTof.h:293
bMcbmMoniTofRawDataPrint
Bool_t bMcbmMoniTofRawDataPrint
Definition: CbmStar2019MonitorTof.cxx:44
CbmStar2019MonitorTof::fvuCoincNbHitsLastMs
std::vector< std::vector< UInt_t > > fvuCoincNbHitsLastMs
[ fuFeeNr ]
Definition: CbmStar2019MonitorTof.h:190
CbmStar2019MonitorTof::~CbmStar2019MonitorTof
virtual ~CbmStar2019MonitorTof()
Definition: CbmStar2019MonitorTof.cxx:185
gdpbv100::GET4_V2X_ERR_SYNC
@ GET4_V2X_ERR_SYNC
Definition: gDpbMessv100.h:109
CbmStar2019MonitorTof::fvuStarDaqCmdLast
std::vector< UInt_t > fvuStarDaqCmdLast
Definition: CbmStar2019MonitorTof.h:161
CbmStar2019MonitorTof::fUnpackPar
CbmStar2019TofPar * fUnpackPar
Definition: CbmStar2019MonitorTof.h:110
CbmStar2019MonitorTof::fuHistoryHistoSize
UInt_t fuHistoryHistoSize
Definition: CbmStar2019MonitorTof.h:209
gdpbv100::GET4_V2X_ERR_EP_CNT_SYNC
@ GET4_V2X_ERR_EP_CNT_SYNC
Definition: gDpbMessv100.h:110
CbmStar2019MonitorTof::fvhMsSzPerLink
std::vector< TH1 * > fvhMsSzPerLink
Definition: CbmStar2019MonitorTof.h:217
CbmStar2019MonitorTof::PrintSlcInfo
void PrintSlcInfo(gdpbv100::Message)
Definition: CbmStar2019MonitorTof.cxx:2718
gdpbv100::GET4_V2X_ERR_SEQUENCE_ER
@ GET4_V2X_ERR_SEQUENCE_ER
Definition: gDpbMessv100.h:127
CbmStar2019MonitorTof::fvhFeeErrorRateLong_gDPB
std::vector< TH1 * > fvhFeeErrorRateLong_gDPB
Definition: CbmStar2019MonitorTof.h:267
gdpbv100::Message::getGdpbTsLsbStarB
uint64_t getGdpbTsLsbStarB() const
Definition: gDpbMessv100.h:268
CbmStar2019MonitorTof::fuNrOfChannelsPerFee
UInt_t fuNrOfChannelsPerFee
Definition: CbmStar2019MonitorTof.h:116
CbmStar2019MonitorTof::kuNbGet4PerGbtx
static const UInt_t kuNbGet4PerGbtx
Definition: CbmStar2019MonitorTof.h:320
gdpbv100::Message::getStarTrigMsgIndex
uint16_t getStarTrigMsgIndex() const
Definition: gDpbMessv100.h:264
gdpbv100::Message::getGdpbSlcEdge
uint32_t getGdpbSlcEdge() const
Definition: gDpbMessv100.h:240
gdpbv100::GET4_V2X_ERR_TOK_RING_ST
@ GET4_V2X_ERR_TOK_RING_ST
Definition: gDpbMessv100.h:115
CbmStar2019MonitorTof::kuNbFeePerGbtx
const UInt_t kuNbFeePerGbtx
Definition: CbmStar2019MonitorTof.h:128
CbmStar2019MonitorTof::fbPulserModeEnable
Bool_t fbPulserModeEnable
Definition: CbmStar2019MonitorTof.h:136
CbmStar2019MonitorTof::fuNrOfGet4
UInt_t fuNrOfGet4
Definition: CbmStar2019MonitorTof.h:117
CbmStar2019MonitorTof::fvulStarTsFullLast
std::vector< ULong64_t > fvulStarTsFullLast
Definition: CbmStar2019MonitorTof.h:159
CbmStar2019MonitorTof::fvhCoincMapAllChanGdpb
std::vector< TH2 * > fvhCoincMapAllChanGdpb
Definition: CbmStar2019MonitorTof.h:297
CbmStar2019MonitorTof::fvhRawFt_gDPB
std::vector< TH2 * > fvhRawFt_gDPB
TODO: Channel rate plots!
Definition: CbmStar2019MonitorTof.h:256
CbmStar2019MonitorTof::fhGdpbSysMessType
TH2 * fhGdpbSysMessType
Definition: CbmStar2019MonitorTof.h:231
CbmStar2019MonitorTof::fvulCurrentEpoch
std::vector< ULong64_t > fvulCurrentEpoch
Definition: CbmStar2019MonitorTof.h:170
CbmMcbm2018MonitorTof::fuCurrentMs
size_t fuCurrentMs
Definition: CbmMcbm2018MonitorTof.h:154
CbmStar2019MonitorTof::fulCurrentTsIndex
uint64_t fulCurrentTsIndex
Definition: CbmStar2019MonitorTof.h:140
CbmStar2019TofPar::GetModuleId
Int_t GetModuleId(UInt_t uGbtx)
Definition: CbmStar2019TofPar.cxx:237
gdpbv100::kuChipIdMergedEpoch
const uint32_t kuChipIdMergedEpoch
Definition: gDpbMessv100.h:51
CbmStar2019MonitorTof::fuMinNbGdpb
UInt_t fuMinNbGdpb
Definition: CbmStar2019MonitorTof.h:106
CbmStar2019MonitorTof::UpdateZoomedFit
void UpdateZoomedFit()
Definition: CbmStar2019MonitorTof.cxx:3461
CbmStar2019MonitorTof::fvhStarTrigStarTsEvo
std::vector< TProfile * > fvhStarTrigStarTsEvo
Definition: CbmStar2019MonitorTof.h:284
CbmStar2019MonitorTof::fuNrOfModules
UInt_t fuNrOfModules
Definition: CbmStar2019MonitorTof.h:122
gdpbv100::GET4_V2X_ERR_ADD_RIS_EDG
@ GET4_V2X_ERR_ADD_RIS_EDG
Definition: gDpbMessv100.h:125
CbmStar2019MonitorTof::fvhFeeErrorRate_gDPB
std::vector< TH1 * > fvhFeeErrorRate_gDPB
Definition: CbmStar2019MonitorTof.h:264
gdpbv100::Message::getGdpbHitFineTs
uint16_t getGdpbHitFineTs() const
Definition: gDpbMessv100.h:222
CbmStar2019MonitorTof::ResetLongEvolutionHistograms
void ResetLongEvolutionHistograms()
Definition: CbmStar2019MonitorTof.cxx:3447
CbmStar2019MonitorTof::fvhChannelRate_gDPB
std::vector< TH2 * > fvhChannelRate_gDPB
Definition: CbmStar2019MonitorTof.h:259
CbmStar2019TofPar::GetNrOfGet4PerFee
static constexpr UInt_t GetNrOfGet4PerFee()
Definition: CbmStar2019TofPar.h:48
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmStar2019MonitorTof::Reset
virtual void Reset()
Definition: CbmStar2019MonitorTof.cxx:3086
CbmStar2019TofPar.h
CbmStar2019MonitorTof::fvhChCount_gDPB
std::vector< TH1 * > fvhChCount_gDPB
Definition: CbmStar2019MonitorTof.h:258
gdpbv100::MSG_SYST
@ MSG_SYST
Definition: gDpbMessv100.h:62
CbmStar2019MonitorTof::fuCurrentMs
size_t fuCurrentMs
Definition: CbmStar2019MonitorTof.h:141
CbmMcbm2018MonitorTof::ResetEvolutionHistograms
void ResetEvolutionHistograms()
Definition: CbmMcbm2018MonitorTof.cxx:3698
CbmStar2019MonitorTof::fuMsAcceptsPercent
size_t fuMsAcceptsPercent
/‍** Ignore Overlap Ms: all fuOverlapMsNb MS at the end of timeslice **‍/
Definition: CbmStar2019MonitorTof.h:99
CbmStar2019MonitorTof::fvMsComponentsList
std::vector< size_t > fvMsComponentsList
FLES containers.
Definition: CbmStar2019MonitorTof.h:91
CbmMcbm2018MonitorTof::fvhCmdDaqVsTrig
std::vector< TH2 * > fvhCmdDaqVsTrig
Definition: CbmMcbm2018MonitorTof.h:311
CbmStar2019MonitorTof::fhPatternResync
TH2 * fhPatternResync
Definition: CbmStar2019MonitorTof.h:248
CbmStar2019MonitorTof::fvhRemapChCount_gDPB
std::vector< TH1 * > fvhRemapChCount_gDPB
Definition: CbmStar2019MonitorTof.h:261
CbmStar2019MonitorTof::fhPatternMissmatch
TH2 * fhPatternMissmatch
Pattern messages per gDPB.
Definition: CbmStar2019MonitorTof.h:246
CbmStar2019MonitorTof::fdFitZoomWidthPs
Double_t fdFitZoomWidthPs
Definition: CbmStar2019MonitorTof.h:214
gdpbv100::Message::getStarTsMidStarC
uint64_t getStarTsMidStarC() const
Definition: gDpbMessv100.h:271
CbmStar2019MonitorTof::fvvhPulserTimeDiffEvoGdpbGdpb
std::vector< std::vector< TProfile * > > fvvhPulserTimeDiffEvoGdpbGdpb
Definition: CbmStar2019MonitorTof.h:294
CbmStar2019MonitorTof::fTimeLastHistoSaving
std::chrono::time_point< std::chrono::system_clock > fTimeLastHistoSaving
Definition: CbmStar2019MonitorTof.h:333
CbmStar2019MonitorTof::fhGet4EpochFlags
TH2 * fhGet4EpochFlags
Definition: CbmStar2019MonitorTof.h:228
CbmMcbm2018MonitorTof::fvhTokenMsgType
std::vector< TH1 * > fvhTokenMsgType
Definition: CbmMcbm2018MonitorTof.h:309
CbmStar2019MonitorTof.h
CbmStar2019MonitorTof::fvuGet4ToPadi
std::vector< UInt_t > fvuGet4ToPadi
Definition: CbmStar2019MonitorTof.h:317
CbmStar2019MonitorTof::PrintSysInfo
void PrintSysInfo(gdpbv100::Message)
Definition: CbmStar2019MonitorTof.cxx:2835
CbmStar2019MonitorTof::fvulCurrentEpochFull
std::vector< ULong64_t > fvulCurrentEpochFull
Epoch cycle from the Ms Start message and Epoch counter flip.
Definition: CbmStar2019MonitorTof.h:174
CbmStar2019MonitorTof::fhGdpbMessType
TH2 * fhGdpbMessType
Per Gdpb.
Definition: CbmStar2019MonitorTof.h:230
CbmStar2019TofPar::GetRpcType
Int_t GetRpcType(UInt_t uGbtx)
Definition: CbmStar2019TofPar.cxx:217
gdpbv100::GET4_V2X_ERR_TOT_RANGE
@ GET4_V2X_ERR_TOT_RANGE
Definition: gDpbMessv100.h:123
gdpbv100::GET4_V2X_ERR_DLL_RESET
@ GET4_V2X_ERR_DLL_RESET
Definition: gDpbMessv100.h:120
CbmStar2019MonitorTof::fvhRemapTot_gDPB
std::vector< TH2 * > fvhRemapTot_gDPB
Definition: CbmStar2019MonitorTof.h:260
gdpbv100::GET4_V2X_ERR_SPI
@ GET4_V2X_ERR_SPI
Definition: gDpbMessv100.h:118
gdpbv100::kdBinSize
const double kdBinSize
Definition: gDpbMessv100.h:30
CbmStar2019MonitorTof::fuNrOfChannelsPerGet4
UInt_t fuNrOfChannelsPerGet4
Definition: CbmStar2019MonitorTof.h:114
CbmStar2019TofPar
Definition: CbmStar2019TofPar.h:18
CbmMcbm2018MonitorTof::fulCurrentTsIndex
uint64_t fulCurrentTsIndex
Definition: CbmMcbm2018MonitorTof.h:153
CbmStar2019MonitorTof::fhGdpbEpochFlags
TH2 * fhGdpbEpochFlags
Definition: CbmStar2019MonitorTof.h:233
gdpbv100::GET4_V2X_ERR_READ_INIT
@ GET4_V2X_ERR_READ_INIT
Definition: gDpbMessv100.h:108
gdpbv100::kuFeePulserChannel
const uint32_t kuFeePulserChannel
Definition: gDpbMessv100.h:53
CbmStar2019MonitorTof::fvulCurrentEpochCycle
std::vector< ULong64_t > fvulCurrentEpochCycle
Definition: CbmStar2019MonitorTof.h:173
CbmStar2019MonitorTof::fvhRemapTotSideA_mod
std::vector< TH2 * > fvhRemapTotSideA_mod
Definition: CbmStar2019MonitorTof.h:271
gdpbv100::Message::getGdpbSysPattPattern
uint32_t getGdpbSysPattPattern() const
Definition: gDpbMessv100.h:261
CbmStar2019MonitorTof::fviRpcSide
std::vector< Int_t > fviRpcSide
Definition: CbmStar2019MonitorTof.h:125
CbmStar2019MonitorTof::fuNrOfGet4PerGdpb
UInt_t fuNrOfGet4PerGdpb
Definition: CbmStar2019MonitorTof.h:118
CbmStar2019MonitorTof::fvhTriggerRate
std::vector< TH1 * > fvhTriggerRate
Definition: CbmStar2019MonitorTof.h:280
CbmStar2019MonitorTof::fvuElinkToGet4
std::vector< UInt_t > fvuElinkToGet4
5 FEE with 8 GET4 each
Definition: CbmStar2019MonitorTof.h:321
gdpbv100::MSG_EPOCH
@ MSG_EPOCH
Definition: gDpbMessv100.h:60
gdpbv100
Definition: gDpbMessv100.cxx:29
gdpbv100::Message::getGdpbSysUnkwData
uint32_t getGdpbSysUnkwData() const
Definition: gDpbMessv100.h:255
CbmStar2019MonitorTof::fvuStarTrigCmdLast
std::vector< UInt_t > fvuStarTrigCmdLast
Definition: CbmStar2019MonitorTof.h:162
gdpbv100::GET4_V2X_ERR_LOST_EVT
@ GET4_V2X_ERR_LOST_EVT
Definition: gDpbMessv100.h:113
CbmStar2019MonitorTof::fGdpbIdIndexMap
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
Map of ID to index for the gDPBs.
Definition: CbmStar2019MonitorTof.h:179
CbmStar2019TofPar::GetNrOfGdpbs
Int_t GetNrOfGdpbs()
Definition: CbmStar2019TofPar.h:38
CbmStar2019MonitorTof::fvulGdpbTsFullLast
std::vector< ULong64_t > fvulGdpbTsFullLast
Definition: CbmStar2019MonitorTof.h:158
CbmStar2019MonitorTof::AddMsComponentToList
virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Definition: CbmStar2019MonitorTof.cxx:403
CbmStar2019MonitorTof::fhScmScalerCounters
TH2 * fhScmScalerCounters
Slow control messages.
Definition: CbmStar2019MonitorTof.h:241
gdpbv100::kulEpochCycleFieldSz
const uint64_t kulEpochCycleFieldSz
Definition: gDpbMessv100.h:49
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
CbmStar2019MonitorTof::fdTsLastPulserHit
std::vector< Double_t > fdTsLastPulserHit
[ fuFeeNr ]
Definition: CbmStar2019MonitorTof.h:186
CbmStar2019MonitorTof::InitContainers
Bool_t InitContainers()
Definition: CbmStar2019MonitorTof.cxx:205
CbmStar2019MonitorTof::PrintGenInfo
void PrintGenInfo(gdpbv100::Message)
Definition: CbmStar2019MonitorTof.cxx:2825
CbmStar2019MonitorTof::fdStartTimeLong
Double_t fdStartTimeLong
Definition: CbmStar2019MonitorTof.h:206
gdpbv100::GET4_V2X_ERR_READOUT_ERR
@ GET4_V2X_ERR_READOUT_ERR
Definition: gDpbMessv100.h:117
CbmStar2019MonitorTof
Definition: CbmStar2019MonitorTof.h:33
CbmStar2019MonitorTof::fvhGdpbPatternResyncEvo
std::vector< TH2 * > fvhGdpbPatternResyncEvo
Definition: CbmStar2019MonitorTof.h:252
gdpbv100::Message::getGdpbEpDataLoss
bool getGdpbEpDataLoss() const
Definition: gDpbMessv100.h:233
gdpbv100::MSG_STAR_TRI_B
@ MSG_STAR_TRI_B
Definition: gDpbMessv100.h:64
CbmStar2019MonitorTof::fhTimeRmsPulser
TH2 * fhTimeRmsPulser
Definition: CbmStar2019MonitorTof.h:290
CbmStar2019MonitorTof::FillPattInfo
void FillPattInfo(gdpbv100::Message)
Definition: CbmStar2019MonitorTof.cxx:2896
CbmStar2019MonitorTof::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmStar2019MonitorTof.cxx:226
CbmStar2019MonitorTof::fvhGdpbGet4ChanScm
std::vector< TH2 * > fvhGdpbGet4ChanScm
Definition: CbmStar2019MonitorTof.h:238
gdpbv100::Message::getGdpbSysErrEdge
bool getGdpbSysErrEdge() const
Definition: gDpbMessv100.h:252
gdpbv100::SYS_PATTERN
@ SYS_PATTERN
Definition: gDpbMessv100.h:76
CbmStar2019MonitorTof::ResetAllHistos
void ResetAllHistos()
Definition: CbmStar2019MonitorTof.cxx:3306
CbmStar2019MonitorTof::fvuFeeNbHitsLastMs
std::vector< UInt_t > fvuFeeNbHitsLastMs
Buffer for pulser channels.
Definition: CbmStar2019MonitorTof.h:185
CbmStar2019MonitorTof::fvuPadiToGet4
std::vector< UInt_t > fvuPadiToGet4
Definition: CbmStar2019MonitorTof.h:316
gdpbv100::Message::getGdpbSlcData
uint32_t getGdpbSlcData() const
Definition: gDpbMessv100.h:242
CbmStar2019MonitorTof::FillStarTrigInfo
void FillStarTrigInfo(gdpbv100::Message)
gdpbv100::Message::getGdpbHitFullTs
uint32_t getGdpbHitFullTs() const
Definition: gDpbMessv100.h:220
CbmStar2019MonitorTof::ConvertElinkToGet4
UInt_t ConvertElinkToGet4(UInt_t uElinkIdx)
Definition: CbmStar2019MonitorTof.h:323
CbmStar2019MonitorTof::fvhModRate
std::vector< TH1 * > fvhModRate
module plots
Definition: CbmStar2019MonitorTof.h:274
CbmStar2019MonitorTof::fuGet4Nr
UInt_t fuGet4Nr
Definition: CbmStar2019MonitorTof.h:149
CbmMcbm2018MonitorTof::fvulGdpbTsLsb
std::vector< ULong64_t > fvulGdpbTsLsb
Definition: CbmMcbm2018MonitorTof.h:169
CbmStar2019MonitorTof::kuNbGbtxPerGdpb
const UInt_t kuNbGbtxPerGdpb
Definition: CbmStar2019MonitorTof.h:129
CbmStar2019MonitorTof::fvbFirstEpochSeen
std::vector< Bool_t > fvbFirstEpochSeen
Definition: CbmStar2019MonitorTof.h:171
CbmStar2019MonitorTof::fhMessType
TH1 * fhMessType
In System.
Definition: CbmStar2019MonitorTof.h:222
CbmStar2019MonitorTof::fuGet4Id
UInt_t fuGet4Id
Definition: CbmStar2019MonitorTof.h:147
CbmStar2019MonitorTof::fvuStarTokenLast
std::vector< UInt_t > fvuStarTokenLast
Definition: CbmStar2019MonitorTof.h:160
CbmStar2019MonitorTof::fvhCmdDaqVsTrig
std::vector< TH2 * > fvhCmdDaqVsTrig
Definition: CbmStar2019MonitorTof.h:281
CbmStar2019MonitorTof::fvhFeeErrorRatio_gDPB
std::vector< TProfile * > fvhFeeErrorRatio_gDPB
Definition: CbmStar2019MonitorTof.h:265
CbmStar2019MonitorTof::fhGdpbEpochMissEvo
TH2 * fhGdpbEpochMissEvo
Definition: CbmStar2019MonitorTof.h:235
CbmMcbm2018MonitorTof::fvulStarTsFullLast
std::vector< ULong64_t > fvulStarTsFullLast
Definition: CbmMcbm2018MonitorTof.h:173
gdpbv100::Message::getStarTokenStarD
uint32_t getStarTokenStarD() const
Definition: gDpbMessv100.h:280
bMcbmMoniTofPrintAllHitsEna
Bool_t bMcbmMoniTofPrintAllHitsEna
Definition: CbmStar2019MonitorTof.cxx:45
CbmStar2019MonitorTof::fdStartTimeMsSz
Double_t fdStartTimeMsSz
Definition: CbmStar2019MonitorTof.h:208
CbmStar2019MonitorTof::fuNrOfGbtx
UInt_t fuNrOfGbtx
Definition: CbmStar2019MonitorTof.h:121
CbmStar2019MonitorTof::fuRawDataPrintMsgNb
UInt_t fuRawDataPrintMsgNb
Definition: CbmStar2019MonitorTof.h:132
CbmMcbm2018MonitorTof::fuHistoryHistoSize
UInt_t fuHistoryHistoSize
Definition: CbmMcbm2018MonitorTof.h:223
gdpbv100::Message::getStarTsMsbStarB
uint64_t getStarTsMsbStarB() const
Definition: gDpbMessv100.h:269
CbmStar2019MonitorTof::fhTimeResFitPuls
TH2 * fhTimeResFitPuls
Definition: CbmStar2019MonitorTof.h:292
gdpbv100::Message::getGdpbHitChanId
uint16_t getGdpbHitChanId() const
Definition: gDpbMessv100.h:219
CbmMcbm2018MonitorTof::FillStarTrigInfo
void FillStarTrigInfo(gdpbv100::Message)
Definition: CbmMcbm2018MonitorTof.cxx:3196
CbmStar2019TofPar::GetSizeMsInNs
Double_t GetSizeMsInNs()
Definition: CbmStar2019TofPar.h:93
CbmStar2019MonitorTof::fuRawDataPrintMsgIdx
UInt_t fuRawDataPrintMsgIdx
Definition: CbmStar2019MonitorTof.h:133
CbmStar2019MonitorTof::ProcessEpochCycle
void ProcessEpochCycle(uint64_t ulCycleData)
Definition: CbmStar2019MonitorTof.cxx:2443
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
CbmStar2019MonitorTof::fuNbFeePlot
UInt_t fuNbFeePlot
Definition: CbmStar2019MonitorTof.h:200
CbmStar2019MonitorTof::fviModuleId
std::vector< Int_t > fviModuleId
Definition: CbmStar2019MonitorTof.h:126
gdpbv100::Message::getGdpbEpMissmatch
bool getGdpbEpMissmatch() const
Definition: gDpbMessv100.h:235
CbmStar2019MonitorTof::fhTimeRmsZoomFitPuls
TH2 * fhTimeRmsZoomFitPuls
Definition: CbmStar2019MonitorTof.h:291
CbmStar2019MonitorTof::fvhGdpbGet4MessType
std::vector< TH2 * > fvhGdpbGet4MessType
Per GET4 in gDPB.
Definition: CbmStar2019MonitorTof.h:237
CbmMcbmUnpack
Definition: CbmMcbmUnpack.h:15
CbmStar2019MonitorTof::fhGdpbEpochSyncEvo
TH2 * fhGdpbEpochSyncEvo
Definition: CbmStar2019MonitorTof.h:234
CbmStar2019MonitorTof::fvhStarTrigGdpbTsEvo
std::vector< TProfile * > fvhStarTrigGdpbTsEvo
Definition: CbmStar2019MonitorTof.h:283
CbmStar2019MonitorTof::fhGet4ChanErrors
TH2 * fhGet4ChanErrors
Definition: CbmStar2019MonitorTof.h:227
CbmStar2019MonitorTof::fuNbOverMsPerTs
size_t fuNbOverMsPerTs
Definition: CbmStar2019MonitorTof.h:93
CbmStar2019MonitorTof::fdMsSizeInNs
Double_t fdMsSizeInNs
Definition: CbmStar2019MonitorTof.h:104
gdpbv100::PATT_ENABLE
@ PATT_ENABLE
Definition: gDpbMessv100.h:82
CbmStar2019MonitorTof::fhTimeMeanPulser
TH2 * fhTimeMeanPulser
Definition: CbmStar2019MonitorTof.h:289
CbmStar2019TofPar::GetRpcSide
Int_t GetRpcSide(UInt_t uGbtx)
Definition: CbmStar2019TofPar.cxx:227
CbmStar2019MonitorTof::kdMaxDtPulserPs
const Double_t kdMaxDtPulserPs
Definition: CbmStar2019MonitorTof.h:287
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
CbmStar2019MonitorTof::fhGet4ChanScm
TH2 * fhGet4ChanScm
Definition: CbmStar2019MonitorTof.h:226
CbmStar2019MonitorTof::fuTotalMsNb
size_t fuTotalMsNb
Definition: CbmStar2019MonitorTof.h:100
CbmStar2019MonitorTof::fuNrOfFeePerGdpb
UInt_t fuNrOfFeePerGdpb
Definition: CbmStar2019MonitorTof.h:112
gdpbv100::Message::getGdpbSysErrUnused
uint16_t getGdpbSysErrUnused() const
Definition: gDpbMessv100.h:249
gdpbv100::Message::getGdpbHit32Tot
uint16_t getGdpbHit32Tot() const
Definition: gDpbMessv100.h:227
CbmStar2019MonitorTof::fvuGet4ToElink
std::vector< UInt_t > fvuGet4ToElink
Definition: CbmStar2019MonitorTof.h:322
bMcbmMoniTofUpdateZoomedFit
Bool_t bMcbmMoniTofUpdateZoomedFit
Definition: CbmStar2019MonitorTof.cxx:43
gdpbv100::GET4_V2X_ERR_EVT_DISCARD
@ GET4_V2X_ERR_EVT_DISCARD
Definition: gDpbMessv100.h:124
CbmStar2019MonitorTof::kuNbBinsDt
const UInt_t kuNbBinsDt
[ fuNrOfGdpbs ][ fuNrOfChannelsPerGdpb ]
Definition: CbmStar2019MonitorTof.h:196
CbmStar2019MonitorTof::fbPrintAllHitsEnable
Bool_t fbPrintAllHitsEnable
Definition: CbmStar2019MonitorTof.h:134
gdpbv100::Message::getStarDaqCmdStarD
uint32_t getStarDaqCmdStarD() const
Definition: gDpbMessv100.h:279
gdpbv100::GET4_V2X_ERR_EPOCH_OVERF
@ GET4_V2X_ERR_EPOCH_OVERF
Definition: gDpbMessv100.h:128
CbmStar2019MonitorTof::fdLastRmsUpdateTime
Double_t fdLastRmsUpdateTime
Definition: CbmStar2019MonitorTof.h:213
CbmStar2019MonitorTof::fvhFeeRateLong_gDPB
std::vector< TH1 * > fvhFeeRateLong_gDPB
Definition: CbmStar2019MonitorTof.h:266
CbmStar2019MonitorTof::fuNrOfGet4PerFee
UInt_t fuNrOfGet4PerFee
Definition: CbmStar2019MonitorTof.h:113
gdpbv100::SYS_GDPB_UNKWN
@ SYS_GDPB_UNKWN
Definition: gDpbMessv100.h:71
CbmStar2019MonitorTof::fbCoincMapsEnable
Bool_t fbCoincMapsEnable
Definition: CbmStar2019MonitorTof.h:137