CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2018MonitorAlgoTof.cxx
Go to the documentation of this file.
1/* Copyright (C) 2019-2020 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5// -----------------------------------------------------------------------------
6// ----- -----
7// ----- CbmMcbm2018MonitorAlgoTof -----
8// ----- Created 27.11.2019 by P.-A. Loizeau -----
9// ----- -----
10// -----------------------------------------------------------------------------
11
13
14#include "CbmFlesHistosTools.h"
16#include "CbmMcbm2018TofPar.h"
17#include "CbmTofAddress.h"
18#include "CbmTofDetectorId_v14a.h" // in cbmdata/tof
19
20#include "FairRootManager.h"
21#include "FairRun.h"
22#include "FairRunOnline.h"
23#include "FairRuntimeDb.h"
24#include <Logger.h>
25
26#include "TCanvas.h"
27#include "TH1.h"
28#include "TH2.h"
29#include "TList.h"
30#include "TPaveStats.h"
31#include "TProfile.h"
32#include "TProfile2D.h"
33#include "TROOT.h"
34#include "TString.h"
35
36#include <fstream>
37#include <iomanip>
38#include <iostream>
39
40#include <stdint.h>
41
42// -------------------------------------------------------------------------
45 ,
47 fbDebugMonitorMode(kFALSE)
48 , fbIgnoreCriticalErrors(kFALSE)
49 , fvbMaskedComponents()
50 , fUnpackPar(nullptr)
51 , fuNrOfGdpbs(0)
52 , fGdpbIdIndexMap()
53 , fuNrOfFeePerGdpb(0)
54 , fuNrOfGet4PerFee(0)
55 , fuNrOfChannelsPerGet4(0)
56 , fuNrOfChannelsPerFee(0)
57 , fuNrOfGet4(0)
58 , fuNrOfGet4PerGdpb(0)
59 , fuNrOfChannelsPerGdpb(0)
60 , fuMinTotPulser(90)
61 , fuMaxTotPulser(100)
62 , fulCurrentTsIdx(0)
63 , fulCurrentMsIdx(0)
64 , fdTsStartTime(-1.0)
65 , fdTsStopTimeCore(-1.0)
66 , fdMsTime(-1.0)
67 , fuMsIndex(0)
68 , fmMsgCounter()
69 , fuCurrentEquipmentId(0)
70 , fuCurrDpbId(0)
71 , fuCurrDpbIdx(0)
72 , fiRunStartDateTimeSec(-1)
73 , fiBinSizeDatePlots(-1)
74 , fuGet4Id(0)
75 , fuGet4Nr(0)
76 , fvulCurrentEpoch()
77 , fvulCurrentEpochCycle()
78 , fvulCurrentEpochFull()
79 , fvmEpSupprBuffer()
80 , fdStartTime(-1.0)
81 , fdStartTimeMsSz(0.0)
82 , ftStartTimeUnix(std::chrono::steady_clock::now())
83 , fvulGdpbTsMsb()
84 , fvulGdpbTsLsb()
85 , fvulStarTsMsb()
86 , fvulStarTsMid()
87 , fvulGdpbTsFullLast()
88 , fvulStarTsFullLast()
89 , fvuStarTokenLast()
90 , fvuStarDaqCmdLast()
91 , fvuStarTrigCmdLast()
92 , fbEpochSinceLastHit(kTRUE)
93 , fuDuplicatesCount(0)
94 , fmLastHit(0)
95 , fuHistoryHistoSize(3600)
96 , fhMessType(nullptr)
97 , fhSysMessType(nullptr)
98 , fhGet4MessType(nullptr)
99 , fhGet4ChanScm(nullptr)
100 , fhGet4ChanErrors(nullptr)
101 , fhGet4EpochFlags(nullptr)
102 , fhGdpbAsicSpiCounts(nullptr)
103 , fhGdpbMessType(nullptr)
104 , fhGdpbSysMessType(nullptr)
105 , fhGdpbSysMessPattType(nullptr)
106 , fhGdpbEpochFlags(nullptr)
107 , fhGdpbEpochSyncEvo(nullptr)
108 , fhGdpbEpochMissEvo(nullptr)
109 , fhGdpbEndMsBufferNotEmpty(nullptr)
110 , fhGdpbEndMsDataLost(nullptr)
111 , fhGdpbHitRate(nullptr)
112 , fvhGdpbGet4MessType()
113 , fvhGdpbGet4ChanScm()
114 , fvhGdpbGet4ChanErrors()
115 , fhMsgCntEvo(nullptr)
116 , fhHitCntEvo(nullptr)
117 , fhErrorCntEvo(nullptr)
118 , fhLostEvtCntEvo(nullptr)
119 , fhErrorFractEvo(nullptr)
120 , fhLostEvtFractEvo(nullptr)
121 , fhMsgCntPerMsEvo(nullptr)
122 , fhHitCntPerMsEvo(nullptr)
123 , fhErrorCntPerMsEvo(nullptr)
124 , fhLostEvtCntPerMsEvo(nullptr)
125 , fhErrorFractPerMsEvo(nullptr)
126 , fhLostEvtFractPerMsEvo(nullptr)
127 , fvhRawFt_gDPB()
128 , fvhRawCt_gDPB()
129 , fvhRemapTot_gDPB()
130 , fvhRemapChCount_gDPB()
131 , fvhRemapChRate_gDPB()
132 , fvhRemapChErrFract_gDPB()
133 , fuNbMissmatchPattern()
134 , fhNbMissPatternPerMs(nullptr)
135 , fhPatternMissmatch(nullptr)
136 , fhPatternEnable(nullptr)
137 , fhPatternResync(nullptr)
138 , fvhGdpbPatternMissmatchEvo()
139 , fvhGdpbPatternEnableEvo()
140 , fvhGdpbPatternResyncEvo()
141 , fvvbGdpbLastMissmatchPattern()
142 , fvvbGdpbLastEnablePattern()
143 , fvvbGdpbLastResyncPattern()
144 , fvhGdpbMissmatchEvoPerTs()
145 , fvhGdpbMissmatchEnaEvoPerTs()
146 , fvhGdpbEnableEvoPerTs()
147 , fvhGdpbResyncEvoPerTs()
148 , fvhGdpbResyncEnaEvoPerTs()
149 , fvhGdpbStateEvoPerTs()
150 , fvhTokenMsgType()
151 , fvhTriggerRate()
152 , fvhCmdDaqVsTrig()
153 , fvhStarTokenEvo()
154 , fvhStarTrigGdpbTsEvo()
155 , fvhStarTrigStarTsEvo()
156 , fcSummary(nullptr)
157 , fcSummaryGdpb(nullptr)
158 , fvcSumGdpbGet4()
159 , fcStarTrigTokenType(nullptr)
160 , fcStarTriggerRate(nullptr)
161 , fcStarTrigCmdDaqVsTrig(nullptr)
162 , fcStarTrigStarTokenEvo(nullptr)
163 , fcStarTrigGdpbTsEvo(nullptr)
164 , fcStarTrigStarTsEvo(nullptr)
165{
166}
172
173// -------------------------------------------------------------------------
175{
176 LOG(info) << "Initializing mCBM T0 2019 monitor algo";
177
178 return kTRUE;
179}
187
188// -------------------------------------------------------------------------
190{
191 LOG(info) << "Init parameter containers for CbmMcbm2018MonitorAlgoTof";
192 Bool_t initOK = ReInitContainers();
193
194 return initOK;
195}
197{
198 LOG(info) << "**********************************************";
199 LOG(info) << "ReInit parameter containers for CbmMcbm2018MonitorAlgoTof";
200
201 fUnpackPar = (CbmMcbm2018TofPar*) fParCList->FindObject("CbmMcbm2018TofPar");
202 if (nullptr == fUnpackPar) return kFALSE;
203
204 Bool_t initOK = InitParameters();
205
206 return initOK;
207}
209{
210 if (nullptr == fParCList) fParCList = new TList();
211 fUnpackPar = new CbmMcbm2018TofPar("CbmMcbm2018TofPar");
212 fParCList->Add(fUnpackPar);
213
214 return fParCList;
215}
217{
218 LOG(info) << "Debug Monitor mode: " << (fbDebugMonitorMode ? "ON" : "OFF");
219
220 if (kTRUE == fbIgnoreCriticalErrors)
221 LOG(warning) << "Monitor set to ignore critical GET4 errors!!! No printout "
222 "will be delivered for those!!!!";
223
225 LOG(info) << "Nr. of Tof GDPBs: " << fuNrOfGdpbs;
226
228 LOG(info) << "Nr. of FEES per Tof GDPB: " << fuNrOfFeePerGdpb;
229
231 LOG(info) << "Nr. of GET4 per Tof FEE: " << fuNrOfGet4PerFee;
232
234 LOG(info) << "Nr. of channels per GET4: " << fuNrOfChannelsPerGet4;
235
237 LOG(info) << "Nr. of channels per FEE: " << fuNrOfChannelsPerFee;
238
240 LOG(info) << "Nr. of GET4s: " << fuNrOfGet4;
241
243 LOG(info) << "Nr. of GET4s per GDPB: " << fuNrOfGet4PerGdpb;
244
246 LOG(info) << "Nr. of channels per GDPB: " << fuNrOfChannelsPerGdpb;
247
248 fGdpbIdIndexMap.clear();
249 for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
251 LOG(info) << "GDPB Id of TOF " << i << " : " << std::hex << fUnpackPar->GetGdpbId(i) << std::dec;
252 } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
253
256 LOG(info) << "Timeslice parameters: each MS is " << fdMsSizeInNs << " ns";
257
259 if (-1 < fiGdpbIndex) {
260 if (fuNrOfGdpbs <= static_cast<UInt_t>(fiGdpbIndex))
261 LOG(fatal) << "Selected gDPB out of bounds relative to parameter file: " << fiGdpbIndex << " VS " << fuNrOfGdpbs;
262 else
263 LOG(info) << "Selected gDPB " << fiGdpbIndex << " for single gDPB analysis";
264
265 fuNrOfGdpbs = 1;
266 fGdpbIdIndexMap.clear();
268 } // if( -1 < fiGdpbIndex )
269
271 fvulCurrentEpoch.resize(fuNrOfGdpbs, 0);
274
290 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
292 fvvbGdpbLastMissmatchPattern[uGdpb].resize(fuNrOfGet4PerGdpb, kFALSE);
293 fvvbGdpbLastEnablePattern[uGdpb].resize(fuNrOfGet4PerGdpb, kTRUE);
294 fvvbGdpbLastResyncPattern[uGdpb].resize(fuNrOfGet4PerGdpb, kFALSE);
296 fvulGdpbTsMsb[uGdpb] = 0;
297 fvulGdpbTsLsb[uGdpb] = 0;
298 fvulStarTsMsb[uGdpb] = 0;
299 fvulStarTsMid[uGdpb] = 0;
300 fvulGdpbTsFullLast[uGdpb] = 0;
301 fvulStarTsFullLast[uGdpb] = 0;
302 fvuStarTokenLast[uGdpb] = 0;
303 fvuStarDaqCmdLast[uGdpb] = 0;
304 fvuStarTrigCmdLast[uGdpb] = 0;
305 } // for (Int_t iGdpb = 0; iGdpb < fuNrOfGdpbs; ++iGdpb)
306
307 if (kTRUE == fbDebugMonitorMode) fuNbMissmatchPattern.resize(fuNrOfGdpbs, 0);
308
309 return kTRUE;
310}
311// -------------------------------------------------------------------------
312
313void CbmMcbm2018MonitorAlgoTof::AddMsComponentToList(size_t component, UShort_t usDetectorId)
314{
316 for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
317 if (component == fvMsComponentsList[uCompIdx]) return;
318
320 fvMsComponentsList.push_back(component);
321
322 LOG(info) << "CbmMcbm2018MonitorAlgoTof::AddMsComponentToList => Component " << component << " with detector ID 0x"
323 << std::hex << usDetectorId << std::dec << " added to list";
324}
325// -------------------------------------------------------------------------
326
327Bool_t CbmMcbm2018MonitorAlgoTof::ProcessTs(const fles::Timeslice& ts)
328{
329 fulCurrentTsIdx = ts.index();
330 fdTsStartTime = static_cast<Double_t>(ts.descriptor(0, 0).idx);
331
333 if (0 == fulCurrentTsIdx) return kTRUE;
334
336 if (-1.0 == fdTsCoreSizeInNs) {
337 fuNbCoreMsPerTs = ts.num_core_microslices();
338 fuNbOverMsPerTs = ts.num_microslices(0) - ts.num_core_microslices();
341 LOG(info) << "Timeslice parameters: each TS has " << fuNbCoreMsPerTs << " Core MS and " << fuNbOverMsPerTs
342 << " Overlap MS, for a core duration of " << fdTsCoreSizeInNs << " ns and a full duration of "
343 << fdTsFullSizeInNs << " ns";
344
348 LOG(info) << "In each TS " << fuNbMsLoop << " MS will be looped over";
349 } // if( -1.0 == fdTsCoreSizeInNs )
350
353 // LOG(info) << Form( "TS %5d Start %12f Stop %12f", fulCurrentTsIdx, fdTsStartTime, fdTsStopTimeCore );
354
356 for (fuMsIndex = 0; fuMsIndex < fuNbMsLoop; fuMsIndex++) {
358 for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx) {
359 UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
360
361 if (kFALSE == ProcessMs(ts, uMsComp, fuMsIndex)) {
362 LOG(error) << "Failed to process ts " << fulCurrentTsIdx << " MS " << fuMsIndex << " for component " << uMsComp;
363 return kFALSE;
364 } // if( kFALSE == ProcessMs( ts, uMsCompIdx, fuMsIndex ) )
365 } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
366
367 if (kTRUE == fbDebugMonitorMode) {
368 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
369 fhNbMissPatternPerMs->Fill(fuNbMissmatchPattern[uGdpb], uGdpb);
370 fuNbMissmatchPattern[uGdpb] = 0;
371 } // for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb)
372 } // if( kTRUE == fbDebugMonitorMode )
373 } // for( fuMsIndex = 0; fuMsIndex < uNbMsLoop; fuMsIndex ++ )
374
376 if (kFALSE == FillHistograms()) {
377 LOG(error) << "Failed to fill histos in ts " << fulCurrentTsIdx;
378 return kFALSE;
379 } // if( kFALSE == FillHistograms() )
380
381 return kTRUE;
382}
383
384Bool_t CbmMcbm2018MonitorAlgoTof::ProcessMs(const fles::Timeslice& ts, size_t uMsCompIdx, size_t uMsIdx)
385{
386 auto msDescriptor = ts.descriptor(uMsCompIdx, uMsIdx);
387 fuCurrentEquipmentId = msDescriptor.eq_id;
388 const uint8_t* msContent = reinterpret_cast<const uint8_t*>(ts.content(uMsCompIdx, uMsIdx));
389
390 uint32_t uSize = msDescriptor.size;
391 fulCurrentMsIdx = msDescriptor.idx;
392 fuCurrentMsSysId = static_cast<uint32_t>(msDescriptor.sys_id);
393 fdMsTime = (1e-9) * static_cast<double>(fulCurrentMsIdx);
394 LOG(debug) << "Microslice: " << fulCurrentMsIdx << " from EqId " << std::hex << fuCurrentEquipmentId << std::dec
395 << " has size: " << uSize;
396
397 if (0 == fvbMaskedComponents.size()) fvbMaskedComponents.resize(ts.num_components(), kFALSE);
398
399 fuCurrDpbId = static_cast<uint32_t>(fuCurrentEquipmentId & 0xFFFF);
400 // fuCurrDpbIdx = fDpbIdIndexMap[ fuCurrDpbId ];
401
403 auto it = fGdpbIdIndexMap.find(fuCurrDpbId);
404 if (it == fGdpbIdIndexMap.end()) {
405 if (kFALSE == fvbMaskedComponents[uMsCompIdx]) {
406 LOG(info) << "---------------------------------------------------------------";
407 LOG(info) << FormatMsHeaderPrintout(msDescriptor);
408 LOG(warning) << "Could not find the gDPB index for AFCK id 0x" << std::hex << fuCurrDpbId << std::dec
409 << " in timeslice " << fulCurrentTsIdx << " in microslice " << uMsIdx << " component " << uMsCompIdx
410 << "\n"
411 << "If valid this index has to be added in the TOF "
412 "parameter file in the DbpIdArray field";
413 fvbMaskedComponents[uMsCompIdx] = kTRUE;
414 } // if( kFALSE == fvbMaskedComponents[ uMsComp ] )
415 else
416 return kTRUE;
417
420
421 return kFALSE;
422 } // if( it == fGdpbIdIndexMap.end() )
423 else
425
433 } // else if( fuHistoryHistoSize < fdMsTime - fdStartTime )
434 /*
436 if (fdStartTimeLong < 0)
437 fdStartTimeLong = fdMsTime;
439 if( fuHistoryHistoSizeLong < 1e-9 * (fdMsTime - fdStartTimeLong) / 60.0 )
440 {
441 ResetLongEvolutionHistograms();
442 fdStartTimeLong = dHitTime;
443 } // if( fuHistoryHistoSize < 1e-9 * (fdMsTime - fdStartTimeLong) / 60.0 )
444*/
445
446 // If not integer number of message in input buffer, print warning/error
447 if (0 != (uSize % kuBytesPerMessage))
448 LOG(error) << "The input microslice buffer does NOT "
449 << "contain only complete nDPB messages!";
450
451 // Compute the number of complete messages in the input microslice buffer
452 uint32_t uNbMessages = (uSize - (uSize % kuBytesPerMessage)) / kuBytesPerMessage;
453
454 // Prepare variables for the loop on contents
455 Int_t messageType = -111;
456 const uint64_t* pInBuff = reinterpret_cast<const uint64_t*>(msContent);
457 for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
458 // Fill message
459 uint64_t ulData = static_cast<uint64_t>(pInBuff[uIdx]);
460
462 if (0 == uIdx) {
463 ProcessEpochCycle(ulData);
464 continue;
465 } // if( 0 == uIdx )
466
467 gdpbv100::Message mess(ulData);
469 messageType = mess.getMessageType();
470 fhMessType->Fill(messageType);
471 fhGdpbMessType->Fill(messageType, fuCurrDpbIdx);
472
475 if (0x90 == fuCurrentMsSysId) fuGet4Id = mess.getGdpbGenChipId();
477
479 LOG(warning) << "Message with Get4 ID too high: " << fuGet4Id << " VS " << fuNrOfGet4PerGdpb
480 << " set in parameters.";
481
482 switch (messageType) {
483 case gdpbv100::MSG_HIT: {
484 if (mess.getGdpbHitIs24b()) {
486 LOG(fatal) << "This monitor does not support 24b hit messages!!!.";
487 continue;
488 } // if( getGdpbHitIs24b() )
489 else {
492 fhGet4MessType->Fill(fuGet4Nr, 0);
494
497
500 /*
501 if( kFALSE == fbEpochSinceLastHit )
502 {
503 if( fmLastHit != mess )
504 {
505 if( 0 < fuDuplicatesCount )
506 {
507 LOG(warning) << "Detected duplicate hits in gDPB " << fuCurrDpbIdx
508 << ": " << fuDuplicatesCount << " times "
509 << Form( "0x%16lx", fmLastHit.getData() );
510 } // if( 0 < fuDuplicatesCount )
511 fmLastHit = mess;
512 fuDuplicatesCount = 0;
513 }
514 else fuDuplicatesCount++;
515 } // if( kFALSE == fbEpochSinceLastHit )
516 else
517 {
518 fmLastHit = mess;
519 fbEpochSinceLastHit = kFALSE;
520 } // else of if( kFALSE == fbEpochSinceLastHit )
521*/
522 fvmEpSupprBuffer.push_back(mess);
523 } // else of if( getGdpbHitIs24b() )
524 break;
525 } // case gdpbv100::MSG_HIT:
526 case gdpbv100::MSG_EPOCH: {
528 ProcessEpoch(mess);
529 } // if this epoch message is a merged one valid for all chips
530 else {
532 LOG(fatal) << "This event builder does not support unmerged epoch "
533 "messages!!!.";
534 continue;
535 } // if single chip epoch message
536 break;
537 } // case gdpbv100::MSG_EPOCH:
538 case gdpbv100::MSG_SLOWC: {
539 ProcessSlowCtrl(mess);
540 break;
541 } // case gdpbv100::MSG_SLOWC:
542 case gdpbv100::MSG_SYST: {
543 ProcessSysMess(mess);
544 break;
545 } // case gdpbv100::MSG_SYST:
550 ProcessStarTrig(mess);
551 break;
552 } // case gdpbv100::MSG_STAR_TRI_A-D
553 default:
554 LOG(fatal) << "Message type " << std::hex << std::setw(2) << static_cast<uint16_t>(messageType)
555 << " not included in Get4 data format.";
556 } // switch( mess.getMessageType() )
557 } // for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx ++)
558
561 if (0 < fvmEpSupprBuffer.size()) {
564 } // if( 0 < fvmEpSupprBuffer.size() )
565
567 fvmEpSupprBuffer.clear();
568
571
572 return kTRUE;
573}
574
575// -------------------------------------------------------------------------
577{
578 ULong64_t ulEpochCycleVal = ulCycleData & gdpbv100::kulEpochCycleFieldSz;
579
580 if (!(ulEpochCycleVal == fvulCurrentEpochCycle[fuCurrDpbIdx]
581 || ulEpochCycleVal == fvulCurrentEpochCycle[fuCurrDpbIdx] + 1)
582 && 0 < fulCurrentMsIdx) {
583 LOG(warning) << "CbmMcbm2018MonitorAlgoTof::ProcessEpochCycle => "
584 << " Missmatch in epoch cycles detected for Gdpb " << fuCurrDpbIdx
585 << ", probably fake cycles due to epoch index corruption! "
586 << Form(" Current cycle 0x%09llX New cycle 0x%09llX", fvulCurrentEpochCycle[fuCurrDpbIdx],
587 ulEpochCycleVal);
588 } // if epoch cycle did not stay constant or increase by exactly 1, except if first MS of the TS
589 if (ulEpochCycleVal != fvulCurrentEpochCycle[fuCurrDpbIdx]) {
590 LOG(info) << "CbmStar2019EventBuilderEtofAlgo::ProcessEpochCycle => "
591 << " New epoch cycle for Gdpb " << fuCurrDpbIdx
592 << Form(": Current cycle 0x%09llX New cycle 0x%09llX", fvulCurrentEpochCycle[fuCurrDpbIdx],
593 ulEpochCycleVal);
594 } // if( ulEpochCycleVal != fvulCurrentEpochCycle[fuCurrDpbIdx] )
595 fvulCurrentEpochCycle[fuCurrDpbIdx] = ulEpochCycleVal;
596
597 return;
598}
600{
601 ULong64_t ulEpochNr = mess.getGdpbEpEpochNb();
602 Bool_t bSyncFlag = (1 == mess.getGdpbEpSync());
603 Bool_t bDataLoss = (1 == mess.getGdpbEpDataLoss());
604 Bool_t bEpochLoss = (1 == mess.getGdpbEpEpochLoss());
605 Bool_t bMissmMatch = (1 == mess.getGdpbEpMissmatch());
606
607 fvulCurrentEpoch[fuCurrDpbIdx] = ulEpochNr;
610
612 if (bSyncFlag) {
615 } // if( bSyncFlag )
616
617 if (bDataLoss) fhGdpbEpochFlags->Fill(fuCurrDpbIdx, 1);
618
619 if (bEpochLoss) fhGdpbEpochFlags->Fill(fuCurrDpbIdx, 2);
620
621 if (bMissmMatch) {
624 } // if( bMissmMatch )
625
626 for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index++) {
627 fuGet4Id = uGet4Index;
629
630 fhGet4MessType->Fill(fuGet4Nr, 1);
632
633 if (bSyncFlag) fhGet4EpochFlags->Fill(fuGet4Nr, 0);
634 if (bDataLoss) fhGet4EpochFlags->Fill(fuGet4Nr, 1);
635 if (bEpochLoss) fhGet4EpochFlags->Fill(fuGet4Nr, 2);
636 if (bMissmMatch) fhGet4EpochFlags->Fill(fuGet4Nr, 3);
637 } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index ++ )
638
639 if (0 < fuDuplicatesCount)
640 LOG(warning) << "Detected duplicate hits: " << fuDuplicatesCount << " times "
641 << Form("0x%16lx", static_cast<unsigned long>(fmLastHit.getData()));
642 fbEpochSinceLastHit = kTRUE;
644
647}
648// -------------------------------------------------------------------------
650{
651 Int_t iBufferSize = fvmEpSupprBuffer.size();
652
653 if (0 == iBufferSize) return;
654
655 LOG(debug) << "Now processing stored messages for for gDPB " << fuCurrDpbIdx << " with epoch number "
657
660 std::stable_sort(fvmEpSupprBuffer.begin(), fvmEpSupprBuffer.end());
661
663 ULong64_t ulCurEpochGdpbGet4 = fvulCurrentEpochFull[fuCurrDpbIdx];
664
666 if (0 == ulCurEpochGdpbGet4) return;
667
669 ulCurEpochGdpbGet4--;
670
671 Int_t messageType = -111;
672 for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
673 messageType = fvmEpSupprBuffer[iMsgIdx].getMessageType();
674
675 fuGet4Id = fUnpackPar->ElinkIdxToGet4Idx(fvmEpSupprBuffer[iMsgIdx].getGdpbGenChipId());
677 if (0x90 == fuCurrentMsSysId) fuGet4Id = fvmEpSupprBuffer[iMsgIdx].getGdpbGenChipId();
679
681 gdpbv100::FullMessage fullMess(fvmEpSupprBuffer[iMsgIdx], ulCurEpochGdpbGet4);
682
684 switch (messageType) {
685 case gdpbv100::MSG_HIT: {
686 ProcessHit(fullMess);
687 break;
688 } // case gdpbv100::MSG_HIT:
691 break;
692 case gdpbv100::MSG_SYST: {
694 if (gdpbv100::SYS_GET4_ERROR == fullMess.getGdpbSysSubType()) ProcessError(fullMess);
695 break;
696 } // case gdpbv100::MSG_SYST:
703 break;
704 default:
705 LOG(error) << "Message type " << std::hex << std::setw(2) << static_cast<uint16_t>(messageType)
706 << " not included in Get4 unpacker.";
707 } // switch( mess.getMessageType() )
708 } // for( Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++ )
709
710 fvmEpSupprBuffer.clear();
711}
712// -------------------------------------------------------------------------
714{
715 UInt_t uChannel = mess.getGdpbHitChanId();
716 UInt_t uTot = mess.getGdpbHit32Tot();
717
721 UInt_t uFts = mess.getGdpbHitFullTs() % 112;
722 UInt_t uCts = mess.getGdpbHitFullTs() / 112;
723
724 UInt_t uChannelNr = fuGet4Id * fuNrOfChannelsPerGet4 + uChannel;
725 UInt_t uChannelNrInFee = (fuGet4Id % fuNrOfGet4PerFee) * fuNrOfChannelsPerGet4 + uChannel;
726 UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
727 // UInt_t uFeeNrInSys = fuCurrDpbIdx * fuNrOfFeePerGdpb + uFeeNr;
728 UInt_t uRemappedChannelNr = uFeeNr * fuNrOfChannelsPerFee + fUnpackPar->Get4ChanToPadiChan(uChannelNrInFee);
730 if (0x90 == fuCurrentMsSysId) uRemappedChannelNr = uFeeNr * fuNrOfChannelsPerFee + uChannelNrInFee;
731 // UInt_t uGbtxNr = (uFeeNr / fUnpackPar->GetNrOfFeePerGbtx());
732 // UInt_t uFeeInGbtx = (uFeeNr % fUnpackPar->GetNrOfFeePerGbtx());
733 // UInt_t uGbtxNrInSys = fuCurrDpbIdx * fUnpackPar->GetNrOfGbtxPerGdpb() + uGbtxNr;
734
735 // UInt_t uChanInSyst = fuCurrDpbIdx * fuNrOfChannelsPerGdpb + uChannelNr;
736 // UInt_t uRemappedChannelNrInSys = fuCurrDpbIdx * fuNrOfChannelsPerGdpb
737 // + uFeeNr * fuNrOfChannelsPerFee
738 // + fUnpackPar->Get4ChanToPadiChan( uChannelNrInFee );
739
740 // ULong_t ulHitTime = mess.getMsgFullTime( mess.getExtendedEpoch() );
741 Double_t dHitTime = mess.GetFullTimeNs();
742 // Double_t dHitTot = uTot; // in bins
743
745 if (kTRUE == fbDebugMonitorMode) {
746 fvhRawFt_gDPB[fuCurrDpbIdx]->Fill(uChannelNr, uFts);
747 fvhRawCt_gDPB[fuCurrDpbIdx]->Fill(uChannelNr, uCts);
748 } // if( kTRUE == fbDebugMonitorMode )
749
751 if (4096 <= uCts) {
752 LOG(debug) << "CbmMcbm2018MonitorAlgoTof::ProcessHit => Coarse time above 4096 "
753 "detected."
754 << Form(" gDPB %02u GET4 %03u Channel %u, TS %8llu MS %3u (MS time %12llu)", fuCurrDpbIdx, fuGet4Id,
756 } // if( 4096 <= uCts )
757
759 fvhRemapChCount_gDPB[fuCurrDpbIdx]->Fill(uRemappedChannelNr);
760 fvhRemapTot_gDPB[fuCurrDpbIdx]->Fill(uRemappedChannelNr, uTot);
761
764 if (0 <= fdStartTime) {
765 fvhRemapChRate_gDPB[fuCurrDpbIdx]->Fill(1e-9 * dHitTime - fdStartTime, uRemappedChannelNr);
766 if (kTRUE == fbDebugMonitorMode)
767 fvhRemapChErrFract_gDPB[fuCurrDpbIdx]->Fill(1e-9 * dHitTime - fdStartTime, uRemappedChannelNr, 0);
768 // fvhFeeRate_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill( 1e-9 * (dHitTime - fdStartTime));
769 // fvhFeeErrorRatio_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill( 1e-9 * (dHitTime - fdStartTime), 0, 1);
770 } // if (0 <= fdStartTime)
771 /*
772 if (0 <= fdStartTimeLong)
773 {
774 fvhFeeRateLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
775 1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 1 / 60.0 );
776 fvhFeeErrorRatioLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
777 1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 0, 1 / 60.0 );
778 } // if (0 <= fdStartTimeLong)
779*/
780}
781// -------------------------------------------------------------------------
783{
784 UInt_t uSubType = mess.getGdpbSysSubType();
785 fhSysMessType->Fill(uSubType);
786 fhGdpbSysMessType->Fill(uSubType, fuCurrDpbIdx);
787
788 switch (mess.getGdpbSysSubType()) {
791 fhGet4MessType->Fill(fuGet4Nr, 3);
793
795 fvmEpSupprBuffer.push_back(mess);
796 // ProcessError( mess );
797 break;
798 } // case gdpbv100::SYSMSG_GET4_EVENT
800 LOG(debug) << "Unknown GET4 message, data: " << std::hex << std::setw(8) << mess.getGdpbSysUnkwData() << std::dec
801 << " Full message: " << std::hex << std::setw(16) << mess.getData() << std::dec;
802 break;
803 } // case gdpbv100::SYS_GDPB_UNKWN:
805 if (kFALSE == fbIgnoreCriticalErrors) {
806 if (mess.getGdpbSysFwErrResync())
807 LOG(info) << Form("GET4 Resynchronization: Get4:0x%04x ", mess.getGdpbGenChipId()) << fuCurrDpbIdx;
808 else
809 LOG(info) << "GET4 synchronization pulse missing in gDPB " << fuCurrDpbIdx;
810 } // if (kFALSE == fbIgnoreCriticalErrors)
811 break;
812 } // case gdpbv100::SYS_GET4_SYNC_MISS:
814 ProcessPattern(mess);
815 break;
816 } // case gdpbv100::SYS_PATTERN:
817 default: {
818 LOG(info) << "Crazy system message, subtype " << mess.getGdpbSysSubType();
819 break;
820 } // default
821 } // switch( mess.getGdpbSysSubType() )
822}
823// -------------------------------------------------------------------------
825{
826 uint32_t uErrorType = mess.getGdpbSysErrData();
827
828 fhGet4MessType->Fill(fuGet4Nr, 3);
830
831 // UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
832
836
840
841 if (gdpbv100::GET4_V2X_ERR_LOST_EVT == uErrorType) {
844 } // if( gdpbv100::GET4_V2X_ERR_LOST_EVT == mess.getGdpbSysErrData() )
845 /*
847 if (0 <= fdStartTime)
848 {
849 fvhFeeErrorRate_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
850 1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime));
851 fvhFeeErrorRatio_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
852 1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime), 1, 1 );
853 } // if (0 <= fdStartTime)
854 if (0 <= fdStartTimeLong)
855 {
856 fvhFeeErrorRateLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
857 1e-9 / 60.0 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTimeLong), 1 / 60.0);
858 fvhFeeErrorRatioLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
859 1e-9 / 60.0 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTimeLong), 1, 1 / 60.0);
860 } // if (0 <= fdStartTime)
861*/
862 Int_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4 + mess.getGdpbSysErrChanId();
863 UInt_t uChannelNrInFee = (fuGet4Id % fuNrOfGet4PerFee) * fuNrOfChannelsPerGet4 + mess.getGdpbSysErrChanId();
864 UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
865 // UInt_t uFeeNrInSys = fuCurrDpbIdx * fuNrOfFeePerGdpb + uFeeNr;
866 UInt_t uRemappedChannelNr = uFeeNr * fuNrOfChannelsPerFee + fUnpackPar->Get4ChanToPadiChan(uChannelNrInFee);
868 if (0x90 == fuCurrentMsSysId) uRemappedChannelNr = uFeeNr * fuNrOfChannelsPerFee + uChannelNrInFee;
869
870 Int_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4 + mess.getGdpbSysErrChanId();
871
872 switch (uErrorType) {
874 fhGet4ChanErrors->Fill(dFullChId, 0);
875 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 0);
876 break;
877 } // case gdpbv100::GET4_V2X_ERR_READ_INIT:
879 fhGet4ChanErrors->Fill(dFullChId, 1);
880 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 1);
881 break;
882 } // case gdpbv100::GET4_V2X_ERR_SYNC:
884 fhGet4ChanErrors->Fill(dFullChId, 2);
885 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 2);
886 break;
887 } // case gdpbv100::GET4_V2X_ERR_EP_CNT_SYNC:
889 fhGet4ChanErrors->Fill(dFullChId, 3);
890 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 3);
891 break;
892 } // case gdpbv100::GET4_V2X_ERR_EP:
894 fhGet4ChanErrors->Fill(dFullChId, 4);
895 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 4);
896 break;
897 } // case gdpbv100::GET4_V2X_ERR_FIFO_WRITE:
899 fhGet4ChanErrors->Fill(dFullChId, 5);
900 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 5);
901 break;
902 } // case gdpbv100::GET4_V2X_ERR_LOST_EVT:
904 fhGet4ChanErrors->Fill(dFullChId, 6);
905 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 6);
906 break;
907 } // case gdpbv100::GET4_V2X_ERR_CHAN_STATE:
909 fhGet4ChanErrors->Fill(dFullChId, 7);
910 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 7);
911 break;
912 } // case gdpbv100::GET4_V2X_ERR_TOK_RING_ST:
914 fhGet4ChanErrors->Fill(dFullChId, 8);
915 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 8);
916 break;
917 } // case gdpbv100::GET4_V2X_ERR_TOKEN:
919 fhGet4ChanErrors->Fill(dFullChId, 9);
920 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 9);
921 break;
922 } // case gdpbv100::GET4_V2X_ERR_READOUT_ERR:
924 fhGet4ChanErrors->Fill(dFullChId, 10);
925 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 10);
926 break;
927 } // case gdpbv100::GET4_V2X_ERR_SPI:
929 fhGet4ChanErrors->Fill(dFullChId, 11);
930 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 11);
931 break;
932 } // case gdpbv100::GET4_V2X_ERR_DLL_LOCK:
934 fhGet4ChanErrors->Fill(dFullChId, 12);
935 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 12);
936 break;
937 } // case gdpbv100::GET4_V2X_ERR_DLL_RESET:
939 fhGet4ChanErrors->Fill(dFullChId, 13);
940 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 13);
941 if (kTRUE == fbDebugMonitorMode)
942 fvhRemapChErrFract_gDPB[fuCurrDpbIdx]->Fill(fdMsTime - fdStartTime, uRemappedChannelNr, 1);
943 break;
944 } // case gdpbv100::GET4_V2X_ERR_TOT_OVERWRT:
946 fhGet4ChanErrors->Fill(dFullChId, 14);
947 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 14);
948 if (kTRUE == fbDebugMonitorMode)
949 fvhRemapChErrFract_gDPB[fuCurrDpbIdx]->Fill(fdMsTime - fdStartTime, uRemappedChannelNr, 1);
950 break;
951 } // case gdpbv100::GET4_V2X_ERR_TOT_RANGE:
953 fhGet4ChanErrors->Fill(dFullChId, 15);
954 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 15);
955 if (kTRUE == fbDebugMonitorMode)
956 fvhRemapChErrFract_gDPB[fuCurrDpbIdx]->Fill(fdMsTime - fdStartTime, uRemappedChannelNr, 1);
957 break;
958 } // case gdpbv100::GET4_V2X_ERR_EVT_DISCARD:
960 fhGet4ChanErrors->Fill(dFullChId, 16);
961 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 16);
962 if (kTRUE == fbDebugMonitorMode)
963 fvhRemapChErrFract_gDPB[fuCurrDpbIdx]->Fill(fdMsTime - fdStartTime, uRemappedChannelNr, 1);
964 break;
965 } // case gdpbv100::GET4_V2X_ERR_ADD_RIS_EDG:
967 fhGet4ChanErrors->Fill(dFullChId, 17);
968 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 17);
969 if (kTRUE == fbDebugMonitorMode)
970 fvhRemapChErrFract_gDPB[fuCurrDpbIdx]->Fill(fdMsTime - fdStartTime, uRemappedChannelNr, 1);
971 break;
972 } // case gdpbv100::GET4_V2X_ERR_UNPAIR_FALL:
974 fhGet4ChanErrors->Fill(dFullChId, 18);
975 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 18);
976 if (kTRUE == fbDebugMonitorMode)
977 fvhRemapChErrFract_gDPB[fuCurrDpbIdx]->Fill(fdMsTime - fdStartTime, uRemappedChannelNr, 1);
978 break;
979 } // case gdpbv100::GET4_V2X_ERR_SEQUENCE_ER:
981 fhGet4ChanErrors->Fill(dFullChId, 19);
982 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 19);
983 if (kTRUE == fbDebugMonitorMode)
984 fvhRemapChErrFract_gDPB[fuCurrDpbIdx]->Fill(fdMsTime - fdStartTime, uRemappedChannelNr, 1);
985 break;
986 } // case gdpbv100::GET4_V2X_ERR_EPOCH_OVERF:
988 fhGet4ChanErrors->Fill(dFullChId, 20);
989 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 20);
990 break;
991 } // case gdpbv100::GET4_V2X_ERR_UNKNOWN:
992 default: // Corrupt error or not yet supported error
993 {
994 fhGet4ChanErrors->Fill(dFullChId, 21);
995 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 21);
996 break;
997 } //
998 } // Switch( mess.getGdpbSysErrData() )
999
1000 switch (uErrorType) {
1013 if (kFALSE == fbIgnoreCriticalErrors)
1014 LOG(info) << " +++++++ > gDPB: " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec
1015 << ", Chip = " << std::setw(2) << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
1016 << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1) << mess.getGdpbSysErrEdge()
1017 << ", Empt = " << std::setw(1) << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
1018 << std::setw(2) << uErrorType << std::dec << " -- GET4 V1 Error Event";
1019 break;
1020 } // critical errors
1023 break;
1032 LOG(debug) << " +++++++ >gDPB: " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec
1033 << ", Chip = " << std::setw(2) << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
1034 << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1) << mess.getGdpbSysErrEdge()
1035 << ", Empt = " << std::setw(1) << mess.getGdpbSysErrUnused() << ", Data = " << std::hex << std::setw(2)
1036 << uErrorType << std::dec << " -- GET4 V1 Error Event ";
1037 break;
1038 } // Input channel related errors (TOT, shaky signals, etc...)
1042 break;
1043 default:
1045 break;
1046 } // switch( uErrorType )
1047
1048 return;
1049}
1050// -------------------------------------------------------------------------
1052{
1053 uint16_t usType = mess.getGdpbSysPattType();
1054 uint16_t usIndex = mess.getGdpbSysPattIndex();
1055 uint32_t uPattern = mess.getGdpbSysPattPattern();
1056 UInt_t uNbBits = (7 == usIndex ? 16 : 32);
1057 fhGdpbSysMessPattType->Fill(usType, fuCurrDpbIdx);
1058
1059
1060 switch (usType) {
1062
1063 if (kTRUE == fbDebugMonitorMode && 0 == usIndex) {
1065
1066 LOG(debug) << Form("Missmatch pattern message => Type %d, Index %2d, "
1067 "Pattern 0x%08X TS %12llu MS %3u Epoch %12llu",
1068 usType, usIndex, uPattern, fulCurrentTsIdx, fuMsIndex, fvulCurrentEpoch[fuCurrDpbIdx]);
1069 } // if( 0 == usIndex )
1070
1071 LOG(debug) << Form("Missmatch pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1072 if (kTRUE == fbDebugMonitorMode)
1073 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1074 UInt_t uBadAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1075
1076 if ((uPattern >> uBit) & 0x1) {
1077 fhPatternMissmatch->Fill(uBadAsic, fuCurrDpbIdx);
1079 fvvbGdpbLastMissmatchPattern[fuCurrDpbIdx][uBadAsic] = kTRUE;
1080 } // if( ( uPattern >> uBit ) & 0x1 )
1081 else
1082 fvvbGdpbLastMissmatchPattern[fuCurrDpbIdx][uBadAsic] = kFALSE;
1083
1084 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1085 break;
1086 } // case gdpbv100::PATT_MISSMATCH:
1087 case gdpbv100::PATT_ENABLE: {
1088 LOG(debug) << Form("ENABLE pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1089
1090 if (kTRUE == fbDebugMonitorMode)
1091 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1092 UInt_t uAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1093
1094 if ((uPattern >> uBit) & 0x1) {
1095 fhPatternEnable->Fill(uAsic, fuCurrDpbIdx);
1097 fvvbGdpbLastEnablePattern[fuCurrDpbIdx][uAsic] = kFALSE;
1098 } // if( ( uPattern >> uBit ) & 0x1 )
1099 else
1101
1102 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1103 break;
1104 } // case gdpbv100::PATT_ENABLE:
1105 case gdpbv100::PATT_RESYNC: {
1106 LOG(debug) << Form("RESYNC pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1107
1108 if (kTRUE == fbDebugMonitorMode)
1109 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1110 UInt_t uBadAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1111
1112 if ((uPattern >> uBit) & 0x1) {
1113 fhPatternResync->Fill(uBadAsic, fuCurrDpbIdx);
1115 fvvbGdpbLastResyncPattern[fuCurrDpbIdx][uBadAsic] = kTRUE;
1116 } // if( ( uPattern >> uBit ) & 0x1 )
1117 else
1118 fvvbGdpbLastResyncPattern[fuCurrDpbIdx][uBadAsic] = kFALSE;
1119
1120 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1121 break;
1122 } // case gdpbv100::PATT_RESYNC:
1123 default: {
1124 LOG(debug) << "Crazy pattern message, subtype " << usType;
1125 break;
1126 } // default
1127 } // switch( usType )
1128
1129 return;
1130}
1131// -------------------------------------------------------------------------
1133{
1134 UInt_t uChan = mess.getGdpbSlcChan();
1135 UInt_t uEdge = mess.getGdpbSlcEdge();
1136 UInt_t uData = mess.getGdpbSlcData();
1137 UInt_t uType = mess.getGdpbSlcType();
1138
1139 Double_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1140 Double_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1141 Double_t dMessTime = fulCurrentMsIdx * 1e-9;
1142
1143
1144 switch (uType) {
1146 fhGet4ChanScm->Fill(dFullChId, uType);
1147 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1148 break;
1149 } // case gdpbv100::GET4_32B_SLC_SCALER:
1151 fhGet4ChanScm->Fill(dFullChId, uType);
1152 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1153 break;
1154 } // case gdpbv100::GET4_32B_SLC_DEADT:
1156 fhGet4ChanScm->Fill(dFullChId, uType);
1157 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1158
1161 if (kFALSE == fbIgnoreCriticalErrors)
1162 LOG(info) << "GET4 Slow Control SPI message, time " << Form("%3.3f", dMessTime) << " s "
1163 << " for board ID " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec << "\n"
1164 << " +++++++ > Chip = " << std::setw(3) << fuGet4Id << ", Chan = " << std::setw(1) << uChan
1165 << ", Edge = " << std::setw(1) << uEdge << ", Type = " << std::setw(1) << mess.getGdpbSlcType()
1166 << ", " << Form("channel %1u,", (uData >> 10) & 0xF) << Form("value 0x%03x ", uData & 0x3FF)
1167 << Form("level %4.1f ", fUnpackPar->GetPadiThresholdVal(uData & 0x3FF))
1168 << Form("(Data = 0x%06x) ", uData);
1169 break;
1170 } // if( gdpbv100::GET4_32B_SLC_SPIREAD == uType )
1172 if (0 == mess.getGdpbSlcChan() && 0 == mess.getGdpbSlcEdge()) // START message
1173 {
1174 fhGet4ChanScm->Fill(dFullChId, uType + 1);
1175 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType + 1);
1176 } // if( 0 == mess.getGdpbSlcChan() && 0 == mess.getGdpbSlcEdge() )
1177 else if (0 == mess.getGdpbSlcChan() && 1 == mess.getGdpbSlcEdge()) // SEU counter message
1178 {
1179 fhGet4ChanScm->Fill(dFullChId, uType);
1180 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1181 } // else if( 0 == mess.getGdpbSlcChan() && 1 == mess.getGdpbSlcEdge() )
1182 break;
1183 } // case gdpbv100::GET4_32B_SLC_START_SEU:
1184 default: break;
1185 } // switch( uType )
1186
1188 fhGet4MessType->Fill(fuGet4Nr, 2);
1190}
1191// -------------------------------------------------------------------------
1193{
1194 Int_t iMsgIndex = mess.getStarTrigMsgIndex();
1195
1196 switch (iMsgIndex) {
1197 case 0:
1198 fvhTokenMsgType[fuCurrDpbIdx]->Fill(0);
1200 break;
1201 case 1:
1202 fvhTokenMsgType[fuCurrDpbIdx]->Fill(1);
1205 break;
1206 case 2:
1207 fvhTokenMsgType[fuCurrDpbIdx]->Fill(2);
1209 break;
1210 case 3: {
1211 fvhTokenMsgType[fuCurrDpbIdx]->Fill(3);
1212
1213 ULong64_t ulNewGdpbTsFull = (fvulGdpbTsMsb[fuCurrDpbIdx] << 24) + (fvulGdpbTsLsb[fuCurrDpbIdx]);
1214 ULong64_t ulNewStarTsFull =
1216 UInt_t uNewToken = mess.getStarTokenStarD();
1217 UInt_t uNewDaqCmd = mess.getStarDaqCmdStarD();
1218 UInt_t uNewTrigCmd = mess.getStarTrigCmdStarD();
1219
1220 if ((uNewToken == fvuStarTokenLast[fuCurrDpbIdx]) && (ulNewGdpbTsFull == fvulGdpbTsFullLast[fuCurrDpbIdx])
1221 && (ulNewStarTsFull == fvulStarTsFullLast[fuCurrDpbIdx]) && (uNewDaqCmd == fvuStarDaqCmdLast[fuCurrDpbIdx])
1222 && (uNewTrigCmd == fvuStarTrigCmdLast[fuCurrDpbIdx])) {
1223 UInt_t uTrigWord = ((fvuStarTrigCmdLast[fuCurrDpbIdx] & 0x00F) << 16)
1224 + ((fvuStarDaqCmdLast[fuCurrDpbIdx] & 0x00F) << 12)
1225 + ((fvuStarTokenLast[fuCurrDpbIdx] & 0xFFF));
1226 LOG(warning) << "Possible error: identical STAR tokens found twice in "
1227 "a row => ignore 2nd! "
1228 << " TS " << fulCurrentTsIdx << " gDBB #" << fuCurrDpbIdx << " "
1229 << Form("token = %5u ", fvuStarTokenLast[fuCurrDpbIdx])
1230 << Form("gDPB ts = %12llu ", fvulGdpbTsFullLast[fuCurrDpbIdx])
1231 << Form("STAR ts = %12llu ", fvulStarTsFullLast[fuCurrDpbIdx])
1232 << Form("DAQ cmd = %2u ", fvuStarDaqCmdLast[fuCurrDpbIdx])
1233 << Form("TRG cmd = %2u ", fvuStarTrigCmdLast[fuCurrDpbIdx]) << Form("TRG Wrd = %5x ", uTrigWord);
1234 return;
1235 } // if exactly same message repeated
1236
1237 // STAR TS counter reset detection
1238 if (ulNewStarTsFull < fvulStarTsFullLast[fuCurrDpbIdx])
1239 LOG(info) << "Probable reset of the STAR TS: old = " << Form("%16llu", fvulStarTsFullLast[fuCurrDpbIdx])
1240 << " new = " << Form("%16llu", ulNewStarTsFull) << " Diff = -"
1241 << Form("%8llu", fvulStarTsFullLast[fuCurrDpbIdx] - ulNewStarTsFull);
1242
1243 // ULong64_t ulGdpbTsDiff = ulNewGdpbTsFull - fvulGdpbTsFullLast[ fuCurrDpbIdx ];
1244 fvulGdpbTsFullLast[fuCurrDpbIdx] = ulNewGdpbTsFull;
1245 fvulStarTsFullLast[fuCurrDpbIdx] = ulNewStarTsFull;
1246 fvuStarTokenLast[fuCurrDpbIdx] = uNewToken;
1247 fvuStarDaqCmdLast[fuCurrDpbIdx] = uNewDaqCmd;
1248 fvuStarTrigCmdLast[fuCurrDpbIdx] = uNewTrigCmd;
1249
1251 if (fuMsIndex < fuNbCoreMsPerTs) {
1253 if (0 <= fdStartTime) {
1258 } // if( 0 < fdStartTime )
1260 } // if( fuMsIndex < fuNbCoreMsPerTs )
1261
1262 break;
1263 } // case 3
1264 default: LOG(error) << "Unknown Star Trigger messageindex: " << iMsgIndex;
1265 } // switch( iMsgIndex )
1266}
1267// -------------------------------------------------------------------------
1268
1270{
1271 std::string sFolder = "eTofMoni";
1272
1273 LOG(info) << "create Histos for eTOF monitoring ";
1274
1276 uint32_t iNbBinsLog = 0;
1278 std::vector<double> dBinsLogVector = GenerateLogBinArray(4, 9, 1, iNbBinsLog);
1279 double* dBinsLog = dBinsLogVector.data();
1280 // double * dBinsLog = GenerateLogBinArray( 4, 9, 1, iNbBinsLog );
1281
1282 /*******************************************************************/
1283 fhMessType = new TH1I("hMessageType", "Nb of message for each type; Type", 1 + gdpbv100::MSG_STAR_TRI_D, 0.,
1285 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_HIT, "HIT");
1286 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_EPOCH, "EPOCH");
1287 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SLOWC, "SLOWC");
1288 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SYST, "SYST");
1289 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_A, "TRI_A");
1290 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_B, "TRI_B");
1291 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_C, "TRI_C");
1292 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_D, "TRI_D");
1293
1294 fhSysMessType = new TH1I("hSysMessType", "Nb of system message for each type; System Type", 1 + gdpbv100::SYS_PATTERN,
1295 0., 1 + gdpbv100::SYS_PATTERN);
1296 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_ERROR, "GET4 ERROR");
1297 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GDPB_UNKWN, "UNKW GET4 MSG");
1298 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_SYNC_MISS, "SYS_GET4_SYNC_MISS");
1299 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_PATTERN, "SYS_PATTERN");
1300
1301 fhGet4MessType = new TH2I("hGet4MessType", "Nb of message for each type per GET4; GET4 chip # ; Type", fuNrOfGet4, 0.,
1302 fuNrOfGet4, 4, 0., 4.);
1303 fhGet4MessType->GetYaxis()->SetBinLabel(1, "DATA 32b");
1304 fhGet4MessType->GetYaxis()->SetBinLabel(2, "EPOCH");
1305 fhGet4MessType->GetYaxis()->SetBinLabel(3, "S.C. M");
1306 fhGet4MessType->GetYaxis()->SetBinLabel(4, "ERROR");
1307 // fhGet4MessType->GetYaxis()->SetBinLabel( 5, "DATA 24b");
1308 // fhGet4MessType->GetYaxis()->SetBinLabel( 6, "STAR Trigger");
1309
1310 fhGet4ChanScm = new TH2I("hGet4ChanScm", "SC messages per GET4 channel; GET4 channel # ; SC type",
1312 fhGet4ChanScm->GetYaxis()->SetBinLabel(1, "Hit Scal");
1313 fhGet4ChanScm->GetYaxis()->SetBinLabel(2, "Deadtime");
1314 fhGet4ChanScm->GetYaxis()->SetBinLabel(3, "SPI");
1315 fhGet4ChanScm->GetYaxis()->SetBinLabel(4, "SEU Scal");
1316 fhGet4ChanScm->GetYaxis()->SetBinLabel(5, "START");
1317
1318 fhGet4ChanErrors = new TH2I("hGet4ChanErrors", "Error messages per GET4 channel; GET4 channel # ; Error",
1320 fhGet4ChanErrors->GetYaxis()->SetBinLabel(1, "0x00: Readout Init ");
1321 fhGet4ChanErrors->GetYaxis()->SetBinLabel(2, "0x01: Sync ");
1322 fhGet4ChanErrors->GetYaxis()->SetBinLabel(3, "0x02: Epoch count sync");
1323 fhGet4ChanErrors->GetYaxis()->SetBinLabel(4, "0x03: Epoch ");
1324 fhGet4ChanErrors->GetYaxis()->SetBinLabel(5, "0x04: FIFO Write ");
1325 fhGet4ChanErrors->GetYaxis()->SetBinLabel(6, "0x05: Lost event ");
1326 fhGet4ChanErrors->GetYaxis()->SetBinLabel(7, "0x06: Channel state ");
1327 fhGet4ChanErrors->GetYaxis()->SetBinLabel(8, "0x07: Token Ring state");
1328 fhGet4ChanErrors->GetYaxis()->SetBinLabel(9, "0x08: Token ");
1329 fhGet4ChanErrors->GetYaxis()->SetBinLabel(10, "0x09: Error Readout ");
1330 fhGet4ChanErrors->GetYaxis()->SetBinLabel(11, "0x0a: SPI ");
1331 fhGet4ChanErrors->GetYaxis()->SetBinLabel(12, "0x0b: DLL Lock error "); // <- From GET4 v1.2
1332 fhGet4ChanErrors->GetYaxis()->SetBinLabel(13, "0x0c: DLL Reset invoc."); // <- From GET4 v1.2
1333 fhGet4ChanErrors->GetYaxis()->SetBinLabel(14, "0x11: Overwrite ");
1334 fhGet4ChanErrors->GetYaxis()->SetBinLabel(15, "0x12: ToT out of range");
1335 fhGet4ChanErrors->GetYaxis()->SetBinLabel(16, "0x13: Event Discarded ");
1336 fhGet4ChanErrors->GetYaxis()->SetBinLabel(17, "0x14: Add. Rising edge"); // <- From GET4 v1.3
1337 fhGet4ChanErrors->GetYaxis()->SetBinLabel(18, "0x15: Unpaired Falling"); // <- From GET4 v1.3
1338 fhGet4ChanErrors->GetYaxis()->SetBinLabel(19, "0x16: Sequence error "); // <- From GET4 v1.3
1339 fhGet4ChanErrors->GetYaxis()->SetBinLabel(20, "0x7f: Unknown ");
1340 fhGet4ChanErrors->GetYaxis()->SetBinLabel(21, "Corrupt/unsuprtd error");
1341
1343 new TH2I("hGet4EpochFlags", "Epoch flags per GET4; GET4 chip # ; Type", fuNrOfGet4, 0., fuNrOfGet4, 4, 0., 4.);
1344 fhGet4EpochFlags->GetYaxis()->SetBinLabel(1, "SYNC");
1345 fhGet4EpochFlags->GetYaxis()->SetBinLabel(2, "Ep LOSS");
1346 fhGet4EpochFlags->GetYaxis()->SetBinLabel(3, "Da LOSS");
1347 fhGet4EpochFlags->GetYaxis()->SetBinLabel(4, "MISSMAT");
1348
1349 Double_t dGdpbMin = -0.5;
1350 Double_t dGdpbMax = fuNrOfGdpbs + dGdpbMin;
1352 new TH2I("hGdpbAsicSpiCounts", "SPI messages count per gDPB and ASIC; ASIC Idx []; gDPB []; SPI msg[]",
1353 fuNrOfGet4PerGdpb, -0.5, fuNrOfGet4PerGdpb - 0.5, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1354
1356 new TH2I("hGdpbMessageType", "Nb of message for each type per gDPB; Type; gDPB []", 1 + gdpbv100::MSG_STAR_TRI_D,
1357 0., 1 + gdpbv100::MSG_STAR_TRI_D, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1358 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_HIT, "HIT");
1359 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_EPOCH, "EPOCH");
1360 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SLOWC, "SLOWC");
1361 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SYST, "SYST");
1362 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_A, "TRI_A");
1363 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_B, "TRI_B");
1364 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_C, "TRI_C");
1365 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_D, "TRI_D");
1366
1368 new TH2I("hGdpbSysMessType", "Nb of system message for each type per gDPB; System Type; gDPB []",
1369 1 + gdpbv100::SYS_PATTERN, 0., 1 + gdpbv100::SYS_PATTERN, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1370 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_ERROR, "GET4 ERROR");
1371 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GDPB_UNKWN, "UNKW GET4 MSG");
1372 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_SYNC_MISS, "SYS_GET4_SYNC_MISS");
1373 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_PATTERN, "SYS_PATTERN");
1374
1376 new TH2I("hGdpbSysMessPattType", "Nb of pattern message for each type per gDPB; Pattern Type; gDPB []",
1377 1 + gdpbv100::PATT_RESYNC, 0., 1 + gdpbv100::PATT_RESYNC, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1378 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_MISSMATCH, "PATT_MISSMATCH");
1379 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_ENABLE, "PATT_ENABLE");
1380 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_RESYNC, "PATT_RESYNC");
1381
1383 new TH2I("hGdpbEpochFlags", "Epoch flags per gDPB; gDPB # ; Type", fuNrOfGdpbs, dGdpbMin, dGdpbMax, 4, 0., 4.);
1384 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(1, "SYNC");
1385 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(2, "Ep LOSS");
1386 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(3, "Da LOSS");
1387 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(4, "MISSMAT");
1388
1389 fhGdpbEpochSyncEvo = new TH2D("hGdpbEpochSyncEvo", "Epoch SYNC per second and gDPB; Time[s]; gDPB #; SYNC Nb",
1390 fuHistoryHistoSize, 0, fuHistoryHistoSize, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1391
1393 new TH2D("hGdpbEpochMissEvo", "Epoch Missmatch per second and gDPB; Time[s]; gDPB #; Missmatch Nb",
1394 fuHistoryHistoSize, 0, fuHistoryHistoSize, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1395
1397 new TH1D("hGdpbEndMsBufferNotEmpty", "MS where buffer is not empty at end, per gDPB; gDPB #; Bad MS", fuNrOfGdpbs,
1398 dGdpbMin, dGdpbMax);
1399
1400 fhGdpbEndMsDataLost = new TH2D("hGdpbEndMsDataLost",
1401 "Amount of lost data when buffer not empty at end, per MS and "
1402 "gDPB; gDPB #; Lost Data per bad MS []; Bad MS",
1403 fuNrOfGdpbs, dGdpbMin, dGdpbMax, iNbBinsLog, dBinsLog);
1404
1405 fhGdpbHitRate = new TH2D("fhGdpbHitRate", "Hit rate per second and gDPB; Time[s]; gDPB #; HITS Nb",
1406 fuHistoryHistoSize, 0, fuHistoryHistoSize, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1407
1408 if (kTRUE == fbDebugMonitorMode) {
1409 fhNbMissPatternPerMs = new TH2I("hNbMissPatternPerMs",
1410 "Nb of missmatch pattern per MS for each gDPB; Number of "
1411 "pattern messages []; gDPB []; MS",
1412 1000, -0.5, 999.5, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1413
1414 fhPatternMissmatch = new TH2I("hPatternMissmatch", "Missmatch pattern integral per gDPB; ASIC Pattern []; gDPB []",
1415 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1416
1417 fhPatternEnable = new TH2I("hPatternEnable", "Enable pattern integral per gDPB; ASIC Pattern []; gDPB []",
1418 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1419
1420 fhPatternResync = new TH2I("hPatternResync", "Resync pattern integral per gDPB; ASIC Pattern []; gDPB []",
1421 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dGdpbMin, dGdpbMax);
1422 } // if( kTRUE == fbDebugMonitorMode )
1423
1425 AddHistoToVector(fhMessType, sFolder);
1445 if (kTRUE == fbDebugMonitorMode) {
1450 } // if( kTRUE == fbDebugMonitorMode )
1451
1452 /*******************************************************************/
1453 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1454 UInt_t uGdpbIndex = uGdpb;
1455 if (-1 < fiGdpbIndex) uGdpbIndex += fiGdpbIndex;
1456
1457 std::string sFolderGdpb = Form("gdpb%02u", uGdpbIndex);
1458 std::string sFolderGdpbPatt = Form("gdpb%02u/Pattern", uGdpbIndex);
1459 std::string sFolderGdpbTrig = Form("gdpb%02u/Trigger", uGdpbIndex);
1460
1461 fvhGdpbGet4MessType.push_back(
1462 new TH2I(Form("hGdpbGet4MessType_%02u", uGdpb),
1463 Form("Nb of message for each type per GET4 in Gdpb %02u; GET4 chip # ; Type", uGdpbIndex),
1464 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, 4, 0., 4.));
1465 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(1, "DATA 32b");
1466 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(2, "EPOCH");
1467 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(3, "S.C. M");
1468 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(4, "ERROR");
1469
1470 fvhGdpbGet4ChanScm.push_back(
1471 new TH2I(Form("hGdpbGet4ChanScm_%02u", uGdpb),
1472 Form("SC messages per GET4 channel in Gdpb %02u; GET4 channel # ; SC type", uGdpbIndex),
1473 2 * fuNrOfChannelsPerGdpb, 0., fuNrOfChannelsPerGdpb, 5, 0., 5.));
1474 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(1, "Hit Scal");
1475 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(2, "Deadtime");
1476 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(3, "SPI");
1477 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(4, "SEU Scal");
1478 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(5, "START");
1479
1480 fvhGdpbGet4ChanErrors.push_back(
1481 new TH2I(Form("hGdpbGet4ChanErrors_%02u", uGdpb),
1482 Form("Error messages per GET4 channel in Gdpb %02u; GET4 channel # ; Error", uGdpbIndex),
1483 fuNrOfChannelsPerGdpb, 0., fuNrOfChannelsPerGdpb, 22, 0., 22.));
1484 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(1, "0x00: Readout Init ");
1485 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(2, "0x01: Sync ");
1486 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(3, "0x02: Epoch count sync");
1487 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(4, "0x03: Epoch ");
1488 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(5, "0x04: FIFO Write ");
1489 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(6, "0x05: Lost event ");
1490 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(7, "0x06: Channel state ");
1491 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(8, "0x07: Token Ring state");
1492 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(9, "0x08: Token ");
1493 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(10, "0x09: Error Readout ");
1494 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(11, "0x0a: SPI ");
1495 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(12, "0x0b: DLL Lock error "); // <- From GET4 v1.2
1496 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(13, "0x0c: DLL Reset invoc."); // <- From GET4 v1.2
1497 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(14, "0x11: Overwrite "); // <- From GET4 v1.0 to 1.3
1498 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(15, "0x12: ToT out of range");
1499 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(16, "0x13: Event Discarded ");
1500 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(17, "0x14: Add. Rising edge"); // <- From GET4 v1.3
1501 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(18, "0x15: Unpaired Falling"); // <- From GET4 v1.3
1502 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(19, "0x16: Sequence error "); // <- From GET4 v1.3
1503 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(20, "0x17: Epoch Overflow "); // <- From GET4 v2.0
1504 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(21, "0x7f: Unknown ");
1505 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(22, "Corrupt/unsuprtd error");
1506
1508 if (kTRUE == fbDebugMonitorMode) {
1509 fvhRawFt_gDPB.push_back(new TH2I(Form("RawFt_gDPB_%02u", uGdpbIndex),
1510 Form("Raw FineTime gDPB %02u Plot 0; channel; FineTime [bin]", uGdpbIndex),
1512
1513 fvhRawCt_gDPB.push_back(new TH2I(Form("RawCt_gDPB_%02u", uGdpbIndex),
1514 Form("Raw CoarseTime gDPB %02u Plot 0; channel; CoarseTime [bin]", uGdpbIndex),
1515 fuNrOfChannelsPerGdpb, 0, fuNrOfChannelsPerGdpb, 4096, 0, 4096));
1516 } // if( kTRUE == fbDebugMonitorMode )
1517
1518 fvhRemapTot_gDPB.push_back(new TH2I(Form("RemapTot_gDPB_%02u", uGdpbIndex),
1519 Form("Raw TOT gDPB %02u remapped; PADI channel; TOT [bin]", uGdpbIndex),
1521
1522 fvhRemapChCount_gDPB.push_back(new TH1I(Form("RemapChCount_gDPB_%02u", uGdpbIndex),
1523 Form("Channel counts gDPB %02u remapped; PADI channel; Hits", uGdpbIndex),
1526
1527 fvhRemapChRate_gDPB.push_back(new TH2D(Form("RemapChRate_gDPB_%02u", uGdpbIndex),
1528 Form("PADI channel rate gDPB %02u; Time in run [s]; PADI "
1529 "channel; Rate [1/s]",
1530 uGdpbIndex),
1534
1535 if (kTRUE == fbDebugMonitorMode)
1536 fvhRemapChErrFract_gDPB.push_back(new TProfile2D(Form("RemapChErrFract_gDPB_%02u", uGdpbIndex),
1537 Form("PADI channel error fraction gDPB %02u; Time in "
1538 "run [s]; PADI channel; Fraction []",
1539 uGdpbIndex),
1540 18000, 0, 180, fuNrOfFeePerGdpb * fuNrOfChannelsPerFee, 0,
1542
1544 if (kTRUE == fbDebugMonitorMode) {
1546 new TH2I(Form("hGdpbPatternMissmatchEvo_%02u", uGdpbIndex),
1547 Form("Missmatch pattern vs TS index in gDPB %02u; TS # ; ASIC Pattern []", uGdpbIndex), 10000, 0.,
1548 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1549
1550 fvhGdpbPatternEnableEvo.push_back(
1551 new TH2I(Form("hGdpbPatternEnableEvo_%02u", uGdpbIndex),
1552 Form("Enable pattern vs TS index in gDPB %02u; TS # ; ASIC Pattern []", uGdpbIndex), 10000, 0., 100000,
1554
1555 fvhGdpbPatternResyncEvo.push_back(
1556 new TH2I(Form("hGdpbPatternResyncEvo%02u", uGdpbIndex),
1557 Form("Resync pattern vs TS index in gDPB %02u; TS # ; ASIC Pattern []", uGdpbIndex), 10000, 0., 100000,
1559
1560 fvhGdpbMissmatchEvoPerTs.push_back(
1561 new TH2I(Form("hGdpbMissmatchEvoPerTs%02u", uGdpbIndex),
1562 Form("Missmatch vs TS index in gDPB %02u; TS # ; Asic []; Missmatch? []", uGdpbIndex), 10000, 0.,
1563 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1564
1565 fvhGdpbMissmatchEnaEvoPerTs.push_back(new TH2I(Form("hGdpbMissmatchEnaEvoPerTs%02u", uGdpbIndex),
1566 Form("Enable+Missmatch vs TS index in gDPB %02u; TS # ; Asic "
1567 "[]; Enabled & Missmatch? []",
1568 uGdpbIndex),
1569 10000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1570
1571 fvhGdpbEnableEvoPerTs.push_back(
1572 new TH2I(Form("hGdpbEnableEvoPerTs%02u", uGdpbIndex),
1573 Form("Enable vs TS index in gDPB %02u; TS # ; Asic []; Enabled? []", uGdpbIndex), 100000, 0., 100000,
1575
1576 fvhGdpbResyncEvoPerTs.push_back(
1577 new TH2I(Form("hGdpbResyncEvoPerTs%02u", uGdpbIndex),
1578 Form("Resync vs TS index in gDPB %02u; TS # ; Asic []; Resync? []", uGdpbIndex), 10000, 0., 100000,
1580
1581 fvhGdpbResyncEnaEvoPerTs.push_back(new TH2I(Form("hGdpbResyncEnaEvoPerTs%02u", uGdpbIndex),
1582 Form("Enable+Resync vs TS index in gDPB %02u; TS # ; Asic []; "
1583 "Enabled & Resync? []",
1584 uGdpbIndex),
1585 10000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1586
1587 fvhGdpbStateEvoPerTs.push_back(new TH2I(Form("hGdpbStateEvoPerTs%02u", uGdpbIndex),
1588 Form("ASIC State vs TS index in gDPB %02u; TS # ; Asic []; 0 = Off, 1 "
1589 "= OK, 2 = Miss, 3 = Resync, 4 = Miss + Resync []",
1590 uGdpbIndex),
1591 100000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1592 } // if( kTRUE == fbDebugMonitorMode )
1593
1596 fvhTokenMsgType.push_back(new TH1F(Form("hTokenMsgType_gDPB_%02u", uGdpbIndex),
1597 Form("STAR trigger Messages type gDPB %02u; Type ; Counts", uGdpbIndex), 4, 0,
1598 4));
1599 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(1, "A"); // gDPB TS high
1600 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(2, "B"); // gDPB TS low, STAR TS high
1601 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(3, "C"); // STAR TS mid
1602 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(4, "D"); // STAR TS low, token, CMDs
1603
1604 fvhTriggerRate.push_back(new TH1F(Form("hTriggerRate_gDPB_%02u", uGdpbIndex),
1605 Form("STAR trigger signals per second gDPB %02u; Time[s] ; Counts", uGdpbIndex),
1607
1608 fvhCmdDaqVsTrig.push_back(new TH2I(
1609 Form("hCmdDaqVsTrig_gDPB_%02u", uGdpbIndex),
1610 Form("STAR daq command VS STAR trigger command gDPB %02u; DAQ ; TRIGGER", uGdpbIndex), 16, 0, 16, 16, 0, 16));
1611 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(1, "0x0: no-trig "); // idle link
1612 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1613 2, "0x1: clear "); // clears redundancy counters on the readout boards
1614 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(3, "0x2: mast-rst"); // general reset of the whole front-end logic
1615 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(4, "0x3: spare "); // reserved
1616 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1617 5, "0x4: trigg. 0"); // Default physics readout, all det support required
1618 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(6, "0x5: trigg. 1"); //
1619 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(7, "0x6: trigg. 2"); //
1620 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(8, "0x7: trigg. 3"); //
1621 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(9, "0x8: puls. 0"); //
1622 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(10, "0x9: puls. 1"); //
1623 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(11, "0xA: puls. 2"); //
1624 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(12, "0xB: puls. 3"); //
1625 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1626 13,
1627 "0xC: config "); // housekeeping trigger: return geographic info of FE
1628 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(14, "0xD: abort "); // aborts and clears an active event
1629 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(15, "0xE: L1accept"); //
1630 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(16, "0xF: L2accept"); //
1631 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(1, "0x0: 0"); // To be filled at STAR
1632 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(2, "0x1: 1"); // To be filled at STAR
1633 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(3, "0x2: 2"); // To be filled at STAR
1634 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(4, "0x3: 3"); // To be filled at STAR
1635 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(5, "0x4: 4"); // To be filled at STAR
1636 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(6, "0x5: 5"); // To be filled at STAR
1637 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(7, "0x6: 6"); // To be filled at STAR
1638 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(8, "0x7: 7"); // To be filled at STAR
1639 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(9, "0x8: 8"); // To be filled at STAR
1640 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(10, "0x9: 9"); // To be filled at STAR
1641 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(11, "0xA: 10"); // To be filled at STAR
1642 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(12, "0xB: 11"); // To be filled at STAR
1643 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(13, "0xC: 12"); // To be filled at STAR
1644 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(14, "0xD: 13"); // To be filled at STAR
1645 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(15, "0xE: 14"); // To be filled at STAR
1646 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(16, "0xF: 15"); // To be filled at STAR
1647
1648 fvhStarTokenEvo.push_back(new TH2I(Form("hStarTokenEvo_gDPB_%02u", uGdpbIndex),
1649 Form("STAR token value VS time gDPB %02u; Time in Run [s] ; "
1650 "STAR Token; Counts",
1651 uGdpbIndex),
1652 fuHistoryHistoSize, 0, fuHistoryHistoSize, 410, 0, 4100));
1653
1654 fvhStarTrigGdpbTsEvo.push_back(new TProfile(Form("hStarTrigGdpbTsEvo_gDPB_%02u", uGdpbIndex),
1655 Form("gDPB TS in STAR triger tokens for gDPB %02u; Time in "
1656 "Run [s] ; gDPB TS;",
1657 uGdpbIndex),
1659
1660 fvhStarTrigStarTsEvo.push_back(new TProfile(Form("hStarTrigStarTsEvo_gDPB_%02u", uGdpbIndex),
1661 Form("STAR TS in STAR triger tokens for gDPB %02u; Time in "
1662 "Run [s] ; STAR TS;",
1663 uGdpbIndex),
1665
1666
1669 AddHistoToVector(fvhGdpbGet4MessType[uGdpb], sFolderGdpb);
1670 AddHistoToVector(fvhGdpbGet4ChanScm[uGdpb], sFolderGdpb);
1671 AddHistoToVector(fvhGdpbGet4ChanErrors[uGdpb], sFolderGdpb);
1673 if (kTRUE == fbDebugMonitorMode) {
1674 AddHistoToVector(fvhRawFt_gDPB[uGdpb], sFolderGdpb);
1675 AddHistoToVector(fvhRawCt_gDPB[uGdpb], sFolderGdpb);
1676 } // if( kTRUE == fbDebugMonitorMode )
1677 AddHistoToVector(fvhRemapTot_gDPB[uGdpb], sFolderGdpb);
1678 AddHistoToVector(fvhRemapChCount_gDPB[uGdpb], sFolderGdpb);
1679 AddHistoToVector(fvhRemapChRate_gDPB[uGdpb], sFolderGdpb);
1680 if (kTRUE == fbDebugMonitorMode) {
1681 AddHistoToVector(fvhRemapChErrFract_gDPB[uGdpb], sFolderGdpb);
1683 AddHistoToVector(fvhGdpbPatternMissmatchEvo[uGdpb], sFolderGdpbPatt);
1684 AddHistoToVector(fvhGdpbPatternEnableEvo[uGdpb], sFolderGdpbPatt);
1685 AddHistoToVector(fvhGdpbPatternResyncEvo[uGdpb], sFolderGdpbPatt);
1687 AddHistoToVector(fvhGdpbMissmatchEvoPerTs[uGdpb], sFolderGdpbPatt);
1688 AddHistoToVector(fvhGdpbMissmatchEnaEvoPerTs[uGdpb], sFolderGdpbPatt);
1689 AddHistoToVector(fvhGdpbEnableEvoPerTs[uGdpb], sFolderGdpbPatt);
1690 AddHistoToVector(fvhGdpbResyncEvoPerTs[uGdpb], sFolderGdpbPatt);
1691 AddHistoToVector(fvhGdpbResyncEnaEvoPerTs[uGdpb], sFolderGdpbPatt);
1692 AddHistoToVector(fvhGdpbStateEvoPerTs[uGdpb], sFolderGdpbPatt);
1693 } // if( kTRUE == fbDebugMonitorMode )
1695 AddHistoToVector(fvhTokenMsgType[uGdpb], sFolderGdpbTrig);
1696 AddHistoToVector(fvhTriggerRate[uGdpb], sFolderGdpbTrig);
1697 AddHistoToVector(fvhCmdDaqVsTrig[uGdpb], sFolderGdpbTrig);
1698 AddHistoToVector(fvhStarTokenEvo[uGdpb], sFolderGdpbTrig);
1699 AddHistoToVector(fvhStarTrigGdpbTsEvo[uGdpb], sFolderGdpbTrig);
1700 AddHistoToVector(fvhStarTrigStarTsEvo[uGdpb], sFolderGdpbTrig);
1701 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1702
1703 /*******************************************************************/
1704 fhMsgCntEvo = new TH1I("hMsgCntEvo",
1705 "Evolution of Hit & error msgs counts vs time in run; "
1706 "Time in run [s]; Msgs Count []",
1708 fhHitCntEvo = new TH1I("hHitCntEvo", "Evolution of Hit counts vs time in run; Time in run [s]; Hits Count []",
1710 fhErrorCntEvo = new TH1I("hErrorCntEvo", "Evolution of Error counts vs time in run; Time in run [s]; Error Count []",
1712 fhLostEvtCntEvo = new TH1I("hLostEvtCntEvo",
1713 "Evolution of LostEvent counts vs time in run; "
1714 "Time in run [s]; LostEvent Count []",
1716
1717 fhErrorFractEvo = new TProfile("hErrorFractEvo",
1718 "Evolution of Error Fraction vs time in run; "
1719 "Time in run [s]; Error Fract []",
1721 fhLostEvtFractEvo = new TProfile("hLostEvtFractEvo",
1722 "Evolution of LostEvent Fraction vs time in "
1723 "run; Time in run [s]; LostEvent Fract []",
1725
1726 fhMsgCntPerMsEvo = new TH2I("hMsgCntPerMsEvo",
1727 "Evolution of Hit & error msgs counts, per MS vs time in run; "
1728 "Time in run [s]; Hits Count/MS []; MS",
1729 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog, dBinsLog);
1730 fhHitCntPerMsEvo = new TH2I("hHitCntPerMsEvo",
1731 "Evolution of Hit counts, per MS vs time in run; "
1732 "Time in run [s]; Hits Count/MS []; MS",
1733 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog, dBinsLog);
1734 fhErrorCntPerMsEvo = new TH2I("hErrorCntPerMsEvo",
1735 "Evolution of Error counts, per MS vs time in "
1736 "run; Time in run [s]; Error Count/MS []; MS",
1737 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog, dBinsLog);
1738 fhLostEvtCntPerMsEvo = new TH2I("hLostEvtCntPerMsEvo",
1739 "Evolution of LostEvent, per MS counts vs time in run; Time in "
1740 "run [s]; LostEvent Count/MS []; MS",
1741 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog, dBinsLog);
1742
1743 fhErrorFractPerMsEvo = new TH2I("hErrorFractPerMsEvo",
1744 "Evolution of Error Fraction, per MS vs time in run; Time in run "
1745 "[s]; Error Fract/MS []; MS",
1746 fuHistoryHistoSize, 0, fuHistoryHistoSize, 1000, 0, 1);
1747 fhLostEvtFractPerMsEvo = new TH2I("hLostEvtFractPerMsEvo",
1748 "Evolution of LostEvent Fraction, per MS vs time in run; Time in "
1749 "run [s]; LostEvent Fract/MS []; MS",
1750 fuHistoryHistoSize, 0, fuHistoryHistoSize, 1000, 0, 1);
1751
1753 AddHistoToVector(fhMsgCntEvo, sFolder);
1754 AddHistoToVector(fhHitCntEvo, sFolder);
1757
1760
1766
1768 // delete dBinsLog;
1769
1770 /*******************************************************************/
1771
1772 /*******************************************************************/
1775 fcSummary = new TCanvas("cSummary", "gDPB Monitoring Summary");
1776 fcSummary->Divide(2, 3);
1777
1778 // 1st Column: Messages types
1779 fcSummary->cd(1);
1780 gPad->SetGridx();
1781 gPad->SetGridy();
1782 gPad->SetLogy();
1783 fhMessType->Draw();
1784
1785 fcSummary->cd(2);
1786 gPad->SetGridx();
1787 gPad->SetGridy();
1788 gPad->SetLogy();
1789 fhSysMessType->Draw();
1790
1791 fcSummary->cd(3);
1792 gPad->SetGridx();
1793 gPad->SetGridy();
1794 gPad->SetLogz();
1795 fhGet4MessType->Draw("colz");
1796
1797 // 2nd Column: GET4 Errors + Epoch flags + SCm
1798 fcSummary->cd(4);
1799 gPad->SetGridx();
1800 gPad->SetGridy();
1801 gPad->SetLogz();
1802 fhGet4ChanErrors->Draw("colz");
1803
1804 fcSummary->cd(5);
1805 gPad->SetGridx();
1806 gPad->SetGridy();
1807 gPad->SetLogz();
1808 fhGet4EpochFlags->Draw("colz");
1809
1810 fcSummary->cd(6);
1811 gPad->SetGridx();
1812 gPad->SetGridy();
1813 fhGet4ChanScm->Draw("colz");
1814
1815 AddCanvasToVector(fcSummary, "canvases");
1817
1819 fcSummaryGdpb = new TCanvas("cSummaryGdpb", "gDPB Monitoring Summary");
1820 fcSummaryGdpb->Divide(2, 3);
1821
1822 fcSummaryGdpb->cd(1);
1823 gPad->SetGridx();
1824 gPad->SetGridy();
1825 gPad->SetLogz();
1826 fhGdpbMessType->Draw("colz");
1827
1828 fcSummaryGdpb->cd(2);
1829 gPad->SetGridx();
1830 gPad->SetGridy();
1831 gPad->SetLogz();
1832 fhGdpbSysMessPattType->Draw("text colz");
1833
1834 fcSummaryGdpb->cd(3);
1835 gPad->SetGridx();
1836 gPad->SetGridy();
1837 gPad->SetLogz();
1838 fhGdpbSysMessType->Draw("colz");
1839
1840 fcSummaryGdpb->cd(5);
1841 gPad->SetGridx();
1842 gPad->SetGridy();
1843 gPad->SetLogz();
1844 fhGdpbEpochFlags->Draw("text colz");
1845
1846 fcSummaryGdpb->cd(4);
1847 gPad->SetGridx();
1848 gPad->SetGridy();
1849 fhGdpbEpochSyncEvo->Draw("colz");
1850
1851 fcSummaryGdpb->cd(6);
1852 gPad->SetGridx();
1853 gPad->SetGridy();
1854 gPad->SetLogz();
1855 fhGdpbEpochMissEvo->Draw("colz");
1856
1857 AddCanvasToVector(fcSummaryGdpb, "canvases");
1859 fcStarTrigTokenType = new TCanvas("cStarTrigTokenType", "STAR trigger token message type per gDPB");
1860 fcStarTriggerRate = new TCanvas("cStarTriggerRate", "STAR trigger rate per gDPB");
1861 fcStarTrigCmdDaqVsTrig = new TCanvas("cStarTrigCmdDaqVsTrig", "STAR trigger command types per gDPB");
1862 fcStarTrigStarTokenEvo = new TCanvas("cStarTrigStarTokenEvo", "STAR trigger token evolution per gDPB");
1863 fcStarTrigGdpbTsEvo = new TCanvas("cStarTrigGdpbTsEvo", "STAR trigger gDPB TS evo per gDPB");
1864 fcStarTrigStarTsEvo = new TCanvas("cStarTrigStarTsEvo", "STAR trigger STAR TS evo per gDPB");
1865
1866 fcStarTrigTokenType->Divide(4, 3);
1867 fcStarTriggerRate->Divide(4, 3);
1868 fcStarTrigCmdDaqVsTrig->Divide(4, 3);
1869 fcStarTrigStarTokenEvo->Divide(4, 3);
1870 fcStarTrigGdpbTsEvo->Divide(4, 3);
1871 fcStarTrigStarTsEvo->Divide(4, 3);
1872
1879
1880 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1881 UInt_t uGdpbIndex = uGdpb;
1882 if (-1 < fiGdpbIndex) uGdpbIndex += fiGdpbIndex;
1883
1884 fvcSumGdpbGet4.push_back(
1885 new TCanvas(Form("cSumGdpb%02u", uGdpbIndex), Form("Summary per GET4 or channel for gDPB %02u", uGdpbIndex)));
1886 fvcSumGdpbGet4[uGdpb]->Divide(2, 2);
1887
1888 fvcSumGdpbGet4[uGdpb]->cd(1);
1889 gPad->SetGridx();
1890 gPad->SetGridy();
1891 gPad->SetLogz();
1892 fvhGdpbGet4MessType[uGdpb]->Draw("colz");
1893
1894 fvcSumGdpbGet4[uGdpb]->cd(2);
1895 gPad->SetGridx();
1896 gPad->SetGridy();
1897 gPad->SetLogz();
1898 fvhGdpbGet4ChanScm[uGdpb]->Draw("colz");
1899
1900 fvcSumGdpbGet4[uGdpb]->cd(3);
1901 gPad->SetGridx();
1902 gPad->SetGridy();
1903 gPad->SetLogz();
1904 fvhGdpbGet4ChanErrors[uGdpb]->Draw("colz");
1905
1906 fvcSumGdpbGet4[uGdpb]->cd(4);
1907 gPad->SetGridx();
1908 gPad->SetGridy();
1909 gPad->SetLogz();
1910 fvhRemapTot_gDPB[uGdpb]->Draw("colz");
1911
1912
1913 AddCanvasToVector(fvcSumGdpbGet4[uGdpb], "canvases");
1914
1915 fcStarTrigTokenType->cd(1 + uGdpb);
1916 gPad->SetGridx();
1917 gPad->SetGridy();
1918 fvhTokenMsgType[uGdpb]->Draw("hist");
1919
1920 fcStarTriggerRate->cd(1 + uGdpb);
1921 gPad->SetGridx();
1922 gPad->SetGridy();
1923 gPad->SetLogy();
1924 fvhTriggerRate[uGdpb]->Draw("hist");
1925
1926 fcStarTrigCmdDaqVsTrig->cd(1 + uGdpb);
1927 gPad->SetGridx();
1928 gPad->SetGridy();
1929 gPad->SetLogz();
1930 fvhCmdDaqVsTrig[uGdpb]->Draw("colz");
1931
1932 fcStarTrigStarTokenEvo->cd(1 + uGdpb);
1933 gPad->SetGridx();
1934 gPad->SetGridy();
1935 gPad->SetLogz();
1936 fvhStarTokenEvo[uGdpb]->Draw("colz");
1937
1938 fcStarTrigGdpbTsEvo->cd(1 + uGdpb);
1939 gPad->SetGridx();
1940 gPad->SetGridy();
1941 fvhStarTrigGdpbTsEvo[uGdpb]->Draw("hist");
1942
1943 fcStarTrigStarTsEvo->cd(1 + uGdpb);
1944 gPad->SetGridx();
1945 gPad->SetGridy();
1946 fvhStarTrigStarTsEvo[uGdpb]->Draw("hist");
1947 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1948 /*******************************************************************/
1949
1950 return kTRUE;
1951}
1953{
1954 if (kTRUE == fbDebugMonitorMode) {
1956 // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1957 UInt_t uGdpb = fuCurrDpbIdx;
1958 for (UInt_t uAsic = 0; uAsic < fuNrOfGet4PerGdpb; ++uAsic) {
1959 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1960 fvhGdpbMissmatchEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1961 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1962
1963 if (fvvbGdpbLastEnablePattern[uGdpb][uAsic]) {
1964 fvhGdpbEnableEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1965
1966 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1967 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1968 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1969
1970 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1971 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1972 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1973
1975 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1976 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1977 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 4);
1978 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1979 else
1980 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 2);
1981 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1982 else if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1983 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 3);
1984 } // else if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1985 else
1986 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 1);
1987 } // if( fvvbGdpbLastEnablePattern[ uGdpb ][ uAsic ] )
1988 else
1989 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 0);
1990
1991 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1992 fvhGdpbResyncEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1993 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1994 } // Loop on gDPB and ASICs
1995 } // if( kTRUE == fbDebugMonitorMode )
1996 /*
1997 UInt_t uCountHitsInMs = 0;
1998 UInt_t uCountErrorsInMs = 0;
1999 UInt_t uCountLostEvtInMs = 0;
2000
2001 Double_t dFractErrorsInMs = uCountErrorsInMs;
2002 Double_t dFractLostEvtInMs = uCountLostEvtInMs;
2003 dFractErrorsInMs /= ( uCountHitsInMs + uCountErrorsInMs );
2004 dFractLostEvtInMs /= ( uCountHitsInMs + uCountErrorsInMs );
2005
2006 fhMsgCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountHitsInMs + uCountErrorsInMs );
2007 fhHitCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountHitsInMs );
2008 fhErrorCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountErrorsInMs );
2009 fhLostEvtCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountLostEvtInMs );
2010 fhErrorFractPerMsEvo->Fill( fdMsTime - fdStartTime, dFractErrorsInMs );
2011 fhLostEvtFractPerMsEvo->Fill( fdMsTime - fdStartTime, dFractLostEvtInMs );
2012*/
2013 return kTRUE;
2014}
2016{
2017 fhMessType->Reset();
2018 fhSysMessType->Reset();
2019 fhGet4MessType->Reset();
2020 fhGet4ChanScm->Reset();
2021 fhGet4ChanErrors->Reset();
2022 fhGet4EpochFlags->Reset();
2023 fhGdpbAsicSpiCounts->Reset();
2024 fhGdpbMessType->Reset();
2025 fhGdpbSysMessType->Reset();
2026 fhGdpbSysMessPattType->Reset();
2027 fhGdpbEpochFlags->Reset();
2028 fhGdpbEpochSyncEvo->Reset();
2029 fhGdpbEpochMissEvo->Reset();
2031 fhGdpbEndMsDataLost->Reset();
2032 fhGdpbHitRate->Reset();
2033 if (kTRUE == fbDebugMonitorMode) {
2034 fhNbMissPatternPerMs->Reset();
2035 fhPatternMissmatch->Reset();
2036 fhPatternEnable->Reset();
2037 fhPatternResync->Reset();
2038 } // if( kTRUE == fbDebugMonitorMode )
2039
2040 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2041 fvhGdpbGet4MessType[uGdpb]->Reset();
2042 fvhGdpbGet4ChanScm[uGdpb]->Reset();
2043 fvhGdpbGet4ChanErrors[uGdpb]->Reset();
2044 if (kTRUE == fbDebugMonitorMode) {
2045 fvhRawFt_gDPB[uGdpb]->Reset();
2046 fvhRawCt_gDPB[uGdpb]->Reset();
2047 } // if( kTRUE == fbDebugMonitorMode )
2048 fvhRemapTot_gDPB[uGdpb]->Reset();
2049 fvhRemapChCount_gDPB[uGdpb]->Reset();
2050 fvhRemapChRate_gDPB[uGdpb]->Reset();
2051 if (kTRUE == fbDebugMonitorMode) {
2052 fvhRemapChErrFract_gDPB[uGdpb]->Reset();
2053 fvhGdpbPatternMissmatchEvo[uGdpb]->Reset();
2054 fvhGdpbPatternEnableEvo[uGdpb]->Reset();
2055 fvhGdpbPatternResyncEvo[uGdpb]->Reset();
2056 fvhGdpbMissmatchEvoPerTs[uGdpb]->Reset();
2057 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Reset();
2058 fvhGdpbEnableEvoPerTs[uGdpb]->Reset();
2059 fvhGdpbResyncEvoPerTs[uGdpb]->Reset();
2060 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Reset();
2061 fvhGdpbStateEvoPerTs[uGdpb]->Reset();
2062 } // if( kTRUE == fbDebugMonitorMode )
2063 fvhTokenMsgType[uGdpb]->Reset();
2064 fvhTriggerRate[uGdpb]->Reset();
2065 fvhCmdDaqVsTrig[uGdpb]->Reset();
2066 fvhStarTokenEvo[uGdpb]->Reset();
2067 fvhStarTrigGdpbTsEvo[uGdpb]->Reset();
2068 fvhStarTrigStarTsEvo[uGdpb]->Reset();
2069 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2070
2071 fhMsgCntEvo->Reset();
2072 fhHitCntEvo->Reset();
2073 fhErrorCntEvo->Reset();
2074 fhLostEvtCntEvo->Reset();
2075 fhErrorFractEvo->Reset();
2076 fhLostEvtFractEvo->Reset();
2077 fhHitCntPerMsEvo->Reset();
2078 fhErrorCntPerMsEvo->Reset();
2079 fhLostEvtCntPerMsEvo->Reset();
2080 fhErrorFractPerMsEvo->Reset();
2081 fhLostEvtFractPerMsEvo->Reset();
2082
2083 if (kTRUE == bResetTime) {
2085 fdStartTime = -1.0;
2086 } // if( kTRUE == bResetTime )
2087
2088 return kTRUE;
2089}
2091{
2092 fhGdpbEpochSyncEvo->Reset();
2093 fhGdpbEpochMissEvo->Reset();
2094
2095 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2096 fvhRemapChRate_gDPB[uGdpb]->Reset();
2097 if (kTRUE == fbDebugMonitorMode) {
2098 fvhRemapChErrFract_gDPB[uGdpb]->Reset();
2099 // fvhGdpbPatternMissmatchEvo[ uGdpb ] ->Reset();
2100 // fvhGdpbPatternEnableEvo[ uGdpb ] ->Reset();
2101 // fvhGdpbPatternResyncEvo[ uGdpb ] ->Reset();
2102 fvhGdpbMissmatchEvoPerTs[uGdpb]->Reset();
2103 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Reset();
2104 fvhGdpbEnableEvoPerTs[uGdpb]->Reset();
2105 fvhGdpbResyncEvoPerTs[uGdpb]->Reset();
2106 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Reset();
2107 fvhGdpbStateEvoPerTs[uGdpb]->Reset();
2108 } // if( kTRUE == fbDebugMonitorMode )
2109 fvhTriggerRate[uGdpb]->Reset();
2110 fvhStarTokenEvo[uGdpb]->Reset();
2111 fvhStarTrigGdpbTsEvo[uGdpb]->Reset();
2112 fvhStarTrigStarTsEvo[uGdpb]->Reset();
2113 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2114
2115 fhMsgCntEvo->Reset();
2116 fhHitCntEvo->Reset();
2117 fhErrorCntEvo->Reset();
2118 fhLostEvtCntEvo->Reset();
2119 fhErrorFractEvo->Reset();
2120 fhLostEvtFractEvo->Reset();
2121 fhHitCntPerMsEvo->Reset();
2122 fhErrorCntPerMsEvo->Reset();
2123 fhLostEvtCntPerMsEvo->Reset();
2124 fhErrorFractPerMsEvo->Reset();
2125 fhLostEvtFractPerMsEvo->Reset();
2126
2127 fdStartTime = -1;
2128}
2129// -------------------------------------------------------------------------
std::vector< double > GenerateLogBinArray(uint32_t uNbDecadesLog, uint32_t uNbStepsDecade, uint32_t uNbSubStepsInStep, uint32_t &uNbBinsLog, int32_t iStartExp, bool bAddZeroStart)
std::string FormatMsHeaderPrintout(const fles::MicrosliceDescriptor &msDescriptor)
std::vector< Bool_t > fvbMaskedComponents
If ON not printout at all for critical errors.
std::vector< TH2 * > fvhGdpbEnableEvoPerTs
Debug histo, only in DebugMonitorMode.
UInt_t fuGet4Id
Bin size in s for the plots with date as X axis.
UInt_t fuNrOfChannelsPerFee
Number of channels in each GET4.
CbmMcbm2018TofPar * fUnpackPar
Switch ON the usage of abolute time scale for the evo histo (no start time)
UInt_t fuNrOfChannelsPerGdpb
Number of GET4s per GDPB.
std::vector< gdpbv100::Message > fvmEpSupprBuffer
Epoch + Epoch Cycle.
void ProcessEpoch(gdpbv100::Message mess)
std::vector< UInt_t > fvuStarDaqCmdLast
std::vector< TH2 * > fvhGdpbPatternEnableEvo
Debug histo, only in DebugMonitorMode.
std::vector< TH2 * > fvhGdpbMissmatchEvoPerTs
Exclude from dictionnary.
std::vector< ULong64_t > fvulStarTsMsb
std::vector< TH2 * > fvhGdpbMissmatchEnaEvoPerTs
Debug histo, only in DebugMonitorMode.
std::vector< TH1 * > fvhRemapChCount_gDPB
std::vector< ULong64_t > fvulGdpbTsFullLast
std::vector< TH2 * > fvhGdpbGet4ChanErrors
std::vector< std::vector< bool > > fvvbGdpbLastMissmatchPattern
UInt_t fuNrOfGet4PerGdpb
Total number of Get4 chips in the system.
std::vector< TProfile2D * > fvhRemapChErrFract_gDPB
std::vector< TH2 * > fvhGdpbStateEvoPerTs
Debug histo, only in DebugMonitorMode.
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
std::vector< TCanvas * > fvcSumGdpbGet4
UInt_t fuHistoryHistoSize
Histograms related variables.
std::vector< ULong64_t > fvulCurrentEpochFull
Epoch cycle from the Ms Start message and Epoch counter flip.
TH2 * fhPatternEnable
Debug histo, only in DebugMonitorMode.
std::vector< TH2 * > fvhGdpbPatternResyncEvo
Debug histo, only in DebugMonitorMode.
TH2 * fhPatternResync
Debug histo, only in DebugMonitorMode.
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
Total number of GDPBs in the system.
std::vector< ULong64_t > fvulStarTsFullLast
Bool_t ResetHistograms(Bool_t bResetTime=kTRUE)
Bool_t fbEpochSinceLastHit
Duplicate Hits detection.
std::vector< TH2 * > fvhGdpbResyncEnaEvoPerTs
Debug histo, only in DebugMonitorMode.
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
Double_t fdTsStartTime
SysId of the current MS in TS (0 to fuTotalMsNb)
std::vector< ULong64_t > fvulCurrentEpochCycle
Current epoch index, per DPB.
std::vector< ULong64_t > fvulGdpbTsMsb
STAR TRIGGER detection.
void ProcessHit(gdpbv100::FullMessage mess)
std::vector< TH2 * > fvhRawCt_gDPB
Debug histo, only in DebugMonitorMode.
UInt_t fuGet4Nr
running number (0 to fuNrOfGet4PerGdpb) of the Get4 chip of a unique GDPB for current message
void ProcessEpochCycle(uint64_t ulCycleData)
void ProcessError(gdpbv100::FullMessage mess)
UInt_t fuNrOfGet4
Number of channels in each FEE.
UInt_t fuMsIndex
Start Time in ns of current MS from its index field in header.
std::vector< ULong64_t > fvulCurrentEpoch
Data format control: Current time references for each GDPB: merged epoch marker, epoch cycle,...
std::vector< ULong64_t > fvulStarTsMid
std::vector< TH2 * > fvhRemapTot_gDPB
Debug histo, only in DebugMonitorMode.
std::vector< UInt_t > fuNbMissmatchPattern
Pattern messages per gDPB.
TH2 * fhPatternMissmatch
Debug histo, only in DebugMonitorMode.
void ProcessSysMess(gdpbv100::FullMessage mess)
Bool_t fbIgnoreCriticalErrors
Switch ON the filling of a additional set of histograms.
Bool_t ProcessTs(const fles::Timeslice &ts)
TH1 * fhMessType
Size in seconds of the evolution histograms.
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
std::vector< TH2 * > fvhGdpbResyncEvoPerTs
Debug histo, only in DebugMonitorMode.
Double_t fdStartTime
Starting state book-keeping.
std::vector< std::vector< bool > > fvvbGdpbLastEnablePattern
Exclude from dictionnary.
void ProcessPattern(gdpbv100::Message mess)
void ProcessSlowCtrl(gdpbv100::Message mess)
UInt_t fuNrOfFeePerGdpb
gDPB ID to index map
std::vector< ULong64_t > fvulGdpbTsLsb
UInt_t fuNrOfGet4PerFee
Number of FEBs per GDPB.
std::vector< UInt_t > fvuStarTrigCmdLast
Bool_t fbDebugMonitorMode
Control flags.
Double_t fdTsStopTimeCore
Time in ns of current TS from the index of the first MS first component.
Double_t fdMsTime
End Time in ns of current TS Core from the index of the first MS first component.
std::vector< TProfile * > fvhStarTrigStarTsEvo
UInt_t fuNrOfChannelsPerGet4
Number of GET4s per FEE.
std::vector< TProfile * > fvhStarTrigGdpbTsEvo
std::vector< std::vector< bool > > fvvbGdpbLastResyncPattern
Exclude from dictionnary.
void ProcessStarTrig(gdpbv100::Message mess)
std::vector< TH2 * > fvhGdpbPatternMissmatchEvo
Bool_t ProcessMs(const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
static constexpr UInt_t GetNrOfFeePerGdpb()
Int_t GetNrOfGdpbs()
FIXME: replace with method returning the correspondign constants! see Star2019 parameter.
Int_t GetGdpbId(Int_t i)
Double_t GetPadiThresholdVal(UInt_t uCode)
Int_t Get4ChanToPadiChan(UInt_t uChannelInFee)
Int_t ElinkIdxToGet4Idx(UInt_t uElink)
void AddHistoToVector(TNamed *pointer, std::string sFolder="")
std::vector< size_t > fvMsComponentsList
void AddCanvasToVector(TCanvas *pointer, std::string sFolder="")
double GetFullTimeNs() const
uint16_t getGdpbHitIs24b() const
uint16_t getStarTrigMsgIndex() const
uint32_t getGdpbEpEpochNb() const
uint16_t getGdpbHit32Tot() const
uint16_t getGdpbSysPattType() const
uint64_t getStarTsMidStarC() const
uint16_t getGdpbSysSubType() const
uint64_t getGdpbTsLsbStarB() const
uint32_t getGdpbSlcChan() const
bool getGdpbEpMissmatch() const
uint16_t getGdpbSysPattIndex() const
uint32_t getGdpbSlcData() const
bool getGdpbEpSync() const
uint32_t getGdpbSysFwErrResync() const
uint64_t getStarTsMsbStarB() const
uint32_t getGdpbHitFullTs() const
uint32_t getStarTrigCmdStarD() const
uint32_t getGdpbSysPattPattern() const
uint32_t getGdpbSlcType() const
bool isStarTrigger() const
Returns true is message type is MSG_STAR_TRI_A, _B, _C, _D (STAR Trigger message)
bool getGdpbEpEpochLoss() const
uint32_t getStarDaqCmdStarD() const
uint64_t getGdpbTsMsbStarA() const
uint16_t getGdpbGenChipId() const
uint16_t getGdpbSysErrUnused() const
bool getGdpbEpDataLoss() const
uint32_t getStarTokenStarD() const
uint32_t getGdpbSlcEdge() const
uint64_t getStarTsLsbStarD() const
uint8_t getMessageType() const
Returns the message type. Valid for all message types. 4 bit.
uint32_t getGdpbSysUnkwData() const
uint64_t getData() const
uint16_t getGdpbSysErrData() const
bool getGdpbSysErrEdge() const
uint16_t getGdpbSysErrChanId() const
uint16_t getGdpbHitChanId() const
@ GET4_32B_SLC_SCALER
@ GET4_32B_SLC_DEADT
@ GET4_32B_SLC_SPIREAD
@ GET4_32B_SLC_START_SEU
@ GET4_V2X_ERR_LOST_EVT
@ GET4_V2X_ERR_TOT_RANGE
@ GET4_V2X_ERR_FIFO_WRITE
@ GET4_V2X_ERR_DLL_LOCK
@ GET4_V2X_ERR_EPOCH_OVERF
@ GET4_V2X_ERR_EP_CNT_SYNC
@ GET4_V2X_ERR_UNKNOWN
@ GET4_V2X_ERR_READ_INIT
@ GET4_V2X_ERR_DLL_RESET
@ GET4_V2X_ERR_ADD_RIS_EDG
@ GET4_V2X_ERR_TOK_RING_ST
@ GET4_V2X_ERR_TOKEN
@ GET4_V2X_ERR_TOT_OVERWRT
@ GET4_V2X_ERR_READOUT_ERR
@ GET4_V2X_ERR_EVT_DISCARD
@ GET4_V2X_ERR_UNPAIR_FALL
@ GET4_V2X_ERR_CHAN_STATE
@ GET4_V2X_ERR_SYNC
@ GET4_V2X_ERR_SEQUENCE_ER
const uint32_t kuChipIdMergedEpoch
const uint32_t kuEpochCounterSz
const uint64_t kulEpochCycleFieldSz
@ SYS_GET4_SYNC_MISS
Hash for CbmL1LinkKey.