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