CbmRoot
Loading...
Searching...
No Matches
CbmStar2019MonitorAlgo.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// ----- CbmStar2019MonitorAlgo -----
8// ----- Created 12.10.2019 by P.-A. Loizeau -----
9// ----- -----
10// -----------------------------------------------------------------------------
11
13
15#include "CbmStar2019TofPar.h"
16#include "CbmTofAddress.h"
17#include "CbmTofDetectorId_v14a.h" // in cbmdata/tof
18
19#include "FairRootManager.h"
20#include "FairRun.h"
21#include "FairRunOnline.h"
22#include "FairRuntimeDb.h"
23#include <Logger.h>
24
25#include <TCanvas.h>
26#include <TFile.h>
27#include <TH1.h>
28#include <TH2.h>
29#include <TList.h>
30#include <TPaveStats.h>
31#include <TProfile.h>
32#include <TROOT.h>
33#include <TString.h>
34
35#include <fstream>
36#include <iomanip>
37#include <iostream>
38
39#include <stdint.h>
40
41// -------------------------------------------------------------------------
44 ,
46 fbDebugMonitorMode(kFALSE)
47 , fbIgnoreCriticalErrors(kFALSE)
48 , fvbMaskedComponents()
49 , fiSectorIndex(-1)
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 , fuCurrSector(0)
73 , fiRunStartDateTimeSec(-1)
74 , fiBinSizeDatePlots(-1)
75 , fuGet4Id(0)
76 , fuGet4Nr(0)
77 , fvulCurrentEpoch()
78 , fvulCurrentEpochCycle()
79 , fvulCurrentEpochFull()
80 , fvmEpSupprBuffer()
81 , fulStartTs(0)
82 , fdStartTime(-1.0)
83 , fdStartTimeMsSz(0.0)
84 , ftStartTimeUnix(std::chrono::steady_clock::now())
85 , fvulGdpbTsMsb()
86 , fvulGdpbTsLsb()
87 , fvulStarTsMsb()
88 , fvulStarTsMid()
89 , fvulGdpbTsFullLast()
90 , fvulStarTsFullLast()
91 , fvuStarTokenLast()
92 , fvuStarDaqCmdLast()
93 , fvuStarTrigCmdLast()
94 , fbEpochSinceLastHit(kTRUE)
95 , fuDuplicatesCount(0)
96 , fmLastHit(0)
97 , fuHistoryHistoSize(3600)
98 , fhMessType(nullptr)
99 , fhSysMessType(nullptr)
100 , fhGet4MessType(nullptr)
101 , fhGet4ChanScm(nullptr)
102 , fhGet4ChanErrors(nullptr)
103 , fhGet4EpochFlags(nullptr)
104 , fhGdpbAsicSpiCounts(nullptr)
105 , fhGdpbMessType(nullptr)
106 , fhGdpbSysMessType(nullptr)
107 , fhGdpbSysMessPattType(nullptr)
108 , fhGdpbEpochFlags(nullptr)
109 , fhGdpbEpochSyncEvo(nullptr)
110 , fhGdpbEpochMissEvo(nullptr)
111 , fhGdpbEndMsBufferNotEmpty(nullptr)
112 , fhGdpbEndMsDataLost(nullptr)
113 , fvhGdpbGet4MessType()
114 , fvhGdpbGet4ChanScm()
115 , fvhGdpbGet4ChanErrors()
116 , fhMsgCntEvo(nullptr)
117 , fhHitCntEvo(nullptr)
118 , fhErrorCntEvo(nullptr)
119 , fhLostEvtCntEvo(nullptr)
120 , fhErrorFractEvo(nullptr)
121 , fhLostEvtFractEvo(nullptr)
122 , fhMsgCntPerMsEvo(nullptr)
123 , fhHitCntPerMsEvo(nullptr)
124 , fhErrorCntPerMsEvo(nullptr)
125 , fhLostEvtCntPerMsEvo(nullptr)
126 , fhErrorFractPerMsEvo(nullptr)
127 , fhLostEvtFractPerMsEvo(nullptr)
128 , fvhRawFt_gDPB()
129 , fvhRawCt_gDPB()
130 , fvhRemapTot_gDPB()
131 , fvhRemapChCount_gDPB()
132 , fvhRemapChRate_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 Bmon 2019 monitor algo";
177
178 return kTRUE;
179}
187
188// -------------------------------------------------------------------------
190{
191 LOG(info) << "Init parameter containers for CbmStar2019MonitorAlgo";
192 Bool_t initOK = ReInitContainers();
193
194 return initOK;
195}
197{
198 LOG(info) << "**********************************************";
199 LOG(info) << "ReInit parameter containers for CbmStar2019MonitorAlgo";
200
201 fUnpackPar = (CbmStar2019TofPar*) fParCList->FindObject("CbmStar2019TofPar");
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 CbmStar2019TofPar("CbmStar2019TofPar");
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 < fiSectorIndex) {
261 if (fuNrOfGdpbs <= static_cast<UInt_t>(fiSectorIndex))
262 LOG(fatal) << "Selected sector out of bounds relative to parameter file: " << fiSectorIndex << " VS "
263 << fuNrOfGdpbs;
264 else
265 LOG(info) << "Selected sector " << fiSectorIndex + fUnpackPar->GetGdpbToSectorOffset()
266 << " for single sector analysis";
267
268 fuNrOfGdpbs = 1;
269 fGdpbIdIndexMap.clear();
271 } // if( -1 < fiSectorIndex )
272
274 fvulCurrentEpoch.resize(fuNrOfGdpbs, 0);
277
293 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
295 fvvbGdpbLastMissmatchPattern[uGdpb].resize(fuNrOfGet4PerGdpb, kFALSE);
296 fvvbGdpbLastEnablePattern[uGdpb].resize(fuNrOfGet4PerGdpb, kTRUE);
297 fvvbGdpbLastResyncPattern[uGdpb].resize(fuNrOfGet4PerGdpb, kFALSE);
299 fvulGdpbTsMsb[uGdpb] = 0;
300 fvulGdpbTsLsb[uGdpb] = 0;
301 fvulStarTsMsb[uGdpb] = 0;
302 fvulStarTsMid[uGdpb] = 0;
303 fvulGdpbTsFullLast[uGdpb] = 0;
304 fvulStarTsFullLast[uGdpb] = 0;
305 fvuStarTokenLast[uGdpb] = 0;
306 fvuStarDaqCmdLast[uGdpb] = 0;
307 fvuStarTrigCmdLast[uGdpb] = 0;
308 } // for (Int_t iGdpb = 0; iGdpb < fuNrOfGdpbs; ++iGdpb)
309
310 if (kTRUE == fbDebugMonitorMode) fuNbMissmatchPattern.resize(fuNrOfGdpbs, 0);
311
312 return kTRUE;
313}
314// -------------------------------------------------------------------------
315
316void CbmStar2019MonitorAlgo::AddMsComponentToList(size_t component, UShort_t usDetectorId)
317{
319 for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
320 if (component == fvMsComponentsList[uCompIdx]) return;
321
323 fvMsComponentsList.push_back(component);
324
325 LOG(info) << "CbmStar2019MonitorAlgo::AddMsComponentToList => Component " << component << " with detector ID 0x"
326 << std::hex << usDetectorId << std::dec << " added to list";
327}
328// -------------------------------------------------------------------------
329
331{
332 fulCurrentTsIdx = ts.index();
333 fdTsStartTime = static_cast<Double_t>(ts.descriptor(0, 0).idx);
334
336 if (0 == fulCurrentTsIdx) return kTRUE;
337
339 if (-1.0 == fdTsCoreSizeInNs) {
340 fuNbCoreMsPerTs = ts.num_core_microslices();
341 fuNbOverMsPerTs = ts.num_microslices(0) - ts.num_core_microslices();
344 LOG(info) << "Timeslice parameters: each TS has " << fuNbCoreMsPerTs << " Core MS and " << fuNbOverMsPerTs
345 << " Overlap MS, for a core duration of " << fdTsCoreSizeInNs << " ns and a full duration of "
346 << fdTsFullSizeInNs << " ns";
347
351 LOG(info) << "In each TS " << fuNbMsLoop << " MS will be looped over";
352
355 } // if( -1.0 == fdTsCoreSizeInNs )
356
359 // LOG(info) << Form( "TS %5d Start %12f Stop %12f", fulCurrentTsIdx, fdTsStartTime, fdTsStopTimeCore );
360
362 for (fuMsIndex = 0; fuMsIndex < fuNbMsLoop; fuMsIndex++) {
364 for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx) {
365 UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
366
367 if (kFALSE == ProcessMs(ts, uMsComp, fuMsIndex)) {
368 LOG(error) << "Failed to process ts " << fulCurrentTsIdx << " MS " << fuMsIndex << " for component " << uMsComp;
369 return kFALSE;
370 } // if( kFALSE == ProcessMs( ts, uMsCompIdx, fuMsIndex ) )
371 } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
372
373 if (kTRUE == fbDebugMonitorMode) {
374 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
376 fuNbMissmatchPattern[uGdpb] = 0;
377 } // for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb)
378 } // if( kTRUE == fbDebugMonitorMode )
379 } // for( fuMsIndex = 0; fuMsIndex < uNbMsLoop; fuMsIndex ++ )
380
382 if (kFALSE == FillHistograms()) {
383 LOG(error) << "Failed to fill histos in ts " << fulCurrentTsIdx;
384 return kFALSE;
385 } // if( kFALSE == FillHistograms() )
386
387 return kTRUE;
388}
389
390Bool_t CbmStar2019MonitorAlgo::ProcessMs(const fles::Timeslice& ts, size_t uMsCompIdx, size_t uMsIdx)
391{
392 auto msDescriptor = ts.descriptor(uMsCompIdx, uMsIdx);
393 fuCurrentEquipmentId = msDescriptor.eq_id;
394 const uint8_t* msContent = reinterpret_cast<const uint8_t*>(ts.content(uMsCompIdx, uMsIdx));
395
396 uint32_t uSize = msDescriptor.size;
397 fulCurrentMsIdx = msDescriptor.idx;
398 fdMsTime = (1e-9) * static_cast<double>(fulCurrentMsIdx);
399 LOG(debug) << "Microslice: " << fulCurrentMsIdx << " from EqId " << std::hex << fuCurrentEquipmentId << std::dec
400 << " has size: " << uSize;
401
402 if (0 == fvbMaskedComponents.size()) fvbMaskedComponents.resize(ts.num_components(), kFALSE);
403
404 fuCurrDpbId = static_cast<uint32_t>(fuCurrentEquipmentId & 0xFFFF);
405 // fuCurrDpbIdx = fDpbIdIndexMap[ fuCurrDpbId ];
406
408 auto it = fGdpbIdIndexMap.find(fuCurrDpbId);
409 if (it == fGdpbIdIndexMap.end()) {
410 if (kFALSE == fvbMaskedComponents[uMsCompIdx]) {
411 LOG(info) << "---------------------------------------------------------------";
412 LOG(info) << FormatMsHeaderPrintout(msDescriptor);
413 LOG(warning) << "Could not find the gDPB index for AFCK id 0x" << std::hex << fuCurrDpbId << std::dec
414 << " in timeslice " << fulCurrentTsIdx << " in microslice " << uMsIdx << " component " << uMsCompIdx
415 << "\n"
416 << "If valid this index has to be added in the TOF "
417 "parameter file in the DbpIdArray field";
418 fvbMaskedComponents[uMsCompIdx] = kTRUE;
419 } // if( kFALSE == fvbMaskedComponents[ uMsComp ] )
420 else
421 return kTRUE;
422
425
426 return kFALSE;
427 } // if( it == fGdpbIdIndexMap.end() )
428 else
430
432
439 } // else if( fuHistoryHistoSize < fdMsTime - fdStartTime )
440 /*
442 if (fdStartTimeLong < 0)
443 fdStartTimeLong = fdMsTime;
445 if( fuHistoryHistoSizeLong < 1e-9 * (fdMsTime - fdStartTimeLong) / 60.0 )
446 {
447 ResetLongEvolutionHistograms();
448 fdStartTimeLong = dHitTime;
449 } // if( fuHistoryHistoSize < 1e-9 * (fdMsTime - fdStartTimeLong) / 60.0 )
450*/
451
452 // If not integer number of message in input buffer, print warning/error
453 if (0 != (uSize % kuBytesPerMessage))
454 LOG(error) << "The input microslice buffer does NOT "
455 << "contain only complete nDPB messages!";
456
457 // Compute the number of complete messages in the input microslice buffer
458 uint32_t uNbMessages = (uSize - (uSize % kuBytesPerMessage)) / kuBytesPerMessage;
459
460 // Prepare variables for the loop on contents
461 Int_t messageType = -111;
462 const uint64_t* pInBuff = reinterpret_cast<const uint64_t*>(msContent);
463 for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
464 // Fill message
465 uint64_t ulData = static_cast<uint64_t>(pInBuff[uIdx]);
466
468 if (0 == uIdx) {
469 ProcessEpochCycle(ulData);
470 continue;
471 } // if( 0 == uIdx )
472
473 gdpbv100::Message mess(ulData);
475 messageType = mess.getMessageType();
476 fhMessType->Fill(messageType);
477 fhGdpbMessType->Fill(messageType, fuCurrSector);
478
481
483 LOG(warning) << "Message with Get4 ID too high: " << fuGet4Id << " VS " << fuNrOfGet4PerGdpb
484 << " set in parameters.";
485
486 switch (messageType) {
487 case gdpbv100::MSG_HIT: {
488 if (mess.getGdpbHitIs24b()) {
490 LOG(fatal) << "This monitor does not support 24b hit messages!!!.";
491 continue;
492 } // if( getGdpbHitIs24b() )
493 else {
495 fhGet4MessType->Fill(fuGet4Nr, 0);
497
500
503 /*
504 if( kFALSE == fbEpochSinceLastHit )
505 {
506 if( fmLastHit != mess )
507 {
508 if( 0 < fuDuplicatesCount )
509 {
510 LOG(warning) << "Detected duplicate hits in sector " << fuCurrSector
511 << ": " << fuDuplicatesCount << " times "
512 << Form( "0x%16lx", fmLastHit.getData() );
513 } // if( 0 < fuDuplicatesCount )
514 fmLastHit = mess;
515 fuDuplicatesCount = 0;
516 }
517 else fuDuplicatesCount++;
518 } // if( kFALSE == fbEpochSinceLastHit )
519 else
520 {
521 fmLastHit = mess;
522 fbEpochSinceLastHit = kFALSE;
523 } // else of if( kFALSE == fbEpochSinceLastHit )
524*/
525 fvmEpSupprBuffer.push_back(mess);
526 } // else of if( getGdpbHitIs24b() )
527 break;
528 } // case gdpbv100::MSG_HIT:
529 case gdpbv100::MSG_EPOCH: {
531 ProcessEpoch(mess);
532 } // if this epoch message is a merged one valid for all chips
533 else {
535 LOG(fatal) << "This event builder does not support unmerged epoch "
536 "messages!!!.";
537 continue;
538 } // if single chip epoch message
539 break;
540 } // case gdpbv100::MSG_EPOCH:
541 case gdpbv100::MSG_SLOWC: {
542 ProcessSlowCtrl(mess);
543 break;
544 } // case gdpbv100::MSG_SLOWC:
545 case gdpbv100::MSG_SYST: {
546 ProcessSysMess(mess);
547 break;
548 } // case gdpbv100::MSG_SYST:
553 ProcessStarTrig(mess);
554 break;
555 } // case gdpbv100::MSG_STAR_TRI_A-D
556 default:
557 LOG(fatal) << "Message type " << std::hex << std::setw(2) << static_cast<uint16_t>(messageType)
558 << " not included in Get4 data format.";
559 } // switch( mess.getMessageType() )
560 } // for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx ++)
561
564 if (0 < fvmEpSupprBuffer.size()) {
567 } // if( 0 < fvmEpSupprBuffer.size() )
568
570 fvmEpSupprBuffer.clear();
571
574
575 return kTRUE;
576}
577
578// -------------------------------------------------------------------------
580{
581 ULong64_t ulEpochCycleVal = ulCycleData & gdpbv100::kulEpochCycleFieldSz;
582
583 if (!(ulEpochCycleVal == fvulCurrentEpochCycle[fuCurrDpbIdx]
584 || ulEpochCycleVal == fvulCurrentEpochCycle[fuCurrDpbIdx] + 1)
585 && 0 < fulCurrentMsIdx) {
586 LOG(warning) << "CbmStar2019MonitorAlgo::ProcessEpochCycle => "
587 << " Missmatch in epoch cycles detected for Gdpb " << fuCurrDpbIdx
588 << ", probably fake cycles due to epoch index corruption! "
589 << Form(" Current cycle 0x%09llX New cycle 0x%09llX", fvulCurrentEpochCycle[fuCurrDpbIdx],
590 ulEpochCycleVal);
591 } // if epoch cycle did not stay constant or increase by exactly 1, except if first MS of the TS
592 if (ulEpochCycleVal != fvulCurrentEpochCycle[fuCurrDpbIdx]) {
593 LOG(info) << "CbmStar2019EventBuilderEtofAlgo::ProcessEpochCycle => "
594 << " New epoch cycle for Gdpb " << fuCurrDpbIdx
595 << Form(": Current cycle 0x%09llX New cycle 0x%09llX", fvulCurrentEpochCycle[fuCurrDpbIdx],
596 ulEpochCycleVal);
597 } // if( ulEpochCycleVal != fvulCurrentEpochCycle[fuCurrDpbIdx] )
598 fvulCurrentEpochCycle[fuCurrDpbIdx] = ulEpochCycleVal;
599
600 return;
601}
603{
604 ULong64_t ulEpochNr = mess.getGdpbEpEpochNb();
605 Bool_t bSyncFlag = (1 == mess.getGdpbEpSync());
606 Bool_t bDataLoss = (1 == mess.getGdpbEpDataLoss());
607 Bool_t bEpochLoss = (1 == mess.getGdpbEpEpochLoss());
608 Bool_t bMissmMatch = (1 == mess.getGdpbEpMissmatch());
609
610 fvulCurrentEpoch[fuCurrDpbIdx] = ulEpochNr;
613
615 if (bSyncFlag) {
618 } // if( bSyncFlag )
619
620 if (bDataLoss) fhGdpbEpochFlags->Fill(fuCurrSector, 1);
621
622 if (bEpochLoss) fhGdpbEpochFlags->Fill(fuCurrSector, 2);
623
624 if (bMissmMatch) {
627 } // if( bMissmMatch )
628
629 for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index++) {
630 fuGet4Id = uGet4Index;
632
633 fhGet4MessType->Fill(fuGet4Nr, 1);
635
636 if (bSyncFlag) fhGet4EpochFlags->Fill(fuGet4Nr, 0);
637 if (bDataLoss) fhGet4EpochFlags->Fill(fuGet4Nr, 1);
638 if (bEpochLoss) fhGet4EpochFlags->Fill(fuGet4Nr, 2);
639 if (bMissmMatch) fhGet4EpochFlags->Fill(fuGet4Nr, 3);
640 } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index ++ )
641
642 if (0 < fuDuplicatesCount)
643 LOG(warning) << "Detected duplicate hits: " << fuDuplicatesCount << " times "
644 << Form("0x%16lx", static_cast<unsigned long>(fmLastHit.getData()));
645 fbEpochSinceLastHit = kTRUE;
647
650}
651// -------------------------------------------------------------------------
653{
654 Int_t iBufferSize = fvmEpSupprBuffer.size();
655
656 if (0 == iBufferSize) return;
657
658 LOG(debug) << "Now processing stored messages for for gDPB " << fuCurrDpbIdx << " with epoch number "
660
663 std::stable_sort(fvmEpSupprBuffer.begin(), fvmEpSupprBuffer.end());
664
666 ULong64_t ulCurEpochGdpbGet4 = fvulCurrentEpochFull[fuCurrDpbIdx];
667
669 if (0 == ulCurEpochGdpbGet4) return;
670
672 ulCurEpochGdpbGet4--;
673
674 Int_t messageType = -111;
675 for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
676 messageType = fvmEpSupprBuffer[iMsgIdx].getMessageType();
677
678 fuGet4Id = fUnpackPar->ElinkIdxToGet4Idx(fvmEpSupprBuffer[iMsgIdx].getGdpbGenChipId());
680
682 gdpbv100::FullMessage fullMess(fvmEpSupprBuffer[iMsgIdx], ulCurEpochGdpbGet4);
683
685 switch (messageType) {
686 case gdpbv100::MSG_HIT: {
687 ProcessHit(fullMess);
688 break;
689 } // case gdpbv100::MSG_HIT:
692 break;
693 case gdpbv100::MSG_SYST: {
695 if (gdpbv100::SYS_GET4_ERROR == fullMess.getGdpbSysSubType()) ProcessError(fullMess);
696 break;
697 } // case gdpbv100::MSG_SYST:
704 break;
705 default:
706 LOG(error) << "Message type " << std::hex << std::setw(2) << static_cast<uint16_t>(messageType)
707 << " not included in Get4 unpacker.";
708 } // switch( mess.getMessageType() )
709 } // for( Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++ )
710
711 fvmEpSupprBuffer.clear();
712}
713// -------------------------------------------------------------------------
715{
716 UInt_t uChannel = mess.getGdpbHitChanId();
717 UInt_t uTot = mess.getGdpbHit32Tot();
718
722 UInt_t uFts = mess.getGdpbHitFullTs() % 112;
723 UInt_t uCts = mess.getGdpbHitFullTs() / 112;
724
725 UInt_t uChannelNr = fuGet4Id * fuNrOfChannelsPerGet4 + uChannel;
726 UInt_t uChannelNrInFee = (fuGet4Id % fuNrOfGet4PerFee) * fuNrOfChannelsPerGet4 + uChannel;
727 UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
728 // UInt_t uFeeNrInSys = fuCurrDpbIdx * fuNrOfFeePerGdpb + uFeeNr;
729 UInt_t uRemappedChannelNr = uFeeNr * fuNrOfChannelsPerFee + fUnpackPar->Get4ChanToPadiChan(uChannelNrInFee);
730 // UInt_t uGbtxNr = (uFeeNr / fUnpackPar->GetNrOfFeePerGbtx());
731 // UInt_t uFeeInGbtx = (uFeeNr % fUnpackPar->GetNrOfFeePerGbtx());
732 // UInt_t uGbtxNrInSys = fuCurrDpbIdx * fUnpackPar->GetNrOfGbtxPerGdpb() + uGbtxNr;
733
734 // UInt_t uChanInSyst = fuCurrDpbIdx * fuNrOfChannelsPerGdpb + uChannelNr;
735 // UInt_t uRemappedChannelNrInSys = fuCurrDpbIdx * fuNrOfChannelsPerGdpb
736 // + uFeeNr * fuNrOfChannelsPerFee
737 // + fUnpackPar->Get4ChanToPadiChan( uChannelNrInFee );
738
739 // ULong_t ulHitTime = mess.getMsgFullTime( mess.getExtendedEpoch() );
740 Double_t dHitTime = mess.GetFullTimeNs();
741 // Double_t dHitTot = uTot; // in bins
742
744 if (kTRUE == fbDebugMonitorMode) {
745 fvhRawFt_gDPB[fuCurrDpbIdx]->Fill(uChannelNr, uFts);
746 fvhRawCt_gDPB[fuCurrDpbIdx]->Fill(uChannelNr, uCts);
747 } // if( kTRUE == fbDebugMonitorMode )
748
750 if (4096 <= uCts) {
751 LOG(debug) << "CbmStar2019MonitorAlgo::ProcessHit => Coarse time above "
752 "4096 detected."
753 << Form(" sector %02u GET4 %03u Channel %u, TS %8llu MS %3u (MS "
754 "time %12llu)",
757 } // if( 4096 <= uCts )
758
760 fvhRemapChCount_gDPB[fuCurrDpbIdx]->Fill(uRemappedChannelNr);
761 fvhRemapTot_gDPB[fuCurrDpbIdx]->Fill(uRemappedChannelNr, uTot);
762
765 if (0 <= fdStartTime) {
766 fvhRemapChRate_gDPB[fuCurrDpbIdx]->Fill(1e-9 * dHitTime - fdStartTime, uRemappedChannelNr);
767 // fvhFeeRate_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill( 1e-9 * (dHitTime - fdStartTime));
768 // fvhFeeErrorRatio_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill( 1e-9 * (dHitTime - fdStartTime), 0, 1);
769 } // if (0 <= fdStartTime)
770 /*
771 if (0 <= fdStartTimeLong)
772 {
773 fvhFeeRateLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
774 1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 1 / 60.0 );
775 fvhFeeErrorRatioLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
776 1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 0, 1 / 60.0 );
777 } // if (0 <= fdStartTimeLong)
778*/
779}
780// -------------------------------------------------------------------------
782{
783 UInt_t uSubType = mess.getGdpbSysSubType();
784 fhSysMessType->Fill(uSubType);
785 fhGdpbSysMessType->Fill(uSubType, fuCurrSector);
786
787 switch (mess.getGdpbSysSubType()) {
790 fhGet4MessType->Fill(fuGet4Nr, 3);
792
794 fvmEpSupprBuffer.push_back(mess);
795 // ProcessError( mess );
796 break;
797 } // case gdpbv100::SYSMSG_GET4_EVENT
799 LOG(debug) << "Unknown GET4 message, data: " << std::hex << std::setw(8) << mess.getGdpbSysUnkwData() << std::dec
800 << " Full message: " << std::hex << std::setw(16) << mess.getData() << std::dec;
801 break;
802 } // case gdpbv100::SYS_GDPB_UNKWN:
804 if (mess.getGdpbSysFwErrResync())
805 LOG(info) << Form("GET4 Resynchronization: Get4:0x%04x ", mess.getGdpbGenChipId()) << fuCurrDpbIdx;
806 else
807 LOG(info) << "GET4 synchronization pulse missing in gDPB " << fuCurrDpbIdx;
808 break;
809 } // case gdpbv100::SYS_GET4_SYNC_MISS:
811 ProcessPattern(mess);
812 break;
813 } // case gdpbv100::SYS_PATTERN:
814 default: {
815 LOG(info) << "Crazy system message, subtype " << mess.getGdpbSysSubType();
816 break;
817 } // default
818 } // switch( mess.getGdpbSysSubType() )
819}
820// -------------------------------------------------------------------------
822{
823 uint32_t uErrorType = mess.getGdpbSysErrData();
824
825 fhGet4MessType->Fill(fuGet4Nr, 3);
827
828 // UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
829
833
837
838 if (gdpbv100::GET4_V2X_ERR_LOST_EVT == uErrorType) {
841 } // if( gdpbv100::GET4_V2X_ERR_LOST_EVT == mess.getGdpbSysErrData() )
842 /*
844 if (0 <= fdStartTime)
845 {
846 fvhFeeErrorRate_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
847 1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime));
848 fvhFeeErrorRatio_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
849 1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime), 1, 1 );
850 } // if (0 <= fdStartTime)
851 if (0 <= fdStartTimeLong)
852 {
853 fvhFeeErrorRateLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
854 1e-9 / 60.0 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTimeLong), 1 / 60.0);
855 fvhFeeErrorRatioLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
856 1e-9 / 60.0 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTimeLong), 1, 1 / 60.0);
857 } // if (0 <= fdStartTime)
858*/
861
862 switch (uErrorType) {
864 fhGet4ChanErrors->Fill(dFullChId, 0);
865 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 0);
866 break;
867 } // case gdpbv100::GET4_V2X_ERR_READ_INIT:
869 fhGet4ChanErrors->Fill(dFullChId, 1);
870 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 1);
871 break;
872 } // case gdpbv100::GET4_V2X_ERR_SYNC:
874 fhGet4ChanErrors->Fill(dFullChId, 2);
875 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 2);
876 break;
877 } // case gdpbv100::GET4_V2X_ERR_EP_CNT_SYNC:
879 fhGet4ChanErrors->Fill(dFullChId, 3);
880 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 3);
881 break;
882 } // case gdpbv100::GET4_V2X_ERR_EP:
884 fhGet4ChanErrors->Fill(dFullChId, 4);
885 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 4);
886 break;
887 } // case gdpbv100::GET4_V2X_ERR_FIFO_WRITE:
889 fhGet4ChanErrors->Fill(dFullChId, 5);
890 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 5);
891 break;
892 } // case gdpbv100::GET4_V2X_ERR_LOST_EVT:
894 fhGet4ChanErrors->Fill(dFullChId, 6);
895 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 6);
896 break;
897 } // case gdpbv100::GET4_V2X_ERR_CHAN_STATE:
899 fhGet4ChanErrors->Fill(dFullChId, 7);
900 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 7);
901 break;
902 } // case gdpbv100::GET4_V2X_ERR_TOK_RING_ST:
904 fhGet4ChanErrors->Fill(dFullChId, 8);
905 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 8);
906 break;
907 } // case gdpbv100::GET4_V2X_ERR_TOKEN:
909 fhGet4ChanErrors->Fill(dFullChId, 9);
910 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 9);
911 break;
912 } // case gdpbv100::GET4_V2X_ERR_READOUT_ERR:
914 fhGet4ChanErrors->Fill(dFullChId, 10);
915 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 10);
916 break;
917 } // case gdpbv100::GET4_V2X_ERR_SPI:
919 fhGet4ChanErrors->Fill(dFullChId, 11);
920 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 11);
921 break;
922 } // case gdpbv100::GET4_V2X_ERR_DLL_LOCK:
924 fhGet4ChanErrors->Fill(dFullChId, 12);
925 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 12);
926 break;
927 } // case gdpbv100::GET4_V2X_ERR_DLL_RESET:
929 fhGet4ChanErrors->Fill(dFullChId, 13);
930 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 13);
931 break;
932 } // case gdpbv100::GET4_V2X_ERR_TOT_OVERWRT:
934 fhGet4ChanErrors->Fill(dFullChId, 14);
935 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 14);
936 break;
937 } // case gdpbv100::GET4_V2X_ERR_TOT_RANGE:
939 fhGet4ChanErrors->Fill(dFullChId, 15);
940 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 15);
941 break;
942 } // case gdpbv100::GET4_V2X_ERR_EVT_DISCARD:
944 fhGet4ChanErrors->Fill(dFullChId, 16);
945 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 16);
946 break;
947 } // case gdpbv100::GET4_V2X_ERR_ADD_RIS_EDG:
949 fhGet4ChanErrors->Fill(dFullChId, 17);
950 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 17);
951 break;
952 } // case gdpbv100::GET4_V2X_ERR_UNPAIR_FALL:
954 fhGet4ChanErrors->Fill(dFullChId, 18);
955 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 18);
956 break;
957 } // case gdpbv100::GET4_V2X_ERR_SEQUENCE_ER:
959 fhGet4ChanErrors->Fill(dFullChId, 19);
960 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 19);
961 break;
962 } // case gdpbv100::GET4_V2X_ERR_EPOCH_OVERF:
964 fhGet4ChanErrors->Fill(dFullChId, 20);
965 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 20);
966 break;
967 } // case gdpbv100::GET4_V2X_ERR_UNKNOWN:
968 default: // Corrupt error or not yet supported error
969 {
970 fhGet4ChanErrors->Fill(dFullChId, 21);
971 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 21);
972 break;
973 } //
974 } // Switch( mess.getGdpbSysErrData() )
975
976 switch (uErrorType) {
989 if (kFALSE == fbIgnoreCriticalErrors)
990 LOG(info) << " +++++++ > gDPB: " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec
991 << ", Chip = " << std::setw(2) << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
992 << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1) << mess.getGdpbSysErrEdge()
993 << ", Empt = " << std::setw(1) << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
994 << std::setw(2) << uErrorType << std::dec << " -- GET4 V1 Error Event";
995 break;
996 } // critical errors
999 break;
1008 LOG(debug) << " +++++++ >gDPB: " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec
1009 << ", Chip = " << std::setw(2) << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
1010 << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1) << mess.getGdpbSysErrEdge()
1011 << ", Empt = " << std::setw(1) << mess.getGdpbSysErrUnused() << ", Data = " << std::hex << std::setw(2)
1012 << uErrorType << std::dec << " -- GET4 V1 Error Event ";
1013 break;
1014 } // Input channel related errors (TOT, shaky signals, etc...)
1018 break;
1019 default:
1021 break;
1022 } // switch( uErrorType )
1023
1024 return;
1025}
1026// -------------------------------------------------------------------------
1028{
1029 uint16_t usType = mess.getGdpbSysPattType();
1030 uint16_t usIndex = mess.getGdpbSysPattIndex();
1031 uint32_t uPattern = mess.getGdpbSysPattPattern();
1032 UInt_t uNbBits = (7 == usIndex ? 16 : 32);
1033 fhGdpbSysMessPattType->Fill(usType, fuCurrSector);
1034
1035
1036 switch (usType) {
1038
1039 if (kTRUE == fbDebugMonitorMode && 0 == usIndex) {
1041
1042 LOG(debug) << Form("Missmatch pattern message => Type %d, Index %2d, "
1043 "Pattern 0x%08X TS %12llu MS %3u Epoch %12llu",
1044 usType, usIndex, uPattern, fulCurrentTsIdx, fuMsIndex, fvulCurrentEpoch[fuCurrDpbIdx]);
1045 } // if( 0 == usIndex )
1046
1047 LOG(debug) << Form("Missmatch pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1048 if (kTRUE == fbDebugMonitorMode)
1049 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1050 UInt_t uBadAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1051
1052 if ((uPattern >> uBit) & 0x1) {
1053 fhPatternMissmatch->Fill(uBadAsic, fuCurrSector);
1055 fvvbGdpbLastMissmatchPattern[fuCurrDpbIdx][uBadAsic] = kTRUE;
1056 } // if( ( uPattern >> uBit ) & 0x1 )
1057 else
1058 fvvbGdpbLastMissmatchPattern[fuCurrDpbIdx][uBadAsic] = kFALSE;
1059
1060 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1061 break;
1062 } // case gdpbv100::PATT_MISSMATCH:
1063 case gdpbv100::PATT_ENABLE: {
1064 LOG(debug) << Form("ENABLE pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1065
1066 if (kTRUE == fbDebugMonitorMode)
1067 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1068 UInt_t uAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1069
1070 if ((uPattern >> uBit) & 0x1) {
1071 fhPatternEnable->Fill(uAsic, fuCurrSector);
1073 fvvbGdpbLastEnablePattern[fuCurrDpbIdx][uAsic] = kFALSE;
1074 } // if( ( uPattern >> uBit ) & 0x1 )
1075 else
1077
1078 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1079 break;
1080 } // case gdpbv100::PATT_ENABLE:
1081 case gdpbv100::PATT_RESYNC: {
1082 LOG(debug) << Form("RESYNC pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1083
1084 if (kTRUE == fbDebugMonitorMode)
1085 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1086 UInt_t uBadAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1087
1088 if ((uPattern >> uBit) & 0x1) {
1089 fhPatternResync->Fill(uBadAsic, fuCurrSector);
1091 fvvbGdpbLastResyncPattern[fuCurrDpbIdx][uBadAsic] = kTRUE;
1092 } // if( ( uPattern >> uBit ) & 0x1 )
1093 else
1094 fvvbGdpbLastResyncPattern[fuCurrDpbIdx][uBadAsic] = kFALSE;
1095
1096 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1097 break;
1098 } // case gdpbv100::PATT_RESYNC:
1099 default: {
1100 LOG(debug) << "Crazy pattern message, subtype " << usType;
1101 break;
1102 } // default
1103 } // switch( usType )
1104
1105 return;
1106}
1107// -------------------------------------------------------------------------
1109{
1110 UInt_t uChan = mess.getGdpbSlcChan();
1111 UInt_t uEdge = mess.getGdpbSlcEdge();
1112 UInt_t uData = mess.getGdpbSlcData();
1113 UInt_t uType = mess.getGdpbSlcType();
1114
1115 Double_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1116 Double_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1117 Double_t dMessTime = fulCurrentMsIdx * 1e-9;
1118
1119
1120 switch (uType) {
1122 fhGet4ChanScm->Fill(dFullChId, uType);
1123 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1124 break;
1125 } // case gdpbv100::GET4_32B_SLC_SCALER:
1127 fhGet4ChanScm->Fill(dFullChId, uType);
1128 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1129 break;
1130 } // case gdpbv100::GET4_32B_SLC_DEADT:
1132 fhGet4ChanScm->Fill(dFullChId, uType);
1133 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1134
1137 LOG(info) << "GET4 Slow Control SPI message, time " << Form("%3.3f", dMessTime) << " s "
1138 << " for board ID " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec << "\n"
1139 << " +++++++ > Chip = " << std::setw(3) << fuGet4Id << ", Chan = " << std::setw(1) << uChan
1140 << ", Edge = " << std::setw(1) << uEdge << ", Type = " << std::setw(1) << mess.getGdpbSlcType() << ", "
1141 << Form("channel %1u,", (uData >> 10) & 0xF) << Form("value 0x%03x ", uData & 0x3FF)
1142 << Form("level %4.1f ", fUnpackPar->GetPadiThresholdVal(uData & 0x3FF))
1143 << Form("(Data = 0x%06x) ", uData);
1144 break;
1145 } // if( gdpbv100::GET4_32B_SLC_SPIREAD == uType )
1147 if (0 == mess.getGdpbSlcChan() && 0 == mess.getGdpbSlcEdge()) // START message
1148 {
1149 fhGet4ChanScm->Fill(dFullChId, uType + 1);
1150 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType + 1);
1151 } // if( 0 == mess.getGdpbSlcChan() && 0 == mess.getGdpbSlcEdge() )
1152 else if (0 == mess.getGdpbSlcChan() && 1 == mess.getGdpbSlcEdge()) // SEU counter message
1153 {
1154 fhGet4ChanScm->Fill(dFullChId, uType);
1155 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1156 } // else if( 0 == mess.getGdpbSlcChan() && 1 == mess.getGdpbSlcEdge() )
1157 break;
1158 } // case gdpbv100::GET4_32B_SLC_START_SEU:
1159 default: break;
1160 } // switch( uType )
1161
1163 fhGet4MessType->Fill(fuGet4Nr, 2);
1165}
1166// -------------------------------------------------------------------------
1168{
1169 Int_t iMsgIndex = mess.getStarTrigMsgIndex();
1170
1171 switch (iMsgIndex) {
1172 case 0:
1173 fvhTokenMsgType[fuCurrDpbIdx]->Fill(0);
1175 break;
1176 case 1:
1177 fvhTokenMsgType[fuCurrDpbIdx]->Fill(1);
1180 break;
1181 case 2:
1182 fvhTokenMsgType[fuCurrDpbIdx]->Fill(2);
1184 break;
1185 case 3: {
1186 fvhTokenMsgType[fuCurrDpbIdx]->Fill(3);
1187
1188 ULong64_t ulNewGdpbTsFull = (fvulGdpbTsMsb[fuCurrDpbIdx] << 24) + (fvulGdpbTsLsb[fuCurrDpbIdx]);
1189 ULong64_t ulNewStarTsFull =
1191 UInt_t uNewToken = mess.getStarTokenStarD();
1192 UInt_t uNewDaqCmd = mess.getStarDaqCmdStarD();
1193 UInt_t uNewTrigCmd = mess.getStarTrigCmdStarD();
1194
1195 if ((uNewToken == fvuStarTokenLast[fuCurrDpbIdx]) && (ulNewGdpbTsFull == fvulGdpbTsFullLast[fuCurrDpbIdx])
1196 && (ulNewStarTsFull == fvulStarTsFullLast[fuCurrDpbIdx]) && (uNewDaqCmd == fvuStarDaqCmdLast[fuCurrDpbIdx])
1197 && (uNewTrigCmd == fvuStarTrigCmdLast[fuCurrDpbIdx])) {
1198 UInt_t uTrigWord = ((fvuStarTrigCmdLast[fuCurrDpbIdx] & 0x00F) << 16)
1199 + ((fvuStarDaqCmdLast[fuCurrDpbIdx] & 0x00F) << 12)
1200 + ((fvuStarTokenLast[fuCurrDpbIdx] & 0xFFF));
1201 LOG(warning) << "Possible error: identical STAR tokens found twice in "
1202 "a row => ignore 2nd! "
1203 << " TS " << fulCurrentTsIdx << " gDBB #" << fuCurrDpbIdx << " "
1204 << Form("token = %5u ", fvuStarTokenLast[fuCurrDpbIdx])
1205 << Form("gDPB ts = %12llu ", fvulGdpbTsFullLast[fuCurrDpbIdx])
1206 << Form("STAR ts = %12llu ", fvulStarTsFullLast[fuCurrDpbIdx])
1207 << Form("DAQ cmd = %2u ", fvuStarDaqCmdLast[fuCurrDpbIdx])
1208 << Form("TRG cmd = %2u ", fvuStarTrigCmdLast[fuCurrDpbIdx]) << Form("TRG Wrd = %5x ", uTrigWord);
1209 return;
1210 } // if exactly same message repeated
1211
1212 // STAR TS counter reset detection
1213 if (ulNewStarTsFull < fvulStarTsFullLast[fuCurrDpbIdx])
1214 LOG(info) << "Probable reset of the STAR TS: old = " << Form("%16llu", fvulStarTsFullLast[fuCurrDpbIdx])
1215 << " new = " << Form("%16llu", ulNewStarTsFull) << " Diff = -"
1216 << Form("%8llu", fvulStarTsFullLast[fuCurrDpbIdx] - ulNewStarTsFull);
1217
1218 // ULong64_t ulGdpbTsDiff = ulNewGdpbTsFull - fvulGdpbTsFullLast[ fuCurrDpbIdx ];
1219 fvulGdpbTsFullLast[fuCurrDpbIdx] = ulNewGdpbTsFull;
1220 fvulStarTsFullLast[fuCurrDpbIdx] = ulNewStarTsFull;
1221 fvuStarTokenLast[fuCurrDpbIdx] = uNewToken;
1222 fvuStarDaqCmdLast[fuCurrDpbIdx] = uNewDaqCmd;
1223 fvuStarTrigCmdLast[fuCurrDpbIdx] = uNewTrigCmd;
1224
1226 if (fuMsIndex < fuNbCoreMsPerTs) {
1228 if (0 <= fdStartTime) {
1233 } // if( 0 < fdStartTime )
1235 } // if( fuMsIndex < fuNbCoreMsPerTs )
1236
1237 break;
1238 } // case 3
1239 default: LOG(error) << "Unknown Star Trigger messageindex: " << iMsgIndex;
1240 } // switch( iMsgIndex )
1241}
1242// -------------------------------------------------------------------------
1243
1245{
1246 std::string sFolder = "eTofMoni";
1247
1248 LOG(info) << "create Histos for eTOF monitoring ";
1249
1251 // Number of log bins =
1252 // 9 for the sub-unit decade
1253 // + 9 for each unit of each decade * 10 for the subdecade range
1254 // + 1 for the closing bin top edge
1255 const Int_t iNbDecadesLog = 4;
1256 const Int_t iNbStepsDecade = 9;
1257 const Int_t iNbSubStepsInStep = 1;
1258 const Int_t iNbBinsLog = iNbStepsDecade + iNbStepsDecade * iNbSubStepsInStep * iNbDecadesLog + 1;
1259 Double_t dBinsLog[iNbBinsLog];
1260 // First fill sub-unit decade
1261 for (Int_t iSubU = 0; iSubU < iNbStepsDecade; iSubU++)
1262 dBinsLog[iSubU] = 0.1 * (1 + iSubU);
1263 std::cout << std::endl;
1264 // Then fill the main decades
1265 Double_t dSubstepSize = 1.0 / iNbSubStepsInStep;
1266 for (Int_t iDecade = 0; iDecade < iNbDecadesLog; iDecade++) {
1267 Double_t dBase = std::pow(10, iDecade);
1268 Int_t iDecadeIdx = iNbStepsDecade + iDecade * iNbStepsDecade * iNbSubStepsInStep;
1269 for (Int_t iStep = 0; iStep < iNbStepsDecade; iStep++) {
1270 Int_t iStepIdx = iDecadeIdx + iStep * iNbSubStepsInStep;
1271 for (Int_t iSubStep = 0; iSubStep < iNbSubStepsInStep; iSubStep++) {
1272 dBinsLog[iStepIdx + iSubStep] = dBase * (1 + iStep) + dBase * dSubstepSize * iSubStep;
1273 } // for( Int_t iSubStep = 0; iSubStep < iNbSubStepsInStep; iSubStep++ )
1274 } // for( Int_t iStep = 0; iStep < iNbStepsDecade; iStep++ )
1275 } // for( Int_t iDecade = 0; iDecade < iNbDecadesLog; iDecade ++)
1276 dBinsLog[iNbBinsLog - 1] = std::pow(10, iNbDecadesLog);
1277
1278 /*******************************************************************/
1279 fhMessType = new TH1I("hMessageType", "Nb of message for each type; Type", 1 + gdpbv100::MSG_STAR_TRI_D, 0.,
1281 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_HIT, "HIT");
1282 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_EPOCH, "EPOCH");
1283 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SLOWC, "SLOWC");
1284 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SYST, "SYST");
1285 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_A, "TRI_A");
1286 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_B, "TRI_B");
1287 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_C, "TRI_C");
1288 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_D, "TRI_D");
1289
1290 fhSysMessType = new TH1I("hSysMessType", "Nb of system message for each type; System Type", 1 + gdpbv100::SYS_PATTERN,
1291 0., 1 + gdpbv100::SYS_PATTERN);
1292 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_ERROR, "GET4 ERROR");
1293 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GDPB_UNKWN, "UNKW GET4 MSG");
1294 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_SYNC_MISS, "SYS_GET4_SYNC_MISS");
1295 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_PATTERN, "SYS_PATTERN");
1296
1297 fhGet4MessType = new TH2I("hGet4MessType", "Nb of message for each type per GET4; GET4 chip # ; Type", fuNrOfGet4, 0.,
1298 fuNrOfGet4, 4, 0., 4.);
1299 fhGet4MessType->GetYaxis()->SetBinLabel(1, "DATA 32b");
1300 fhGet4MessType->GetYaxis()->SetBinLabel(2, "EPOCH");
1301 fhGet4MessType->GetYaxis()->SetBinLabel(3, "S.C. M");
1302 fhGet4MessType->GetYaxis()->SetBinLabel(4, "ERROR");
1303 // fhGet4MessType->GetYaxis()->SetBinLabel( 5, "DATA 24b");
1304 // fhGet4MessType->GetYaxis()->SetBinLabel( 6, "STAR Trigger");
1305
1306 fhGet4ChanScm = new TH2I("hGet4ChanScm", "SC messages per GET4 channel; GET4 channel # ; SC type",
1308 fhGet4ChanScm->GetYaxis()->SetBinLabel(1, "Hit Scal");
1309 fhGet4ChanScm->GetYaxis()->SetBinLabel(2, "Deadtime");
1310 fhGet4ChanScm->GetYaxis()->SetBinLabel(3, "SPI");
1311 fhGet4ChanScm->GetYaxis()->SetBinLabel(4, "SEU Scal");
1312 fhGet4ChanScm->GetYaxis()->SetBinLabel(5, "START");
1313
1314 fhGet4ChanErrors = new TH2I("hGet4ChanErrors", "Error messages per GET4 channel; GET4 channel # ; Error",
1316 fhGet4ChanErrors->GetYaxis()->SetBinLabel(1, "0x00: Readout Init ");
1317 fhGet4ChanErrors->GetYaxis()->SetBinLabel(2, "0x01: Sync ");
1318 fhGet4ChanErrors->GetYaxis()->SetBinLabel(3, "0x02: Epoch count sync");
1319 fhGet4ChanErrors->GetYaxis()->SetBinLabel(4, "0x03: Epoch ");
1320 fhGet4ChanErrors->GetYaxis()->SetBinLabel(5, "0x04: FIFO Write ");
1321 fhGet4ChanErrors->GetYaxis()->SetBinLabel(6, "0x05: Lost event ");
1322 fhGet4ChanErrors->GetYaxis()->SetBinLabel(7, "0x06: Channel state ");
1323 fhGet4ChanErrors->GetYaxis()->SetBinLabel(8, "0x07: Token Ring state");
1324 fhGet4ChanErrors->GetYaxis()->SetBinLabel(9, "0x08: Token ");
1325 fhGet4ChanErrors->GetYaxis()->SetBinLabel(10, "0x09: Error Readout ");
1326 fhGet4ChanErrors->GetYaxis()->SetBinLabel(11, "0x0a: SPI ");
1327 fhGet4ChanErrors->GetYaxis()->SetBinLabel(12, "0x0b: DLL Lock error "); // <- From GET4 v1.2
1328 fhGet4ChanErrors->GetYaxis()->SetBinLabel(13, "0x0c: DLL Reset invoc."); // <- From GET4 v1.2
1329 fhGet4ChanErrors->GetYaxis()->SetBinLabel(14, "0x11: Overwrite ");
1330 fhGet4ChanErrors->GetYaxis()->SetBinLabel(15, "0x12: ToT out of range");
1331 fhGet4ChanErrors->GetYaxis()->SetBinLabel(16, "0x13: Event Discarded ");
1332 fhGet4ChanErrors->GetYaxis()->SetBinLabel(17, "0x14: Add. Rising edge"); // <- From GET4 v1.3
1333 fhGet4ChanErrors->GetYaxis()->SetBinLabel(18, "0x15: Unpaired Falling"); // <- From GET4 v1.3
1334 fhGet4ChanErrors->GetYaxis()->SetBinLabel(19, "0x16: Sequence error "); // <- From GET4 v1.3
1335 fhGet4ChanErrors->GetYaxis()->SetBinLabel(20, "0x7f: Unknown ");
1336 fhGet4ChanErrors->GetYaxis()->SetBinLabel(21, "Corrupt/unsuprtd error");
1337
1339 new TH2I("hGet4EpochFlags", "Epoch flags per GET4; GET4 chip # ; Type", fuNrOfGet4, 0., fuNrOfGet4, 4, 0., 4.);
1340 fhGet4EpochFlags->GetYaxis()->SetBinLabel(1, "SYNC");
1341 fhGet4EpochFlags->GetYaxis()->SetBinLabel(2, "Ep LOSS");
1342 fhGet4EpochFlags->GetYaxis()->SetBinLabel(3, "Da LOSS");
1343 fhGet4EpochFlags->GetYaxis()->SetBinLabel(4, "MISSMAT");
1344
1345 Double_t dSectorMin = -0.5 + fUnpackPar->GetGdpbToSectorOffset();
1346 Double_t dSectorMax = fuNrOfGdpbs + dSectorMin;
1348 new TH2I("hGdpbAsicSpiCounts", "SPI messages count per Sector and ASIC; ASIC Idx []; Sector []; SPI msg[]",
1349 fuNrOfGet4PerGdpb, -0.5, fuNrOfGet4PerGdpb - 0.5, fuNrOfGdpbs, dSectorMin, dSectorMax);
1350
1352 new TH2I("hGdpbMessageType", "Nb of message for each type per Sector; Type; Sector []",
1353 1 + gdpbv100::MSG_STAR_TRI_D, 0., 1 + gdpbv100::MSG_STAR_TRI_D, fuNrOfGdpbs, dSectorMin, dSectorMax);
1354 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_HIT, "HIT");
1355 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_EPOCH, "EPOCH");
1356 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SLOWC, "SLOWC");
1357 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SYST, "SYST");
1358 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_A, "TRI_A");
1359 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_B, "TRI_B");
1360 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_C, "TRI_C");
1361 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_D, "TRI_D");
1362
1364 new TH2I("hGdpbSysMessType", "Nb of system message for each type per Sector; System Type; Sector []",
1365 1 + gdpbv100::SYS_PATTERN, 0., 1 + gdpbv100::SYS_PATTERN, fuNrOfGdpbs, dSectorMin, dSectorMax);
1366 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_ERROR, "GET4 ERROR");
1367 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GDPB_UNKWN, "UNKW GET4 MSG");
1368 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_SYNC_MISS, "SYS_GET4_SYNC_MISS");
1369 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_PATTERN, "SYS_PATTERN");
1370
1372 new TH2I("hGdpbSysMessPattType", "Nb of pattern message for each type per Sector; Pattern Type; Sector []",
1373 1 + gdpbv100::PATT_RESYNC, 0., 1 + gdpbv100::PATT_RESYNC, fuNrOfGdpbs, dSectorMin, dSectorMax);
1374 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_MISSMATCH, "PATT_MISSMATCH");
1375 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_ENABLE, "PATT_ENABLE");
1376 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_RESYNC, "PATT_RESYNC");
1377
1378 fhGdpbEpochFlags = new TH2I("hGdpbEpochFlags", "Epoch flags per Sector; Sector # ; Type", fuNrOfGdpbs, dSectorMin,
1379 dSectorMax, 4, 0., 4.);
1380 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(1, "SYNC");
1381 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(2, "Ep LOSS");
1382 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(3, "Da LOSS");
1383 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(4, "MISSMAT");
1384
1385 fhGdpbEpochSyncEvo = new TH2D("hGdpbEpochSyncEvo", "Epoch SYNC per second and Sector; Time[s]; Sector #; SYNC Nb",
1386 fuHistoryHistoSize, 0, fuHistoryHistoSize, fuNrOfGdpbs, dSectorMin, dSectorMax);
1387
1389 new TH2D("hGdpbEpochMissEvo", "Epoch Missmatch per second and Sector; Time[s]; Sector #; Missmatch Nb",
1390 fuHistoryHistoSize, 0, fuHistoryHistoSize, fuNrOfGdpbs, dSectorMin, dSectorMax);
1391
1393 new TH1D("hGdpbEndMsBufferNotEmpty", "MS where buffer is not empty at end, per Sector; Sector #; Bad MS",
1394 fuNrOfGdpbs, dSectorMin, dSectorMax);
1395
1396 fhGdpbEndMsDataLost = new TH2D("hGdpbEndMsDataLost",
1397 "Amount of lost data when buffer not empty at end, per MS and "
1398 "Sector; Sector #; Lost Data per bad MS []; Bad MS",
1399 fuNrOfGdpbs, dSectorMin, dSectorMax, iNbBinsLog - 1, dBinsLog);
1400
1401 if (kTRUE == fbDebugMonitorMode) {
1402 fhNbMissPatternPerMs = new TH2I("hNbMissPatternPerMs",
1403 "Nb of missmatch pattern per MS for each sector; Number of "
1404 "pattern messages []; sector []; MS",
1405 1000, -0.5, 999.5, fuNrOfGdpbs, dSectorMin, dSectorMax);
1406
1408 new TH2I("hPatternMissmatch", "Missmatch pattern integral per Sector; ASIC Pattern []; Sector []",
1409 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dSectorMin, dSectorMax);
1410
1411 fhPatternEnable = new TH2I("hPatternEnable", "Enable pattern integral per Sector; ASIC Pattern []; Sector []",
1412 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dSectorMin, dSectorMax);
1413
1414 fhPatternResync = new TH2I("hPatternResync", "Resync pattern integral per Sector; ASIC Pattern []; Sector []",
1415 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dSectorMin, dSectorMax);
1416 } // if( kTRUE == fbDebugMonitorMode )
1417
1419 AddHistoToVector(fhMessType, sFolder);
1438 if (kTRUE == fbDebugMonitorMode) {
1443 } // if( kTRUE == fbDebugMonitorMode )
1444
1445 /*******************************************************************/
1446 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1447 UInt_t uSectorIndex = uGdpb + fUnpackPar->GetGdpbToSectorOffset();
1448 if (-1 < fiSectorIndex) uSectorIndex += fiSectorIndex;
1449
1450 std::string sFolderSector = Form("sector%02u", uSectorIndex);
1451 std::string sFolderSectorPatt = Form("sector%02u/Pattern", uSectorIndex);
1452 std::string sFolderSectorTrig = Form("sector%02u/Trigger", uSectorIndex);
1453
1454 fvhGdpbGet4MessType.push_back(new TH2I(Form("hGdpbGet4MessType_%02u", uGdpb),
1455 Form("Nb of message for each type per GET4 in Sector %02u; GET4 "
1456 "chip # ; Type",
1457 uSectorIndex),
1458 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, 4, 0., 4.));
1459 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(1, "DATA 32b");
1460 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(2, "EPOCH");
1461 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(3, "S.C. M");
1462 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(4, "ERROR");
1463
1464 fvhGdpbGet4ChanScm.push_back(
1465 new TH2I(Form("hGdpbGet4ChanScm_%02u", uGdpb),
1466 Form("SC messages per GET4 channel in Sector %02u; GET4 channel # ; SC type", uSectorIndex),
1467 2 * fuNrOfChannelsPerGdpb, 0., fuNrOfChannelsPerGdpb, 5, 0., 5.));
1468 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(1, "Hit Scal");
1469 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(2, "Deadtime");
1470 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(3, "SPI");
1471 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(4, "SEU Scal");
1472 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(5, "START");
1473
1474 fvhGdpbGet4ChanErrors.push_back(new TH2I(Form("hGdpbGet4ChanErrors_%02u", uGdpb),
1475 Form("Error messages per GET4 channel in Sector %02u; GET4 "
1476 "channel # ; Error",
1477 uSectorIndex),
1478 fuNrOfChannelsPerGdpb, 0., fuNrOfChannelsPerGdpb, 22, 0., 22.));
1479 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(1, "0x00: Readout Init ");
1480 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(2, "0x01: Sync ");
1481 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(3, "0x02: Epoch count sync");
1482 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(4, "0x03: Epoch ");
1483 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(5, "0x04: FIFO Write ");
1484 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(6, "0x05: Lost event ");
1485 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(7, "0x06: Channel state ");
1486 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(8, "0x07: Token Ring state");
1487 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(9, "0x08: Token ");
1488 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(10, "0x09: Error Readout ");
1489 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(11, "0x0a: SPI ");
1490 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(12, "0x0b: DLL Lock error "); // <- From GET4 v1.2
1491 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(13, "0x0c: DLL Reset invoc."); // <- From GET4 v1.2
1492 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(14, "0x11: Overwrite "); // <- From GET4 v1.0 to 1.3
1493 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(15, "0x12: ToT out of range");
1494 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(16, "0x13: Event Discarded ");
1495 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(17, "0x14: Add. Rising edge"); // <- From GET4 v1.3
1496 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(18, "0x15: Unpaired Falling"); // <- From GET4 v1.3
1497 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(19, "0x16: Sequence error "); // <- From GET4 v1.3
1498 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(20, "0x17: Epoch Overflow "); // <- From GET4 v2.0
1499 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(21, "0x7f: Unknown ");
1500 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(22, "Corrupt/unsuprtd error");
1501
1503 if (kTRUE == fbDebugMonitorMode) {
1504 fvhRawFt_gDPB.push_back(new TH2I(Form("RawFt_gDPB_%02u", uSectorIndex),
1505 Form("Raw FineTime Sector %02u Plot 0; channel; FineTime [bin]", uSectorIndex),
1507
1508 fvhRawCt_gDPB.push_back(
1509 new TH2I(Form("RawCt_gDPB_%02u", uSectorIndex),
1510 Form("Raw CoarseTime Sector %02u Plot 0; channel; CoarseTime [bin]", uSectorIndex),
1511 fuNrOfChannelsPerGdpb, 0, fuNrOfChannelsPerGdpb, 4096, 0, 4096));
1512 } // if( kTRUE == fbDebugMonitorMode )
1513
1514 fvhRemapTot_gDPB.push_back(new TH2I(Form("RemapTot_gDPB_%02u", uSectorIndex),
1515 Form("Raw TOT Sector %02u remapped; PADI channel; TOT [bin]", uSectorIndex),
1517
1518 fvhRemapChCount_gDPB.push_back(
1519 new TH1I(Form("RemapChCount_gDPB_%02u", uSectorIndex),
1520 Form("Channel counts Sector %02u remapped; PADI channel; Hits", uSectorIndex),
1522
1523 fvhRemapChRate_gDPB.push_back(new TH2D(Form("RemapChRate_gDPB_%02u", uSectorIndex),
1524 Form("PADI channel rate Sector %02u; Time in run [s]; PADI "
1525 "channel; Rate [1/s]",
1526 uSectorIndex),
1530
1532 if (kTRUE == fbDebugMonitorMode) {
1533 fvhGdpbPatternMissmatchEvo.push_back(new TH2I(Form("hGdpbPatternMissmatchEvo_%02u", uSectorIndex),
1534 Form("Missmatch pattern vs TS index in Sector %02u; TS # ; "
1535 "ASIC Pattern []",
1536 uSectorIndex),
1537 10000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1538
1539 fvhGdpbPatternEnableEvo.push_back(
1540 new TH2I(Form("hGdpbPatternEnableEvo_%02u", uSectorIndex),
1541 Form("Enable pattern vs TS index in Sector %02u; TS # ; ASIC Pattern []", uSectorIndex), 10000, 0.,
1542 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1543
1544 fvhGdpbPatternResyncEvo.push_back(
1545 new TH2I(Form("hGdpbPatternResyncEvo%02u", uSectorIndex),
1546 Form("Resync pattern vs TS index in Sector %02u; TS # ; ASIC Pattern []", uSectorIndex), 10000, 0.,
1547 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1548
1549 fvhGdpbMissmatchEvoPerTs.push_back(
1550 new TH2I(Form("hGdpbMissmatchEvoPerTs%02u", uSectorIndex),
1551 Form("Missmatch vs TS index in Sector %02u; TS # ; Asic []; Missmatch? []", uSectorIndex), 10000, 0.,
1552 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1553
1554 fvhGdpbMissmatchEnaEvoPerTs.push_back(new TH2I(Form("hGdpbMissmatchEnaEvoPerTs%02u", uSectorIndex),
1555 Form("Enable+Missmatch vs TS index in Sector %02u; TS # ; "
1556 "Asic []; Enabled & Missmatch? []",
1557 uSectorIndex),
1558 10000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1559
1560 fvhGdpbEnableEvoPerTs.push_back(
1561 new TH2I(Form("hGdpbEnableEvoPerTs%02u", uSectorIndex),
1562 Form("Enable vs TS index in Sector %02u; TS # ; Asic []; Enabled? []", uSectorIndex), 100000, 0.,
1563 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1564
1565 fvhGdpbResyncEvoPerTs.push_back(
1566 new TH2I(Form("hGdpbResyncEvoPerTs%02u", uSectorIndex),
1567 Form("Resync vs TS index in Sector %02u; TS # ; Asic []; Resync? []", uSectorIndex), 10000, 0., 100000,
1569
1570 fvhGdpbResyncEnaEvoPerTs.push_back(new TH2I(Form("hGdpbResyncEnaEvoPerTs%02u", uSectorIndex),
1571 Form("Enable+Resync vs TS index in Sector %02u; TS # ; Asic "
1572 "[]; Enabled & Resync? []",
1573 uSectorIndex),
1574 10000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1575
1576 fvhGdpbStateEvoPerTs.push_back(new TH2I(Form("hGdpbStateEvoPerTs%02u", uSectorIndex),
1577 Form("ASIC State vs TS index in Sector %02u; TS # ; Asic []; 0 = Off, "
1578 "1 = OK, 2 = Miss, 3 = Resync, 4 = Miss + Resync []",
1579 uSectorIndex),
1580 100000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1581 } // if( kTRUE == fbDebugMonitorMode )
1582
1585 fvhTokenMsgType.push_back(new TH1F(Form("hTokenMsgType_gDPB_%02u", uSectorIndex),
1586 Form("STAR trigger Messages type Sector %02u; Type ; Counts", uSectorIndex), 4,
1587 0, 4));
1588 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(1, "A"); // gDPB TS high
1589 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(2, "B"); // gDPB TS low, STAR TS high
1590 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(3, "C"); // STAR TS mid
1591 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(4, "D"); // STAR TS low, token, CMDs
1592
1593 fvhTriggerRate.push_back(
1594 new TH1F(Form("hTriggerRate_gDPB_%02u", uSectorIndex),
1595 Form("STAR trigger signals per second Sector %02u; Time[s] ; Counts", uSectorIndex), fuHistoryHistoSize,
1596 0, fuHistoryHistoSize));
1597
1598 fvhCmdDaqVsTrig.push_back(new TH2I(
1599 Form("hCmdDaqVsTrig_gDPB_%02u", uSectorIndex),
1600 Form("STAR daq command VS STAR trigger command Sector %02u; DAQ ; TRIGGER", uSectorIndex), 16, 0, 16, 16, 0, 16));
1601 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(1, "0x0: no-trig "); // idle link
1602 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1603 2, "0x1: clear "); // clears redundancy counters on the readout boards
1604 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(3, "0x2: mast-rst"); // general reset of the whole front-end logic
1605 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(4, "0x3: spare "); // reserved
1606 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1607 5, "0x4: trigg. 0"); // Default physics readout, all det support required
1608 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(6, "0x5: trigg. 1"); //
1609 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(7, "0x6: trigg. 2"); //
1610 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(8, "0x7: trigg. 3"); //
1611 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(9, "0x8: puls. 0"); //
1612 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(10, "0x9: puls. 1"); //
1613 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(11, "0xA: puls. 2"); //
1614 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(12, "0xB: puls. 3"); //
1615 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1616 13,
1617 "0xC: config "); // housekeeping trigger: return geographic info of FE
1618 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(14, "0xD: abort "); // aborts and clears an active event
1619 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(15, "0xE: L1accept"); //
1620 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(16, "0xF: L2accept"); //
1621 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(1, "0x0: 0"); // To be filled at STAR
1622 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(2, "0x1: 1"); // To be filled at STAR
1623 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(3, "0x2: 2"); // To be filled at STAR
1624 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(4, "0x3: 3"); // To be filled at STAR
1625 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(5, "0x4: 4"); // To be filled at STAR
1626 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(6, "0x5: 5"); // To be filled at STAR
1627 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(7, "0x6: 6"); // To be filled at STAR
1628 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(8, "0x7: 7"); // To be filled at STAR
1629 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(9, "0x8: 8"); // To be filled at STAR
1630 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(10, "0x9: 9"); // To be filled at STAR
1631 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(11, "0xA: 10"); // To be filled at STAR
1632 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(12, "0xB: 11"); // To be filled at STAR
1633 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(13, "0xC: 12"); // To be filled at STAR
1634 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(14, "0xD: 13"); // To be filled at STAR
1635 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(15, "0xE: 14"); // To be filled at STAR
1636 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(16, "0xF: 15"); // To be filled at STAR
1637
1638 fvhStarTokenEvo.push_back(new TH2I(Form("hStarTokenEvo_gDPB_%02u", uSectorIndex),
1639 Form("STAR token value VS time Sector %02u; Time in Run [s] ; "
1640 "STAR Token; Counts",
1641 uSectorIndex),
1642 fuHistoryHistoSize, 0, fuHistoryHistoSize, 410, 0, 4100));
1643
1644 fvhStarTrigGdpbTsEvo.push_back(new TProfile(Form("hStarTrigGdpbTsEvo_gDPB_%02u", uSectorIndex),
1645 Form("gDPB TS in STAR triger tokens for Sector %02u; Time "
1646 "in Run [s] ; gDPB TS;",
1647 uSectorIndex),
1649
1650 fvhStarTrigStarTsEvo.push_back(new TProfile(Form("hStarTrigStarTsEvo_gDPB_%02u", uSectorIndex),
1651 Form("STAR TS in STAR triger tokens for Sector %02u; Time "
1652 "in Run [s] ; STAR TS;",
1653 uSectorIndex),
1655
1656
1659 AddHistoToVector(fvhGdpbGet4MessType[uGdpb], sFolderSector);
1660 AddHistoToVector(fvhGdpbGet4ChanScm[uGdpb], sFolderSector);
1661 AddHistoToVector(fvhGdpbGet4ChanErrors[uGdpb], sFolderSector);
1663 if (kTRUE == fbDebugMonitorMode) {
1664 AddHistoToVector(fvhRawFt_gDPB[uGdpb], sFolderSector);
1665 AddHistoToVector(fvhRawCt_gDPB[uGdpb], sFolderSector);
1666 } // if( kTRUE == fbDebugMonitorMode )
1667 AddHistoToVector(fvhRemapTot_gDPB[uGdpb], sFolderSector);
1668 AddHistoToVector(fvhRemapChCount_gDPB[uGdpb], sFolderSector);
1669 AddHistoToVector(fvhRemapChRate_gDPB[uGdpb], sFolderSector);
1670 if (kTRUE == fbDebugMonitorMode) {
1672 AddHistoToVector(fvhGdpbPatternMissmatchEvo[uGdpb], sFolderSectorPatt);
1673 AddHistoToVector(fvhGdpbPatternEnableEvo[uGdpb], sFolderSectorPatt);
1674 AddHistoToVector(fvhGdpbPatternResyncEvo[uGdpb], sFolderSectorPatt);
1676 AddHistoToVector(fvhGdpbMissmatchEvoPerTs[uGdpb], sFolderSectorPatt);
1677 AddHistoToVector(fvhGdpbMissmatchEnaEvoPerTs[uGdpb], sFolderSectorPatt);
1678 AddHistoToVector(fvhGdpbEnableEvoPerTs[uGdpb], sFolderSectorPatt);
1679 AddHistoToVector(fvhGdpbResyncEvoPerTs[uGdpb], sFolderSectorPatt);
1680 AddHistoToVector(fvhGdpbResyncEnaEvoPerTs[uGdpb], sFolderSectorPatt);
1681 AddHistoToVector(fvhGdpbStateEvoPerTs[uGdpb], sFolderSectorPatt);
1682 } // if( kTRUE == fbDebugMonitorMode )
1684 AddHistoToVector(fvhTokenMsgType[uGdpb], sFolderSectorTrig);
1685 AddHistoToVector(fvhTriggerRate[uGdpb], sFolderSectorTrig);
1686 AddHistoToVector(fvhCmdDaqVsTrig[uGdpb], sFolderSectorTrig);
1687 AddHistoToVector(fvhStarTokenEvo[uGdpb], sFolderSectorTrig);
1688 AddHistoToVector(fvhStarTrigGdpbTsEvo[uGdpb], sFolderSectorTrig);
1689 AddHistoToVector(fvhStarTrigStarTsEvo[uGdpb], sFolderSectorTrig);
1690 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1691
1692 /*******************************************************************/
1693 fhMsgCntEvo = new TH1I("hMsgCntEvo",
1694 "Evolution of Hit & error msgs counts vs time in run; "
1695 "Time in run [s]; Msgs Count []",
1697 fhHitCntEvo = new TH1I("hHitCntEvo", "Evolution of Hit counts vs time in run; Time in run [s]; Hits Count []",
1699 fhErrorCntEvo = new TH1I("hErrorCntEvo", "Evolution of Error counts vs time in run; Time in run [s]; Error Count []",
1701 fhLostEvtCntEvo = new TH1I("hLostEvtCntEvo",
1702 "Evolution of LostEvent counts vs time in run; "
1703 "Time in run [s]; LostEvent Count []",
1705
1706 fhErrorFractEvo = new TProfile("hErrorFractEvo",
1707 "Evolution of Error Fraction vs time in run; "
1708 "Time in run [s]; Error Fract []",
1710 fhLostEvtFractEvo = new TProfile("hLostEvtFractEvo",
1711 "Evolution of LostEvent Fraction vs time in "
1712 "run; Time in run [s]; LostEvent Fract []",
1714
1715 fhMsgCntPerMsEvo = new TH2I("hMsgCntPerMsEvo",
1716 "Evolution of Hit & error msgs counts, per MS vs time in run; "
1717 "Time in run [s]; Hits Count/MS []; MS",
1718 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog - 1, dBinsLog);
1719 fhHitCntPerMsEvo = new TH2I("hHitCntPerMsEvo",
1720 "Evolution of Hit counts, per MS vs time in run; "
1721 "Time in run [s]; Hits Count/MS []; MS",
1722 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog - 1, dBinsLog);
1723 fhErrorCntPerMsEvo = new TH2I("hErrorCntPerMsEvo",
1724 "Evolution of Error counts, per MS vs time in "
1725 "run; Time in run [s]; Error Count/MS []; MS",
1726 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog - 1, dBinsLog);
1727 fhLostEvtCntPerMsEvo = new TH2I("hLostEvtCntPerMsEvo",
1728 "Evolution of LostEvent, per MS counts vs time in run; Time in "
1729 "run [s]; LostEvent Count/MS []; MS",
1730 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog - 1, dBinsLog);
1731
1732 fhErrorFractPerMsEvo = new TH2I("hErrorFractPerMsEvo",
1733 "Evolution of Error Fraction, per MS vs time in run; Time in run "
1734 "[s]; Error Fract/MS []; MS",
1735 fuHistoryHistoSize, 0, fuHistoryHistoSize, 1000, 0, 1);
1736 fhLostEvtFractPerMsEvo = new TH2I("hLostEvtFractPerMsEvo",
1737 "Evolution of LostEvent Fraction, per MS vs time in run; Time in "
1738 "run [s]; LostEvent Fract/MS []; MS",
1739 fuHistoryHistoSize, 0, fuHistoryHistoSize, 1000, 0, 1);
1740
1742 AddHistoToVector(fhMsgCntEvo, sFolder);
1743 AddHistoToVector(fhHitCntEvo, sFolder);
1746
1749
1755
1756 /*******************************************************************/
1757
1758 /*******************************************************************/
1761 fcSummary = new TCanvas("cSummary", "gDPB Monitoring Summary");
1762 fcSummary->Divide(2, 3);
1763
1764 // 1st Column: Messages types
1765 fcSummary->cd(1);
1766 gPad->SetGridx();
1767 gPad->SetGridy();
1768 gPad->SetLogy();
1769 fhMessType->Draw();
1770
1771 fcSummary->cd(2);
1772 gPad->SetGridx();
1773 gPad->SetGridy();
1774 gPad->SetLogy();
1775 fhSysMessType->Draw();
1776
1777 fcSummary->cd(3);
1778 gPad->SetGridx();
1779 gPad->SetGridy();
1780 gPad->SetLogz();
1781 fhGet4MessType->Draw("colz");
1782
1783 // 2nd Column: GET4 Errors + Epoch flags + SCm
1784 fcSummary->cd(4);
1785 gPad->SetGridx();
1786 gPad->SetGridy();
1787 gPad->SetLogz();
1788 fhGet4ChanErrors->Draw("colz");
1789
1790 fcSummary->cd(5);
1791 gPad->SetGridx();
1792 gPad->SetGridy();
1793 gPad->SetLogz();
1794 fhGet4EpochFlags->Draw("colz");
1795
1796 fcSummary->cd(6);
1797 gPad->SetGridx();
1798 gPad->SetGridy();
1799 fhGet4ChanScm->Draw("colz");
1800
1801 AddCanvasToVector(fcSummary, "canvases");
1803
1805 fcSummaryGdpb = new TCanvas("cSummaryGdpb", "gDPB Monitoring Summary");
1806 fcSummaryGdpb->Divide(2, 3);
1807
1808 fcSummaryGdpb->cd(1);
1809 gPad->SetGridx();
1810 gPad->SetGridy();
1811 gPad->SetLogz();
1812 fhGdpbMessType->Draw("colz");
1813
1814 fcSummaryGdpb->cd(2);
1815 gPad->SetGridx();
1816 gPad->SetGridy();
1817 gPad->SetLogz();
1818 fhGdpbSysMessPattType->Draw("text colz");
1819
1820 fcSummaryGdpb->cd(3);
1821 gPad->SetGridx();
1822 gPad->SetGridy();
1823 gPad->SetLogz();
1824 fhGdpbSysMessType->Draw("colz");
1825
1826 fcSummaryGdpb->cd(5);
1827 gPad->SetGridx();
1828 gPad->SetGridy();
1829 gPad->SetLogz();
1830 fhGdpbEpochFlags->Draw("text colz");
1831
1832 fcSummaryGdpb->cd(4);
1833 gPad->SetGridx();
1834 gPad->SetGridy();
1835 fhGdpbEpochSyncEvo->Draw("colz");
1836
1837 fcSummaryGdpb->cd(6);
1838 gPad->SetGridx();
1839 gPad->SetGridy();
1840 gPad->SetLogz();
1841 fhGdpbEpochMissEvo->Draw("colz");
1842
1843 AddCanvasToVector(fcSummaryGdpb, "canvases");
1845 fcStarTrigTokenType = new TCanvas("cStarTrigTokenType", "STAR trigger token message type per sector");
1846 fcStarTriggerRate = new TCanvas("cStarTriggerRate", "STAR trigger rate per sector");
1847 fcStarTrigCmdDaqVsTrig = new TCanvas("cStarTrigCmdDaqVsTrig", "STAR trigger command types per sector");
1848 fcStarTrigStarTokenEvo = new TCanvas("cStarTrigStarTokenEvo", "STAR trigger token evolution per sector");
1849 fcStarTrigGdpbTsEvo = new TCanvas("cStarTrigGdpbTsEvo", "STAR trigger gDPB TS evo per sector");
1850 fcStarTrigStarTsEvo = new TCanvas("cStarTrigStarTsEvo", "STAR trigger STAR TS evo per sector");
1851
1852 fcStarTrigTokenType->Divide(4, 3);
1853 fcStarTriggerRate->Divide(4, 3);
1854 fcStarTrigCmdDaqVsTrig->Divide(4, 3);
1855 fcStarTrigStarTokenEvo->Divide(4, 3);
1856 fcStarTrigGdpbTsEvo->Divide(4, 3);
1857 fcStarTrigStarTsEvo->Divide(4, 3);
1858
1865
1866 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1867 UInt_t uSectorIndex = uGdpb + fUnpackPar->GetGdpbToSectorOffset();
1868 if (-1 < fiSectorIndex) uSectorIndex += fiSectorIndex;
1869
1870 fvcSumGdpbGet4.push_back(new TCanvas(Form("cSumSector%02u", uSectorIndex),
1871 Form("Summary per GET4 or channel for sector %02u", uSectorIndex)));
1872 fvcSumGdpbGet4[uGdpb]->Divide(2, 2);
1873
1874 fvcSumGdpbGet4[uGdpb]->cd(1);
1875 gPad->SetGridx();
1876 gPad->SetGridy();
1877 gPad->SetLogz();
1878 fvhGdpbGet4MessType[uGdpb]->Draw("colz");
1879
1880 fvcSumGdpbGet4[uGdpb]->cd(2);
1881 gPad->SetGridx();
1882 gPad->SetGridy();
1883 gPad->SetLogz();
1884 fvhGdpbGet4ChanScm[uGdpb]->Draw("colz");
1885
1886 fvcSumGdpbGet4[uGdpb]->cd(3);
1887 gPad->SetGridx();
1888 gPad->SetGridy();
1889 gPad->SetLogz();
1890 fvhGdpbGet4ChanErrors[uGdpb]->Draw("colz");
1891
1892 fvcSumGdpbGet4[uGdpb]->cd(4);
1893 gPad->SetGridx();
1894 gPad->SetGridy();
1895 gPad->SetLogz();
1896 fvhRemapTot_gDPB[uGdpb]->Draw("colz");
1897
1898
1899 AddCanvasToVector(fvcSumGdpbGet4[uGdpb], "canvases");
1900
1901 fcStarTrigTokenType->cd(1 + uGdpb);
1902 gPad->SetGridx();
1903 gPad->SetGridy();
1904 fvhTokenMsgType[uGdpb]->Draw("hist");
1905
1906 fcStarTriggerRate->cd(1 + uGdpb);
1907 gPad->SetGridx();
1908 gPad->SetGridy();
1909 gPad->SetLogy();
1910 fvhTriggerRate[uGdpb]->Draw("hist");
1911
1912 fcStarTrigCmdDaqVsTrig->cd(1 + uGdpb);
1913 gPad->SetGridx();
1914 gPad->SetGridy();
1915 gPad->SetLogz();
1916 fvhCmdDaqVsTrig[uGdpb]->Draw("colz");
1917
1918 fcStarTrigStarTokenEvo->cd(1 + uGdpb);
1919 gPad->SetGridx();
1920 gPad->SetGridy();
1921 gPad->SetLogz();
1922 fvhStarTokenEvo[uGdpb]->Draw("colz");
1923
1924 fcStarTrigGdpbTsEvo->cd(1 + uGdpb);
1925 gPad->SetGridx();
1926 gPad->SetGridy();
1927 fvhStarTrigGdpbTsEvo[uGdpb]->Draw("hist");
1928
1929 fcStarTrigStarTsEvo->cd(1 + uGdpb);
1930 gPad->SetGridx();
1931 gPad->SetGridy();
1932 fvhStarTrigStarTsEvo[uGdpb]->Draw("hist");
1933 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1934 /*******************************************************************/
1935
1936 return kTRUE;
1937}
1939{
1940 if (kTRUE == fbDebugMonitorMode) {
1942 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb)
1943 for (UInt_t uAsic = 0; uAsic < fuNrOfGet4PerGdpb; ++uAsic) {
1944 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1945 fvhGdpbMissmatchEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1946 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1947
1948 if (fvvbGdpbLastEnablePattern[uGdpb][uAsic]) {
1949 fvhGdpbEnableEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1950
1951 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1952 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1953 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1954
1955 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1956 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1957 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1958
1960 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1961 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1962 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 4);
1963 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1964 else
1965 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 2);
1966 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1967 else if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1968 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 3);
1969 } // else if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1970 else
1971 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 1);
1972 } // if( fvvbGdpbLastEnablePattern[ uGdpb ][ uAsic ] )
1973 else
1974 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 0);
1975
1976 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1977 fvhGdpbResyncEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1978 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1979 } // Loop on gDPB and ASICs
1980 } // if( kTRUE == fbDebugMonitorMode )
1981 /*
1982 UInt_t uCountHitsInMs = 0;
1983 UInt_t uCountErrorsInMs = 0;
1984 UInt_t uCountLostEvtInMs = 0;
1985
1986 Double_t dFractErrorsInMs = uCountErrorsInMs;
1987 Double_t dFractLostEvtInMs = uCountLostEvtInMs;
1988 dFractErrorsInMs /= ( uCountHitsInMs + uCountErrorsInMs );
1989 dFractLostEvtInMs /= ( uCountHitsInMs + uCountErrorsInMs );
1990
1991 fhMsgCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountHitsInMs + uCountErrorsInMs );
1992 fhHitCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountHitsInMs );
1993 fhErrorCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountErrorsInMs );
1994 fhLostEvtCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountLostEvtInMs );
1995 fhErrorFractPerMsEvo->Fill( fdMsTime - fdStartTime, dFractErrorsInMs );
1996 fhLostEvtFractPerMsEvo->Fill( fdMsTime - fdStartTime, dFractLostEvtInMs );
1997*/
1998 return kTRUE;
1999}
2001{
2002 fhMessType->Reset();
2003 fhSysMessType->Reset();
2004 fhGet4MessType->Reset();
2005 fhGet4ChanScm->Reset();
2006 fhGet4ChanErrors->Reset();
2007 fhGet4EpochFlags->Reset();
2008 fhGdpbAsicSpiCounts->Reset();
2009 fhGdpbMessType->Reset();
2010 fhGdpbSysMessType->Reset();
2011 fhGdpbSysMessPattType->Reset();
2012 fhGdpbEpochFlags->Reset();
2013 fhGdpbEpochSyncEvo->Reset();
2014 fhGdpbEpochMissEvo->Reset();
2016 fhGdpbEndMsDataLost->Reset();
2017 if (kTRUE == fbDebugMonitorMode) {
2018 fhNbMissPatternPerMs->Reset();
2019 fhPatternMissmatch->Reset();
2020 fhPatternEnable->Reset();
2021 fhPatternResync->Reset();
2022 } // if( kTRUE == fbDebugMonitorMode )
2023
2024 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2025 fvhGdpbGet4MessType[uGdpb]->Reset();
2026 fvhGdpbGet4ChanScm[uGdpb]->Reset();
2027 fvhGdpbGet4ChanErrors[uGdpb]->Reset();
2028 if (kTRUE == fbDebugMonitorMode) {
2029 fvhRawFt_gDPB[uGdpb]->Reset();
2030 fvhRawCt_gDPB[uGdpb]->Reset();
2031 } // if( kTRUE == fbDebugMonitorMode )
2032 fvhRemapTot_gDPB[uGdpb]->Reset();
2033 fvhRemapChCount_gDPB[uGdpb]->Reset();
2034 fvhRemapChRate_gDPB[uGdpb]->Reset();
2035 if (kTRUE == fbDebugMonitorMode) {
2036 fvhGdpbPatternMissmatchEvo[uGdpb]->Reset();
2037 fvhGdpbPatternEnableEvo[uGdpb]->Reset();
2038 fvhGdpbPatternResyncEvo[uGdpb]->Reset();
2039 fvhGdpbMissmatchEvoPerTs[uGdpb]->Reset();
2040 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Reset();
2041 fvhGdpbEnableEvoPerTs[uGdpb]->Reset();
2042 fvhGdpbResyncEvoPerTs[uGdpb]->Reset();
2043 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Reset();
2044 fvhGdpbStateEvoPerTs[uGdpb]->Reset();
2045 } // if( kTRUE == fbDebugMonitorMode )
2046 fvhTokenMsgType[uGdpb]->Reset();
2047 fvhTriggerRate[uGdpb]->Reset();
2048 fvhCmdDaqVsTrig[uGdpb]->Reset();
2049 fvhStarTokenEvo[uGdpb]->Reset();
2050 fvhStarTrigGdpbTsEvo[uGdpb]->Reset();
2051 fvhStarTrigStarTsEvo[uGdpb]->Reset();
2052 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2053
2054 fhMsgCntEvo->Reset();
2055 fhHitCntEvo->Reset();
2056 fhErrorCntEvo->Reset();
2057 fhLostEvtCntEvo->Reset();
2058 fhErrorFractEvo->Reset();
2059 fhLostEvtFractEvo->Reset();
2060 fhHitCntPerMsEvo->Reset();
2061 fhErrorCntPerMsEvo->Reset();
2062 fhLostEvtCntPerMsEvo->Reset();
2063 fhErrorFractPerMsEvo->Reset();
2064 fhLostEvtFractPerMsEvo->Reset();
2065
2066
2069 fdStartTime = -1.0;
2070
2071 return kTRUE;
2072}
2074{
2075 fhGdpbEpochSyncEvo->Reset();
2076 fhGdpbEpochMissEvo->Reset();
2077
2078 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2079 fvhRemapChRate_gDPB[uGdpb]->Reset();
2080 if (kTRUE == fbDebugMonitorMode) {
2081 // fvhGdpbPatternMissmatchEvo[ uGdpb ] ->Reset();
2082 // fvhGdpbPatternEnableEvo[ uGdpb ] ->Reset();
2083 // fvhGdpbPatternResyncEvo[ uGdpb ] ->Reset();
2084 fvhGdpbMissmatchEvoPerTs[uGdpb]->Reset();
2085 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Reset();
2086 fvhGdpbEnableEvoPerTs[uGdpb]->Reset();
2087 fvhGdpbResyncEvoPerTs[uGdpb]->Reset();
2088 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Reset();
2089 fvhGdpbStateEvoPerTs[uGdpb]->Reset();
2090 } // if( kTRUE == fbDebugMonitorMode )
2091 fvhTriggerRate[uGdpb]->Reset();
2092 fvhStarTokenEvo[uGdpb]->Reset();
2093 fvhStarTrigGdpbTsEvo[uGdpb]->Reset();
2094 fvhStarTrigStarTsEvo[uGdpb]->Reset();
2095 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2096
2097 fhMsgCntEvo->Reset();
2098 fhHitCntEvo->Reset();
2099 fhErrorCntEvo->Reset();
2100 fhLostEvtCntEvo->Reset();
2101 fhErrorFractEvo->Reset();
2102 fhLostEvtFractEvo->Reset();
2103 fhHitCntPerMsEvo->Reset();
2104 fhErrorCntPerMsEvo->Reset();
2105 fhLostEvtCntPerMsEvo->Reset();
2106 fhErrorFractPerMsEvo->Reset();
2107 fhLostEvtFractPerMsEvo->Reset();
2108
2109 fdStartTime = -1;
2110}
2111// -------------------------------------------------------------------------
2113{
2115 TDirectory* oldDir = NULL;
2116 TFile* histoFile = NULL;
2117 // Store current directory position to allow restore later
2118 oldDir = gDirectory;
2119 // open separate histo file in recreate mode
2120 histoFile = new TFile(fsHistoFileName, "RECREATE");
2121
2122 if (nullptr == histoFile) return kFALSE;
2123
2126 /*
2127 TString sFolder = "";
2128 if( nullptr == gDirectory->Get( sFolder ) )
2129 gDirectory->mkdir( sFolder );
2130 gDirectory->cd( sFolder );
2131*/
2132 fhGdpbEpochFlags->Write();
2133 if (kTRUE == fbDebugMonitorMode) {
2134 fhPatternMissmatch->Write();
2135 fhPatternEnable->Write();
2136 } // if( kTRUE == fbDebugMonitorMode )
2137
2138 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2141 /*
2142 TString sFolder = "";
2143 if( nullptr == gDirectory->Get( sFolder ) )
2144 gDirectory->mkdir( sFolder );
2145 gDirectory->cd( sFolder );
2146*/
2147 fvhGdpbGet4MessType[uGdpb]->Write();
2148 /*
2149 if( kTRUE == fbDebugMonitorMode )
2150 {
2151 fvhGdpbPatternMissmatchEvo[ uGdpb ]->Write();
2152 } // if( kTRUE == fbDebugMonitorMode )
2153*/
2154 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2155
2157 oldDir->cd();
2158 histoFile->Close();
2159
2160 return kTRUE;
2161}
2162// -------------------------------------------------------------------------
std::string FormatMsHeaderPrintout(const fles::MicrosliceDescriptor &msDescriptor)
int Int_t
bool Bool_t
void AddHistoToVector(TNamed *pointer, std::string sFolder="")
std::vector< size_t > fvMsComponentsList
void AddCanvasToVector(TCanvas *pointer, std::string sFolder="")
UInt_t fuGet4Id
Bin size in s for the plots with date as X axis.
std::vector< ULong64_t > fvulCurrentEpochCycle
Current epoch index, per DPB.
void ProcessHit(gdpbv100::FullMessage mess)
std::vector< TH2 * > fvhRawCt_gDPB
Debug histo, only in DebugMonitorMode.
std::vector< std::vector< bool > > fvvbGdpbLastResyncPattern
Exclude from dictionnary.
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
UInt_t fuCurrSector
Index of the DPB from which the MS currently unpacked is coming.
std::vector< TH2 * > fvhGdpbPatternMissmatchEvo
Double_t fdMsTime
End Time in ns of current TS Core from the index of the first MS first component.
std::vector< TH2 * > fvhRemapTot_gDPB
Debug histo, only in DebugMonitorMode.
void ProcessSlowCtrl(gdpbv100::Message mess)
std::vector< ULong64_t > fvulStarTsMid
Bool_t ProcessTs(const fles::Timeslice &ts)
std::vector< UInt_t > fvuStarTokenLast
TH2 * fhPatternResync
Debug histo, only in DebugMonitorMode.
UInt_t fuNrOfChannelsPerFee
Number of channels in each GET4.
std::vector< ULong64_t > fvulGdpbTsFullLast
Bool_t ProcessMs(const fles::Timeslice &ts, size_t uMsCompIdx, size_t uMsIdx)
Double_t fdTsStopTimeCore
Time in ns of current TS from the index of the first MS first component.
std::vector< TH2 * > fvhGdpbPatternResyncEvo
Debug histo, only in DebugMonitorMode.
UInt_t fuNrOfGet4PerFee
Number of FEBs per GDPB.
Bool_t fbIgnoreCriticalErrors
Switch ON the filling of a additional set of histograms.
std::vector< gdpbv100::Message > fvmEpSupprBuffer
Epoch + Epoch Cycle.
std::vector< ULong64_t > fvulGdpbTsLsb
std::vector< TH2 * > fvhGdpbResyncEvoPerTs
Debug histo, only in DebugMonitorMode.
std::vector< TH2 * > fvhGdpbGet4ChanScm
std::vector< ULong64_t > fvulStarTsMsb
std::vector< TH2 * > fvhGdpbEnableEvoPerTs
Debug histo, only in DebugMonitorMode.
std::vector< std::vector< bool > > fvvbGdpbLastMissmatchPattern
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
std::vector< ULong64_t > fvulStarTsFullLast
CbmStar2019TofPar * fUnpackPar
Settings from parameter file.
static const UInt_t kuBytesPerMessage
UInt_t fuNrOfChannelsPerGet4
Number of GET4s per FEE.
void ProcessSysMess(gdpbv100::FullMessage mess)
Bool_t fbDebugMonitorMode
Control flags.
UInt_t fuHistoryHistoSize
Histograms related variables.
void ProcessPattern(gdpbv100::Message mess)
std::vector< ULong64_t > fvulGdpbTsMsb
STAR TRIGGER detection.
std::vector< std::vector< bool > > fvvbGdpbLastEnablePattern
Exclude from dictionnary.
void ProcessError(gdpbv100::FullMessage mess)
std::vector< TProfile * > fvhStarTrigGdpbTsEvo
std::vector< ULong64_t > fvulCurrentEpochFull
Epoch cycle from the Ms Start message and Epoch counter flip.
std::vector< UInt_t > fuNbMissmatchPattern
std::vector< TH1 * > fvhTriggerRate
UInt_t fuNrOfChannelsPerGdpb
Number of GET4s per GDPB.
UInt_t fuMsIndex
Start Time in ns of current MS from its index field in header.
void ProcessStarTrig(gdpbv100::Message mess)
std::vector< TH1 * > fvhTokenMsgType
std::vector< TH2 * > fvhGdpbPatternEnableEvo
Debug histo, only in DebugMonitorMode.
std::vector< TH2 * > fvhGdpbMissmatchEvoPerTs
Exclude from dictionnary.
std::vector< TH2 * > fvhGdpbGet4MessType
std::vector< TH2 * > fvhStarTokenEvo
std::vector< TH2 * > fvhCmdDaqVsTrig
std::vector< TCanvas * > fvcSumGdpbGet4
Bool_t SaveLatencyHistograms(TString fsHistoFileName)
std::vector< TH2 * > fvhGdpbMissmatchEnaEvoPerTs
Debug histo, only in DebugMonitorMode.
std::vector< TH2 * > fvhRemapChRate_gDPB
std::vector< TH1 * > fvhRemapChCount_gDPB
TH2 * fhPatternEnable
Debug histo, only in DebugMonitorMode.
std::vector< ULong64_t > fvulCurrentEpoch
Data format control: Current time references for each GDPB: merged epoch marker, epoch cycle,...
TH1 * fhMessType
Size in seconds of the evolution histograms.
Bool_t fbEpochSinceLastHit
Duplicate Hits detection.
std::vector< UInt_t > fvuStarDaqCmdLast
void ProcessEpoch(gdpbv100::Message mess)
UInt_t fuNrOfGet4
Number of channels in each FEE.
std::vector< TProfile * > fvhStarTrigStarTsEvo
UInt_t fuGet4Nr
running number (0 to fuNrOfGet4PerGdpb) of the Get4 chip of a unique GDPB for current message
UInt_t fuNrOfGet4PerGdpb
Total number of Get4 chips in the system.
std::vector< TH2 * > fvhGdpbResyncEnaEvoPerTs
Debug histo, only in DebugMonitorMode.
TH2 * fhPatternMissmatch
Debug histo, only in DebugMonitorMode.
std::vector< TH2 * > fvhGdpbStateEvoPerTs
Debug histo, only in DebugMonitorMode.
std::vector< TH2 * > fvhGdpbGet4ChanErrors
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
Total number of GDPBs in the system.
std::vector< TH2 * > fvhRawFt_gDPB
void ProcessEpochCycle(uint64_t ulCycleData)
std::vector< Bool_t > fvbMaskedComponents
If ON not printout at all for critical errors.
std::vector< UInt_t > fvuStarTrigCmdLast
ULong64_t fulStartTs
Starting state book-keeping.
UInt_t fuNrOfFeePerGdpb
gDPB ID to index map
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
static constexpr UInt_t GetNrOfFeePerGdpb()
Int_t GetGdpbId(Int_t i)
Int_t ElinkIdxToGet4Idx(UInt_t uElink)
static constexpr UInt_t GetGdpbToSectorOffset()
Int_t Get4ChanToPadiChan(UInt_t uChannelInFee)
static constexpr UInt_t GetNrOfChannelsPerGet4()
static constexpr UInt_t GetNrOfGet4PerFee()
Double_t GetPadiThresholdVal(UInt_t uCode)
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.