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#include "FairRootManager.h"
19#include "FairRun.h"
20#include "FairRunOnline.h"
21#include "FairRuntimeDb.h"
22
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 <cstdint>
36#include <fstream>
37#include <iomanip>
38#include <iostream>
39
40// -------------------------------------------------------------------------
43 ,
45 fbDebugMonitorMode(kFALSE)
48 , fiSectorIndex(-1)
49 , fUnpackPar(nullptr)
50 , fuNrOfGdpbs(0)
56 , fuNrOfGet4(0)
59 , fuMinTotPulser(90)
60 , fuMaxTotPulser(100)
63 , fdTsStartTime(-1.0)
64 , fdTsStopTimeCore(-1.0)
65 , fdMsTime(-1.0)
66 , fuMsIndex(0)
67 , fmMsgCounter()
69 , fuCurrDpbId(0)
70 , fuCurrDpbIdx(0)
71 , fuCurrSector(0)
74 , fuGet4Id(0)
75 , fuGet4Nr(0)
80 , fulStartTs(0)
81 , fdStartTime(-1.0)
82 , fdStartTimeMsSz(0.0)
83 , ftStartTimeUnix(std::chrono::steady_clock::now())
93 , fbEpochSinceLastHit(kTRUE)
95 , fmLastHit(0)
96 , fuHistoryHistoSize(3600)
97 , fhMessType(nullptr)
98 , fhSysMessType(nullptr)
99 , fhGet4MessType(nullptr)
100 , fhGet4ChanScm(nullptr)
101 , fhGet4ChanErrors(nullptr)
102 , fhGet4EpochFlags(nullptr)
103 , fhGdpbAsicSpiCounts(nullptr)
104 , fhGdpbMessType(nullptr)
105 , fhGdpbSysMessType(nullptr)
106 , fhGdpbSysMessPattType(nullptr)
107 , fhGdpbEpochFlags(nullptr)
108 , fhGdpbEpochSyncEvo(nullptr)
109 , fhGdpbEpochMissEvo(nullptr)
111 , fhGdpbEndMsDataLost(nullptr)
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()
133 , fhNbMissPatternPerMs(nullptr)
134 , fhPatternMissmatch(nullptr)
135 , fhPatternEnable(nullptr)
136 , fhPatternResync(nullptr)
155 , fcSummary(nullptr)
156 , fcSummaryGdpb(nullptr)
158 , fcStarTrigTokenType(nullptr)
159 , fcStarTriggerRate(nullptr)
160 , fcStarTrigCmdDaqVsTrig(nullptr)
161 , fcStarTrigStarTokenEvo(nullptr)
162 , fcStarTrigGdpbTsEvo(nullptr)
163 , fcStarTrigStarTsEvo(nullptr)
164{
165}
171
172// -------------------------------------------------------------------------
174{
175 LOG(info) << "Initializing mCBM Bmon 2019 monitor algo";
176
177 return kTRUE;
178}
186
187// -------------------------------------------------------------------------
189{
190 LOG(info) << "Init parameter containers for CbmStar2019MonitorAlgo";
191 Bool_t initOK = ReInitContainers();
192
193 return initOK;
194}
196{
197 LOG(info) << "**********************************************";
198 LOG(info) << "ReInit parameter containers for CbmStar2019MonitorAlgo";
199
200 fUnpackPar = (CbmStar2019TofPar*) fParCList->FindObject("CbmStar2019TofPar");
201 if (nullptr == fUnpackPar) return kFALSE;
202
203 Bool_t initOK = InitParameters();
204
205 return initOK;
206}
208{
209 if (nullptr == fParCList) fParCList = new TList();
210 fUnpackPar = new CbmStar2019TofPar("CbmStar2019TofPar");
211 fParCList->Add(fUnpackPar);
212
213 return fParCList;
214}
216{
217 LOG(info) << "Debug Monitor mode: " << (fbDebugMonitorMode ? "ON" : "OFF");
218
219 if (kTRUE == fbIgnoreCriticalErrors)
220 LOG(warning) << "Monitor set to ignore critical GET4 errors!!! No printout "
221 "will be delivered for those!!!!";
222
223 fuNrOfGdpbs = fUnpackPar->GetNrOfGdpbs();
224 LOG(info) << "Nr. of Tof GDPBs: " << fuNrOfGdpbs;
225
226 fuNrOfFeePerGdpb = fUnpackPar->GetNrOfFeePerGdpb();
227 LOG(info) << "Nr. of FEES per Tof GDPB: " << fuNrOfFeePerGdpb;
228
229 fuNrOfGet4PerFee = fUnpackPar->GetNrOfGet4PerFee();
230 LOG(info) << "Nr. of GET4 per Tof FEE: " << fuNrOfGet4PerFee;
231
232 fuNrOfChannelsPerGet4 = fUnpackPar->GetNrOfChannelsPerGet4();
233 LOG(info) << "Nr. of channels per GET4: " << fuNrOfChannelsPerGet4;
234
236 LOG(info) << "Nr. of channels per FEE: " << fuNrOfChannelsPerFee;
237
239 LOG(info) << "Nr. of GET4s: " << fuNrOfGet4;
240
242 LOG(info) << "Nr. of GET4s per GDPB: " << fuNrOfGet4PerGdpb;
243
245 LOG(info) << "Nr. of channels per GDPB: " << fuNrOfChannelsPerGdpb;
246
247 fGdpbIdIndexMap.clear();
248 for (UInt_t i = 0; i < fuNrOfGdpbs; ++i) {
249 fGdpbIdIndexMap[fUnpackPar->GetGdpbId(i)] = i;
250 LOG(info) << "GDPB Id of TOF " << i << " : " << std::hex << fUnpackPar->GetGdpbId(i) << std::dec;
251 } // for( UInt_t i = 0; i < fuNrOfGdpbs; ++i )
252
254 fdMsSizeInNs = fUnpackPar->GetSizeMsInNs();
255 LOG(info) << "Timeslice parameters: each MS is " << fdMsSizeInNs << " ns";
256
258 if (-1 < fiSectorIndex) {
259 fiSectorIndex -= fUnpackPar->GetGdpbToSectorOffset();
260 if (fuNrOfGdpbs <= static_cast<UInt_t>(fiSectorIndex))
261 LOG(fatal) << "Selected sector out of bounds relative to parameter file: " << fiSectorIndex << " VS "
262 << fuNrOfGdpbs;
263 else
264 LOG(info) << "Selected sector " << fiSectorIndex + fUnpackPar->GetGdpbToSectorOffset()
265 << " for single sector analysis";
266
267 fuNrOfGdpbs = 1;
268 fGdpbIdIndexMap.clear();
270 } // if( -1 < fiSectorIndex )
271
273 fvulCurrentEpoch.resize(fuNrOfGdpbs, 0);
276
292 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
294 fvvbGdpbLastMissmatchPattern[uGdpb].resize(fuNrOfGet4PerGdpb, kFALSE);
295 fvvbGdpbLastEnablePattern[uGdpb].resize(fuNrOfGet4PerGdpb, kTRUE);
296 fvvbGdpbLastResyncPattern[uGdpb].resize(fuNrOfGet4PerGdpb, kFALSE);
298 fvulGdpbTsMsb[uGdpb] = 0;
299 fvulGdpbTsLsb[uGdpb] = 0;
300 fvulStarTsMsb[uGdpb] = 0;
301 fvulStarTsMid[uGdpb] = 0;
302 fvulGdpbTsFullLast[uGdpb] = 0;
303 fvulStarTsFullLast[uGdpb] = 0;
304 fvuStarTokenLast[uGdpb] = 0;
305 fvuStarDaqCmdLast[uGdpb] = 0;
306 fvuStarTrigCmdLast[uGdpb] = 0;
307 } // for (Int_t iGdpb = 0; iGdpb < fuNrOfGdpbs; ++iGdpb)
308
309 if (kTRUE == fbDebugMonitorMode) fuNbMissmatchPattern.resize(fuNrOfGdpbs, 0);
310
311 return kTRUE;
312}
313// -------------------------------------------------------------------------
314
315void CbmStar2019MonitorAlgo::AddMsComponentToList(size_t component, UShort_t usDetectorId)
316{
318 for (UInt_t uCompIdx = 0; uCompIdx < fvMsComponentsList.size(); ++uCompIdx)
319 if (component == fvMsComponentsList[uCompIdx]) return;
320
322 fvMsComponentsList.push_back(component);
323
324 LOG(info) << "CbmStar2019MonitorAlgo::AddMsComponentToList => Component " << component << " with detector ID 0x"
325 << std::hex << usDetectorId << std::dec << " added to list";
326}
327// -------------------------------------------------------------------------
328
330{
331 fulCurrentTsIdx = ts.index();
332 fdTsStartTime = static_cast<Double_t>(ts.descriptor(0, 0).idx);
333
335 if (0 == fulCurrentTsIdx) return kTRUE;
336
338 if (-1.0 == fdTsCoreSizeInNs) {
339 fuNbCoreMsPerTs = ts.num_core_microslices();
340 fuNbOverMsPerTs = ts.num_microslices(0) - ts.num_core_microslices();
343 LOG(info) << "Timeslice parameters: each TS has " << fuNbCoreMsPerTs << " Core MS and " << fuNbOverMsPerTs
344 << " Overlap MS, for a core duration of " << fdTsCoreSizeInNs << " ns and a full duration of "
345 << fdTsFullSizeInNs << " ns";
346
350 LOG(info) << "In each TS " << fuNbMsLoop << " MS will be looped over";
351
354 } // if( -1.0 == fdTsCoreSizeInNs )
355
358 // LOG(info) << Form( "TS %5d Start %12f Stop %12f", fulCurrentTsIdx, fdTsStartTime, fdTsStopTimeCore );
359
361 for (fuMsIndex = 0; fuMsIndex < fuNbMsLoop; fuMsIndex++) {
363 for (UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx) {
364 UInt_t uMsComp = fvMsComponentsList[uMsCompIdx];
365
366 if (kFALSE == ProcessMs(ts, uMsComp, fuMsIndex)) {
367 LOG(error) << "Failed to process ts " << fulCurrentTsIdx << " MS " << fuMsIndex << " for component " << uMsComp;
368 return kFALSE;
369 } // if( kFALSE == ProcessMs( ts, uMsCompIdx, fuMsIndex ) )
370 } // for( UInt_t uMsCompIdx = 0; uMsCompIdx < fvMsComponentsList.size(); ++uMsCompIdx )
371
372 if (kTRUE == fbDebugMonitorMode) {
373 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
374 fhNbMissPatternPerMs->Fill(fuNbMissmatchPattern[uGdpb], uGdpb + fUnpackPar->GetGdpbToSectorOffset());
375 fuNbMissmatchPattern[uGdpb] = 0;
376 } // for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb)
377 } // if( kTRUE == fbDebugMonitorMode )
378 } // for( fuMsIndex = 0; fuMsIndex < uNbMsLoop; fuMsIndex ++ )
379
381 if (kFALSE == FillHistograms()) {
382 LOG(error) << "Failed to fill histos in ts " << fulCurrentTsIdx;
383 return kFALSE;
384 } // if( kFALSE == FillHistograms() )
385
386 return kTRUE;
387}
388
389Bool_t CbmStar2019MonitorAlgo::ProcessMs(const fles::Timeslice& ts, size_t uMsCompIdx, size_t uMsIdx)
390{
391 auto msDescriptor = ts.descriptor(uMsCompIdx, uMsIdx);
392 fuCurrentEquipmentId = msDescriptor.eq_id;
393 const uint8_t* msContent = reinterpret_cast<const uint8_t*>(ts.content(uMsCompIdx, uMsIdx));
394
395 uint32_t uSize = msDescriptor.size;
396 fulCurrentMsIdx = msDescriptor.idx;
397 fdMsTime = (1e-9) * static_cast<double>(fulCurrentMsIdx);
398 LOG(debug) << "Microslice: " << fulCurrentMsIdx << " from EqId " << std::hex << fuCurrentEquipmentId << std::dec
399 << " has size: " << uSize;
400
401 if (0 == fvbMaskedComponents.size()) fvbMaskedComponents.resize(ts.num_components(), kFALSE);
402
403 fuCurrDpbId = static_cast<uint32_t>(fuCurrentEquipmentId & 0xFFFF);
404 // fuCurrDpbIdx = fDpbIdIndexMap[ fuCurrDpbId ];
405
407 auto it = fGdpbIdIndexMap.find(fuCurrDpbId);
408 if (it == fGdpbIdIndexMap.end()) {
409 if (kFALSE == fvbMaskedComponents[uMsCompIdx]) {
410 LOG(info) << "---------------------------------------------------------------";
411 LOG(info) << FormatMsHeaderPrintout(msDescriptor);
412 LOG(warning) << "Could not find the gDPB index for AFCK id 0x" << std::hex << fuCurrDpbId << std::dec
413 << " in timeslice " << fulCurrentTsIdx << " in microslice " << uMsIdx << " component " << uMsCompIdx
414 << "\n"
415 << "If valid this index has to be added in the TOF "
416 "parameter file in the DbpIdArray field";
417 fvbMaskedComponents[uMsCompIdx] = kTRUE;
418 } // if( kFALSE == fvbMaskedComponents[ uMsComp ] )
419 else
420 return kTRUE;
421
424
425 return kFALSE;
426 } // if( it == fGdpbIdIndexMap.end() )
427 else
429
430 fuCurrSector = fuCurrDpbIdx + fUnpackPar->GetGdpbToSectorOffset();
431
438 } // else if( fuHistoryHistoSize < fdMsTime - fdStartTime )
439 /*
441 if (fdStartTimeLong < 0)
442 fdStartTimeLong = fdMsTime;
444 if( fuHistoryHistoSizeLong < 1e-9 * (fdMsTime - fdStartTimeLong) / 60.0 )
445 {
446 ResetLongEvolutionHistograms();
447 fdStartTimeLong = dHitTime;
448 } // if( fuHistoryHistoSize < 1e-9 * (fdMsTime - fdStartTimeLong) / 60.0 )
449*/
450
451 // If not integer number of message in input buffer, print warning/error
452 if (0 != (uSize % kuBytesPerMessage))
453 LOG(error) << "The input microslice buffer does NOT "
454 << "contain only complete nDPB messages!";
455
456 // Compute the number of complete messages in the input microslice buffer
457 uint32_t uNbMessages = (uSize - (uSize % kuBytesPerMessage)) / kuBytesPerMessage;
458
459 // Prepare variables for the loop on contents
460 Int_t messageType = -111;
461 const uint64_t* pInBuff = reinterpret_cast<const uint64_t*>(msContent);
462 for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
463 // Fill message
464 uint64_t ulData = static_cast<uint64_t>(pInBuff[uIdx]);
465
467 if (0 == uIdx) {
468 ProcessEpochCycle(ulData);
469 continue;
470 } // if( 0 == uIdx )
471
472 gdpbv100::Message mess(ulData);
474 messageType = mess.getMessageType();
475 fhMessType->Fill(messageType);
476 fhGdpbMessType->Fill(messageType, fuCurrSector);
477
478 fuGet4Id = fUnpackPar->ElinkIdxToGet4Idx(mess.getGdpbGenChipId());
480
482 LOG(warning) << "Message with Get4 ID too high: " << fuGet4Id << " VS " << fuNrOfGet4PerGdpb
483 << " set in parameters.";
484
485 switch (messageType) {
486 case gdpbv100::MSG_HIT: {
487 if (mess.getGdpbHitIs24b()) {
489 LOG(fatal) << "This monitor does not support 24b hit messages!!!.";
490 continue;
491 } // if( getGdpbHitIs24b() )
492 else {
494 fhGet4MessType->Fill(fuGet4Nr, 0);
496
499
502 /*
503 if( kFALSE == fbEpochSinceLastHit )
504 {
505 if( fmLastHit != mess )
506 {
507 if( 0 < fuDuplicatesCount )
508 {
509 LOG(warning) << "Detected duplicate hits in sector " << fuCurrSector
510 << ": " << fuDuplicatesCount << " times "
511 << Form( "0x%16lx", fmLastHit.getData() );
512 } // if( 0 < fuDuplicatesCount )
513 fmLastHit = mess;
514 fuDuplicatesCount = 0;
515 }
516 else fuDuplicatesCount++;
517 } // if( kFALSE == fbEpochSinceLastHit )
518 else
519 {
520 fmLastHit = mess;
521 fbEpochSinceLastHit = kFALSE;
522 } // else of if( kFALSE == fbEpochSinceLastHit )
523*/
524 fvmEpSupprBuffer.push_back(mess);
525 } // else of if( getGdpbHitIs24b() )
526 break;
527 } // case gdpbv100::MSG_HIT:
528 case gdpbv100::MSG_EPOCH: {
530 ProcessEpoch(mess);
531 } // if this epoch message is a merged one valid for all chips
532 else {
534 LOG(fatal) << "This event builder does not support unmerged epoch "
535 "messages!!!.";
536 continue;
537 } // if single chip epoch message
538 break;
539 } // case gdpbv100::MSG_EPOCH:
540 case gdpbv100::MSG_SLOWC: {
541 ProcessSlowCtrl(mess);
542 break;
543 } // case gdpbv100::MSG_SLOWC:
544 case gdpbv100::MSG_SYST: {
545 ProcessSysMess(mess);
546 break;
547 } // case gdpbv100::MSG_SYST:
552 ProcessStarTrig(mess);
553 break;
554 } // case gdpbv100::MSG_STAR_TRI_A-D
555 default:
556 LOG(fatal) << "Message type " << std::hex << std::setw(2) << static_cast<uint16_t>(messageType)
557 << " not included in Get4 data format.";
558 } // switch( mess.getMessageType() )
559 } // for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx ++)
560
563 if (0 < fvmEpSupprBuffer.size()) {
566 } // if( 0 < fvmEpSupprBuffer.size() )
567
569 fvmEpSupprBuffer.clear();
570
573
574 return kTRUE;
575}
576
577// -------------------------------------------------------------------------
579{
580 ULong64_t ulEpochCycleVal = ulCycleData & gdpbv100::kulEpochCycleFieldSz;
581
582 if (!(ulEpochCycleVal == fvulCurrentEpochCycle[fuCurrDpbIdx]
583 || ulEpochCycleVal == fvulCurrentEpochCycle[fuCurrDpbIdx] + 1)
584 && 0 < fulCurrentMsIdx) {
585 LOG(warning) << "CbmStar2019MonitorAlgo::ProcessEpochCycle => "
586 << " Missmatch in epoch cycles detected for Gdpb " << fuCurrDpbIdx
587 << ", probably fake cycles due to epoch index corruption! "
588 << Form(" Current cycle 0x%09llX New cycle 0x%09llX", fvulCurrentEpochCycle[fuCurrDpbIdx],
589 ulEpochCycleVal);
590 } // if epoch cycle did not stay constant or increase by exactly 1, except if first MS of the TS
591 if (ulEpochCycleVal != fvulCurrentEpochCycle[fuCurrDpbIdx]) {
592 LOG(info) << "CbmStar2019EventBuilderEtofAlgo::ProcessEpochCycle => "
593 << " New epoch cycle for Gdpb " << fuCurrDpbIdx
594 << Form(": Current cycle 0x%09llX New cycle 0x%09llX", fvulCurrentEpochCycle[fuCurrDpbIdx],
595 ulEpochCycleVal);
596 } // if( ulEpochCycleVal != fvulCurrentEpochCycle[fuCurrDpbIdx] )
597 fvulCurrentEpochCycle[fuCurrDpbIdx] = ulEpochCycleVal;
598
599 return;
600}
602{
603 ULong64_t ulEpochNr = mess.getGdpbEpEpochNb();
604 Bool_t bSyncFlag = (1 == mess.getGdpbEpSync());
605 Bool_t bDataLoss = (1 == mess.getGdpbEpDataLoss());
606 Bool_t bEpochLoss = (1 == mess.getGdpbEpEpochLoss());
607 Bool_t bMissmMatch = (1 == mess.getGdpbEpMissmatch());
608
609 fvulCurrentEpoch[fuCurrDpbIdx] = ulEpochNr;
612
614 if (bSyncFlag) {
617 } // if( bSyncFlag )
618
619 if (bDataLoss) fhGdpbEpochFlags->Fill(fuCurrSector, 1);
620
621 if (bEpochLoss) fhGdpbEpochFlags->Fill(fuCurrSector, 2);
622
623 if (bMissmMatch) {
626 } // if( bMissmMatch )
627
628 for (uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index++) {
629 fuGet4Id = uGet4Index;
631
632 fhGet4MessType->Fill(fuGet4Nr, 1);
634
635 if (bSyncFlag) fhGet4EpochFlags->Fill(fuGet4Nr, 0);
636 if (bDataLoss) fhGet4EpochFlags->Fill(fuGet4Nr, 1);
637 if (bEpochLoss) fhGet4EpochFlags->Fill(fuGet4Nr, 2);
638 if (bMissmMatch) fhGet4EpochFlags->Fill(fuGet4Nr, 3);
639 } // for( uint32_t uGet4Index = 0; uGet4Index < fuNrOfGet4PerGdpb; uGet4Index ++ )
640
641 if (0 < fuDuplicatesCount)
642 LOG(warning) << "Detected duplicate hits: " << fuDuplicatesCount << " times "
643 << Form("0x%16lx", static_cast<unsigned long>(fmLastHit.getData()));
644 fbEpochSinceLastHit = kTRUE;
646
649}
650// -------------------------------------------------------------------------
652{
653 Int_t iBufferSize = fvmEpSupprBuffer.size();
654
655 if (0 == iBufferSize) return;
656
657 LOG(debug) << "Now processing stored messages for for gDPB " << fuCurrDpbIdx << " with epoch number "
659
662 std::stable_sort(fvmEpSupprBuffer.begin(), fvmEpSupprBuffer.end());
663
665 ULong64_t ulCurEpochGdpbGet4 = fvulCurrentEpochFull[fuCurrDpbIdx];
666
668 if (0 == ulCurEpochGdpbGet4) return;
669
671 ulCurEpochGdpbGet4--;
672
673 Int_t messageType = -111;
674 for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
675 messageType = fvmEpSupprBuffer[iMsgIdx].getMessageType();
676
677 fuGet4Id = fUnpackPar->ElinkIdxToGet4Idx(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);
729 // UInt_t uGbtxNr = (uFeeNr / fUnpackPar->GetNrOfFeePerGbtx());
730 // UInt_t uFeeInGbtx = (uFeeNr % fUnpackPar->GetNrOfFeePerGbtx());
731 // UInt_t uGbtxNrInSys = fuCurrDpbIdx * fUnpackPar->GetNrOfGbtxPerGdpb() + uGbtxNr;
732
733 // UInt_t uChanInSyst = fuCurrDpbIdx * fuNrOfChannelsPerGdpb + uChannelNr;
734 // UInt_t uRemappedChannelNrInSys = fuCurrDpbIdx * fuNrOfChannelsPerGdpb
735 // + uFeeNr * fuNrOfChannelsPerFee
736 // + fUnpackPar->Get4ChanToPadiChan( uChannelNrInFee );
737
738 // ULong_t ulHitTime = mess.getMsgFullTime( mess.getExtendedEpoch() );
739 Double_t dHitTime = mess.GetFullTimeNs();
740 // Double_t dHitTot = uTot; // in bins
741
743 if (kTRUE == fbDebugMonitorMode) {
744 fvhRawFt_gDPB[fuCurrDpbIdx]->Fill(uChannelNr, uFts);
745 fvhRawCt_gDPB[fuCurrDpbIdx]->Fill(uChannelNr, uCts);
746 } // if( kTRUE == fbDebugMonitorMode )
747
749 if (4096 <= uCts) {
750 LOG(debug) << "CbmStar2019MonitorAlgo::ProcessHit => Coarse time above "
751 "4096 detected."
752 << Form(" sector %02u GET4 %03u Channel %u, TS %8llu MS %3u (MS "
753 "time %12llu)",
754 fuCurrDpbIdx + fUnpackPar->GetGdpbToSectorOffset(), fuGet4Id, uChannel, fulCurrentTsIdx,
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 // fvhFeeRate_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill( 1e-9 * (dHitTime - fdStartTime));
767 // fvhFeeErrorRatio_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill( 1e-9 * (dHitTime - fdStartTime), 0, 1);
768 } // if (0 <= fdStartTime)
769 /*
770 if (0 <= fdStartTimeLong)
771 {
772 fvhFeeRateLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
773 1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 1 / 60.0 );
774 fvhFeeErrorRatioLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
775 1e-9 / 60.0 * (dHitTime - fdStartTimeLong), 0, 1 / 60.0 );
776 } // if (0 <= fdStartTimeLong)
777*/
778}
779// -------------------------------------------------------------------------
781{
782 UInt_t uSubType = mess.getGdpbSysSubType();
783 fhSysMessType->Fill(uSubType);
784 fhGdpbSysMessType->Fill(uSubType, fuCurrSector);
785
786 switch (mess.getGdpbSysSubType()) {
789 fhGet4MessType->Fill(fuGet4Nr, 3);
791
793 fvmEpSupprBuffer.push_back(mess);
794 // ProcessError( mess );
795 break;
796 } // case gdpbv100::SYSMSG_GET4_EVENT
798 LOG(debug) << "Unknown GET4 message, data: " << std::hex << std::setw(8) << mess.getGdpbSysUnkwData() << std::dec
799 << " Full message: " << std::hex << std::setw(16) << mess.getData() << std::dec;
800 break;
801 } // case gdpbv100::SYS_GDPB_UNKWN:
803 if (mess.getGdpbSysFwErrResync())
804 LOG(info) << Form("GET4 Resynchronization: Get4:0x%04x ", mess.getGdpbGenChipId()) << fuCurrDpbIdx;
805 else
806 LOG(info) << "GET4 synchronization pulse missing in gDPB " << fuCurrDpbIdx;
807 break;
808 } // case gdpbv100::SYS_GET4_SYNC_MISS:
810 ProcessPattern(mess);
811 break;
812 } // case gdpbv100::SYS_PATTERN:
813 default: {
814 LOG(info) << "Crazy system message, subtype " << mess.getGdpbSysSubType();
815 break;
816 } // default
817 } // switch( mess.getGdpbSysSubType() )
818}
819// -------------------------------------------------------------------------
821{
822 uint32_t uErrorType = mess.getGdpbSysErrData();
823
824 fhGet4MessType->Fill(fuGet4Nr, 3);
826
827 // UInt_t uFeeNr = (fuGet4Id / fuNrOfGet4PerFee);
828
832
836
837 if (gdpbv100::GET4_V2X_ERR_LOST_EVT == uErrorType) {
840 } // if( gdpbv100::GET4_V2X_ERR_LOST_EVT == mess.getGdpbSysErrData() )
841 /*
843 if (0 <= fdStartTime)
844 {
845 fvhFeeErrorRate_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
846 1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime));
847 fvhFeeErrorRatio_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
848 1e-9 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTime), 1, 1 );
849 } // if (0 <= fdStartTime)
850 if (0 <= fdStartTimeLong)
851 {
852 fvhFeeErrorRateLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
853 1e-9 / 60.0 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTimeLong), 1 / 60.0);
854 fvhFeeErrorRatioLong_gDPB[(fuCurrDpbIdx * fuNrOfFeePerGdpb) + uFeeNr]->Fill(
855 1e-9 / 60.0 * (mess.getMsgFullTimeD(fvulCurrentEpoch[fuGet4Nr]) - fdStartTimeLong), 1, 1 / 60.0);
856 } // if (0 <= fdStartTime)
857*/
860
861 switch (uErrorType) {
863 fhGet4ChanErrors->Fill(dFullChId, 0);
864 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 0);
865 break;
866 } // case gdpbv100::GET4_V2X_ERR_READ_INIT:
868 fhGet4ChanErrors->Fill(dFullChId, 1);
869 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 1);
870 break;
871 } // case gdpbv100::GET4_V2X_ERR_SYNC:
873 fhGet4ChanErrors->Fill(dFullChId, 2);
874 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 2);
875 break;
876 } // case gdpbv100::GET4_V2X_ERR_EP_CNT_SYNC:
878 fhGet4ChanErrors->Fill(dFullChId, 3);
879 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 3);
880 break;
881 } // case gdpbv100::GET4_V2X_ERR_EP:
883 fhGet4ChanErrors->Fill(dFullChId, 4);
884 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 4);
885 break;
886 } // case gdpbv100::GET4_V2X_ERR_FIFO_WRITE:
888 fhGet4ChanErrors->Fill(dFullChId, 5);
889 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 5);
890 break;
891 } // case gdpbv100::GET4_V2X_ERR_LOST_EVT:
893 fhGet4ChanErrors->Fill(dFullChId, 6);
894 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 6);
895 break;
896 } // case gdpbv100::GET4_V2X_ERR_CHAN_STATE:
898 fhGet4ChanErrors->Fill(dFullChId, 7);
899 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 7);
900 break;
901 } // case gdpbv100::GET4_V2X_ERR_TOK_RING_ST:
903 fhGet4ChanErrors->Fill(dFullChId, 8);
904 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 8);
905 break;
906 } // case gdpbv100::GET4_V2X_ERR_TOKEN:
908 fhGet4ChanErrors->Fill(dFullChId, 9);
909 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 9);
910 break;
911 } // case gdpbv100::GET4_V2X_ERR_READOUT_ERR:
913 fhGet4ChanErrors->Fill(dFullChId, 10);
914 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 10);
915 break;
916 } // case gdpbv100::GET4_V2X_ERR_SPI:
918 fhGet4ChanErrors->Fill(dFullChId, 11);
919 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 11);
920 break;
921 } // case gdpbv100::GET4_V2X_ERR_DLL_LOCK:
923 fhGet4ChanErrors->Fill(dFullChId, 12);
924 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 12);
925 break;
926 } // case gdpbv100::GET4_V2X_ERR_DLL_RESET:
928 fhGet4ChanErrors->Fill(dFullChId, 13);
929 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 13);
930 break;
931 } // case gdpbv100::GET4_V2X_ERR_TOT_OVERWRT:
933 fhGet4ChanErrors->Fill(dFullChId, 14);
934 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 14);
935 break;
936 } // case gdpbv100::GET4_V2X_ERR_TOT_RANGE:
938 fhGet4ChanErrors->Fill(dFullChId, 15);
939 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 15);
940 break;
941 } // case gdpbv100::GET4_V2X_ERR_EVT_DISCARD:
943 fhGet4ChanErrors->Fill(dFullChId, 16);
944 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 16);
945 break;
946 } // case gdpbv100::GET4_V2X_ERR_ADD_RIS_EDG:
948 fhGet4ChanErrors->Fill(dFullChId, 17);
949 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 17);
950 break;
951 } // case gdpbv100::GET4_V2X_ERR_UNPAIR_FALL:
953 fhGet4ChanErrors->Fill(dFullChId, 18);
954 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 18);
955 break;
956 } // case gdpbv100::GET4_V2X_ERR_SEQUENCE_ER:
958 fhGet4ChanErrors->Fill(dFullChId, 19);
959 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 19);
960 break;
961 } // case gdpbv100::GET4_V2X_ERR_EPOCH_OVERF:
963 fhGet4ChanErrors->Fill(dFullChId, 20);
964 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 20);
965 break;
966 } // case gdpbv100::GET4_V2X_ERR_UNKNOWN:
967 default: // Corrupt error or not yet supported error
968 {
969 fhGet4ChanErrors->Fill(dFullChId, 21);
970 fvhGdpbGet4ChanErrors[fuCurrDpbIdx]->Fill(dGdpbChId, 21);
971 break;
972 } //
973 } // Switch( mess.getGdpbSysErrData() )
974
975 switch (uErrorType) {
988 if (kFALSE == fbIgnoreCriticalErrors)
989 LOG(info) << " +++++++ > gDPB: " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec
990 << ", Chip = " << std::setw(2) << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
991 << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1) << mess.getGdpbSysErrEdge()
992 << ", Empt = " << std::setw(1) << mess.getGdpbSysErrUnused() << ", Data = " << std::hex
993 << std::setw(2) << uErrorType << std::dec << " -- GET4 V1 Error Event";
994 break;
995 } // critical errors
998 break;
1007 LOG(debug) << " +++++++ >gDPB: " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec
1008 << ", Chip = " << std::setw(2) << mess.getGdpbGenChipId() << ", Chan = " << std::setw(1)
1009 << mess.getGdpbSysErrChanId() << ", Edge = " << std::setw(1) << mess.getGdpbSysErrEdge()
1010 << ", Empt = " << std::setw(1) << mess.getGdpbSysErrUnused() << ", Data = " << std::hex << std::setw(2)
1011 << uErrorType << std::dec << " -- GET4 V1 Error Event ";
1012 break;
1013 } // Input channel related errors (TOT, shaky signals, etc...)
1017 break;
1018 default:
1020 break;
1021 } // switch( uErrorType )
1022
1023 return;
1024}
1025// -------------------------------------------------------------------------
1027{
1028 uint16_t usType = mess.getGdpbSysPattType();
1029 uint16_t usIndex = mess.getGdpbSysPattIndex();
1030 uint32_t uPattern = mess.getGdpbSysPattPattern();
1031 UInt_t uNbBits = (7 == usIndex ? 16 : 32);
1032 fhGdpbSysMessPattType->Fill(usType, fuCurrSector);
1033
1034
1035 switch (usType) {
1037
1038 if (kTRUE == fbDebugMonitorMode && 0 == usIndex) {
1040
1041 LOG(debug) << Form("Missmatch pattern message => Type %d, Index %2d, "
1042 "Pattern 0x%08X TS %12llu MS %3u Epoch %12llu",
1043 usType, usIndex, uPattern, fulCurrentTsIdx, fuMsIndex, fvulCurrentEpoch[fuCurrDpbIdx]);
1044 } // if( 0 == usIndex )
1045
1046 LOG(debug) << Form("Missmatch pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1047 if (kTRUE == fbDebugMonitorMode)
1048 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1049 UInt_t uBadAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1050
1051 if ((uPattern >> uBit) & 0x1) {
1052 fhPatternMissmatch->Fill(uBadAsic, fuCurrSector);
1054 fvvbGdpbLastMissmatchPattern[fuCurrDpbIdx][uBadAsic] = kTRUE;
1055 } // if( ( uPattern >> uBit ) & 0x1 )
1056 else
1057 fvvbGdpbLastMissmatchPattern[fuCurrDpbIdx][uBadAsic] = kFALSE;
1058
1059 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1060 break;
1061 } // case gdpbv100::PATT_MISSMATCH:
1062 case gdpbv100::PATT_ENABLE: {
1063 LOG(debug) << Form("ENABLE pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1064
1065 if (kTRUE == fbDebugMonitorMode)
1066 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1067 UInt_t uAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1068
1069 if ((uPattern >> uBit) & 0x1) {
1070 fhPatternEnable->Fill(uAsic, fuCurrSector);
1072 fvvbGdpbLastEnablePattern[fuCurrDpbIdx][uAsic] = kFALSE;
1073 } // if( ( uPattern >> uBit ) & 0x1 )
1074 else
1076
1077 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1078 break;
1079 } // case gdpbv100::PATT_ENABLE:
1080 case gdpbv100::PATT_RESYNC: {
1081 LOG(debug) << Form("RESYNC pattern message => Type %d, Index %2d, Pattern 0x%08X", usType, usIndex, uPattern);
1082
1083 if (kTRUE == fbDebugMonitorMode)
1084 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1085 UInt_t uBadAsic = fUnpackPar->ElinkIdxToGet4Idx(32 * usIndex + uBit);
1086
1087 if ((uPattern >> uBit) & 0x1) {
1088 fhPatternResync->Fill(uBadAsic, fuCurrSector);
1090 fvvbGdpbLastResyncPattern[fuCurrDpbIdx][uBadAsic] = kTRUE;
1091 } // if( ( uPattern >> uBit ) & 0x1 )
1092 else
1093 fvvbGdpbLastResyncPattern[fuCurrDpbIdx][uBadAsic] = kFALSE;
1094
1095 } // for( UInt_t uBit = 0; uBit < uNbBits; ++uBit )
1096 break;
1097 } // case gdpbv100::PATT_RESYNC:
1098 default: {
1099 LOG(debug) << "Crazy pattern message, subtype " << usType;
1100 break;
1101 } // default
1102 } // switch( usType )
1103
1104 return;
1105}
1106// -------------------------------------------------------------------------
1108{
1109 UInt_t uChan = mess.getGdpbSlcChan();
1110 UInt_t uEdge = mess.getGdpbSlcEdge();
1111 UInt_t uData = mess.getGdpbSlcData();
1112 UInt_t uType = mess.getGdpbSlcType();
1113
1114 Double_t dGdpbChId = fuGet4Id * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1115 Double_t dFullChId = fuGet4Nr * fuNrOfChannelsPerGet4 + mess.getGdpbSlcChan() + 0.5 * mess.getGdpbSlcEdge();
1116 Double_t dMessTime = fulCurrentMsIdx * 1e-9;
1117
1118
1119 switch (uType) {
1121 fhGet4ChanScm->Fill(dFullChId, uType);
1122 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1123 break;
1124 } // case gdpbv100::GET4_32B_SLC_SCALER:
1126 fhGet4ChanScm->Fill(dFullChId, uType);
1127 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1128 break;
1129 } // case gdpbv100::GET4_32B_SLC_DEADT:
1131 fhGet4ChanScm->Fill(dFullChId, uType);
1132 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1133
1136 LOG(info) << "GET4 Slow Control SPI message, time " << Form("%3.3f", dMessTime) << " s "
1137 << " for board ID " << std::hex << std::setw(4) << fuCurrDpbIdx << std::dec << "\n"
1138 << " +++++++ > Chip = " << std::setw(3) << fuGet4Id << ", Chan = " << std::setw(1) << uChan
1139 << ", Edge = " << std::setw(1) << uEdge << ", Type = " << std::setw(1) << mess.getGdpbSlcType() << ", "
1140 << Form("channel %1u,", (uData >> 10) & 0xF) << Form("value 0x%03x ", uData & 0x3FF)
1141 << Form("level %4.1f ", fUnpackPar->GetPadiThresholdVal(uData & 0x3FF))
1142 << Form("(Data = 0x%06x) ", uData);
1143 break;
1144 } // if( gdpbv100::GET4_32B_SLC_SPIREAD == uType )
1146 if (0 == mess.getGdpbSlcChan() && 0 == mess.getGdpbSlcEdge()) // START message
1147 {
1148 fhGet4ChanScm->Fill(dFullChId, uType + 1);
1149 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType + 1);
1150 } // if( 0 == mess.getGdpbSlcChan() && 0 == mess.getGdpbSlcEdge() )
1151 else if (0 == mess.getGdpbSlcChan() && 1 == mess.getGdpbSlcEdge()) // SEU counter message
1152 {
1153 fhGet4ChanScm->Fill(dFullChId, uType);
1154 fvhGdpbGet4ChanScm[fuCurrDpbIdx]->Fill(dGdpbChId, uType);
1155 } // else if( 0 == mess.getGdpbSlcChan() && 1 == mess.getGdpbSlcEdge() )
1156 break;
1157 } // case gdpbv100::GET4_32B_SLC_START_SEU:
1158 default: break;
1159 } // switch( uType )
1160
1162 fhGet4MessType->Fill(fuGet4Nr, 2);
1164}
1165// -------------------------------------------------------------------------
1167{
1168 Int_t iMsgIndex = mess.getStarTrigMsgIndex();
1169
1170 switch (iMsgIndex) {
1171 case 0:
1172 fvhTokenMsgType[fuCurrDpbIdx]->Fill(0);
1174 break;
1175 case 1:
1176 fvhTokenMsgType[fuCurrDpbIdx]->Fill(1);
1179 break;
1180 case 2:
1181 fvhTokenMsgType[fuCurrDpbIdx]->Fill(2);
1183 break;
1184 case 3: {
1185 fvhTokenMsgType[fuCurrDpbIdx]->Fill(3);
1186
1187 ULong64_t ulNewGdpbTsFull = (fvulGdpbTsMsb[fuCurrDpbIdx] << 24) + (fvulGdpbTsLsb[fuCurrDpbIdx]);
1188 ULong64_t ulNewStarTsFull =
1190 UInt_t uNewToken = mess.getStarTokenStarD();
1191 UInt_t uNewDaqCmd = mess.getStarDaqCmdStarD();
1192 UInt_t uNewTrigCmd = mess.getStarTrigCmdStarD();
1193
1194 if ((uNewToken == fvuStarTokenLast[fuCurrDpbIdx]) && (ulNewGdpbTsFull == fvulGdpbTsFullLast[fuCurrDpbIdx])
1195 && (ulNewStarTsFull == fvulStarTsFullLast[fuCurrDpbIdx]) && (uNewDaqCmd == fvuStarDaqCmdLast[fuCurrDpbIdx])
1196 && (uNewTrigCmd == fvuStarTrigCmdLast[fuCurrDpbIdx])) {
1197 UInt_t uTrigWord = ((fvuStarTrigCmdLast[fuCurrDpbIdx] & 0x00F) << 16)
1198 + ((fvuStarDaqCmdLast[fuCurrDpbIdx] & 0x00F) << 12)
1199 + ((fvuStarTokenLast[fuCurrDpbIdx] & 0xFFF));
1200 LOG(warning) << "Possible error: identical STAR tokens found twice in "
1201 "a row => ignore 2nd! "
1202 << " TS " << fulCurrentTsIdx << " gDBB #" << fuCurrDpbIdx << " "
1203 << Form("token = %5u ", fvuStarTokenLast[fuCurrDpbIdx])
1204 << Form("gDPB ts = %12llu ", fvulGdpbTsFullLast[fuCurrDpbIdx])
1205 << Form("STAR ts = %12llu ", fvulStarTsFullLast[fuCurrDpbIdx])
1206 << Form("DAQ cmd = %2u ", fvuStarDaqCmdLast[fuCurrDpbIdx])
1207 << Form("TRG cmd = %2u ", fvuStarTrigCmdLast[fuCurrDpbIdx]) << Form("TRG Wrd = %5x ", uTrigWord);
1208 return;
1209 } // if exactly same message repeated
1210
1211 // STAR TS counter reset detection
1212 if (ulNewStarTsFull < fvulStarTsFullLast[fuCurrDpbIdx])
1213 LOG(info) << "Probable reset of the STAR TS: old = " << Form("%16llu", fvulStarTsFullLast[fuCurrDpbIdx])
1214 << " new = " << Form("%16llu", ulNewStarTsFull) << " Diff = -"
1215 << Form("%8llu", fvulStarTsFullLast[fuCurrDpbIdx] - ulNewStarTsFull);
1216
1217 // ULong64_t ulGdpbTsDiff = ulNewGdpbTsFull - fvulGdpbTsFullLast[ fuCurrDpbIdx ];
1218 fvulGdpbTsFullLast[fuCurrDpbIdx] = ulNewGdpbTsFull;
1219 fvulStarTsFullLast[fuCurrDpbIdx] = ulNewStarTsFull;
1220 fvuStarTokenLast[fuCurrDpbIdx] = uNewToken;
1221 fvuStarDaqCmdLast[fuCurrDpbIdx] = uNewDaqCmd;
1222 fvuStarTrigCmdLast[fuCurrDpbIdx] = uNewTrigCmd;
1223
1225 if (fuMsIndex < fuNbCoreMsPerTs) {
1227 if (0 <= fdStartTime) {
1232 } // if( 0 < fdStartTime )
1234 } // if( fuMsIndex < fuNbCoreMsPerTs )
1235
1236 break;
1237 } // case 3
1238 default: LOG(error) << "Unknown Star Trigger messageindex: " << iMsgIndex;
1239 } // switch( iMsgIndex )
1240}
1241// -------------------------------------------------------------------------
1242
1244{
1245 std::string sFolder = "eTofMoni";
1246
1247 LOG(info) << "create Histos for eTOF monitoring ";
1248
1250 // Number of log bins =
1251 // 9 for the sub-unit decade
1252 // + 9 for each unit of each decade * 10 for the subdecade range
1253 // + 1 for the closing bin top edge
1254 const Int_t iNbDecadesLog = 4;
1255 const Int_t iNbStepsDecade = 9;
1256 const Int_t iNbSubStepsInStep = 1;
1257 const Int_t iNbBinsLog = iNbStepsDecade + iNbStepsDecade * iNbSubStepsInStep * iNbDecadesLog + 1;
1258 Double_t dBinsLog[iNbBinsLog];
1259 // First fill sub-unit decade
1260 for (Int_t iSubU = 0; iSubU < iNbStepsDecade; iSubU++)
1261 dBinsLog[iSubU] = 0.1 * (1 + iSubU);
1262 std::cout << std::endl;
1263 // Then fill the main decades
1264 Double_t dSubstepSize = 1.0 / iNbSubStepsInStep;
1265 for (Int_t iDecade = 0; iDecade < iNbDecadesLog; iDecade++) {
1266 Double_t dBase = std::pow(10, iDecade);
1267 Int_t iDecadeIdx = iNbStepsDecade + iDecade * iNbStepsDecade * iNbSubStepsInStep;
1268 for (Int_t iStep = 0; iStep < iNbStepsDecade; iStep++) {
1269 Int_t iStepIdx = iDecadeIdx + iStep * iNbSubStepsInStep;
1270 for (Int_t iSubStep = 0; iSubStep < iNbSubStepsInStep; iSubStep++) {
1271 dBinsLog[iStepIdx + iSubStep] = dBase * (1 + iStep) + dBase * dSubstepSize * iSubStep;
1272 } // for( Int_t iSubStep = 0; iSubStep < iNbSubStepsInStep; iSubStep++ )
1273 } // for( Int_t iStep = 0; iStep < iNbStepsDecade; iStep++ )
1274 } // for( Int_t iDecade = 0; iDecade < iNbDecadesLog; iDecade ++)
1275 dBinsLog[iNbBinsLog - 1] = std::pow(10, iNbDecadesLog);
1276
1277 /*******************************************************************/
1278 fhMessType = new TH1I("hMessageType", "Nb of message for each type; Type", 1 + gdpbv100::MSG_STAR_TRI_D, 0.,
1280 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_HIT, "HIT");
1281 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_EPOCH, "EPOCH");
1282 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SLOWC, "SLOWC");
1283 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SYST, "SYST");
1284 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_A, "TRI_A");
1285 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_B, "TRI_B");
1286 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_C, "TRI_C");
1287 fhMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_D, "TRI_D");
1288
1289 fhSysMessType = new TH1I("hSysMessType", "Nb of system message for each type; System Type", 1 + gdpbv100::SYS_PATTERN,
1290 0., 1 + gdpbv100::SYS_PATTERN);
1291 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_ERROR, "GET4 ERROR");
1292 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GDPB_UNKWN, "UNKW GET4 MSG");
1293 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_SYNC_MISS, "SYS_GET4_SYNC_MISS");
1294 fhSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_PATTERN, "SYS_PATTERN");
1295
1296 fhGet4MessType = new TH2I("hGet4MessType", "Nb of message for each type per GET4; GET4 chip # ; Type", fuNrOfGet4, 0.,
1297 fuNrOfGet4, 4, 0., 4.);
1298 fhGet4MessType->GetYaxis()->SetBinLabel(1, "DATA 32b");
1299 fhGet4MessType->GetYaxis()->SetBinLabel(2, "EPOCH");
1300 fhGet4MessType->GetYaxis()->SetBinLabel(3, "S.C. M");
1301 fhGet4MessType->GetYaxis()->SetBinLabel(4, "ERROR");
1302 // fhGet4MessType->GetYaxis()->SetBinLabel( 5, "DATA 24b");
1303 // fhGet4MessType->GetYaxis()->SetBinLabel( 6, "STAR Trigger");
1304
1305 fhGet4ChanScm = new TH2I("hGet4ChanScm", "SC messages per GET4 channel; GET4 channel # ; SC type",
1307 fhGet4ChanScm->GetYaxis()->SetBinLabel(1, "Hit Scal");
1308 fhGet4ChanScm->GetYaxis()->SetBinLabel(2, "Deadtime");
1309 fhGet4ChanScm->GetYaxis()->SetBinLabel(3, "SPI");
1310 fhGet4ChanScm->GetYaxis()->SetBinLabel(4, "SEU Scal");
1311 fhGet4ChanScm->GetYaxis()->SetBinLabel(5, "START");
1312
1313 fhGet4ChanErrors = new TH2I("hGet4ChanErrors", "Error messages per GET4 channel; GET4 channel # ; Error",
1315 fhGet4ChanErrors->GetYaxis()->SetBinLabel(1, "0x00: Readout Init ");
1316 fhGet4ChanErrors->GetYaxis()->SetBinLabel(2, "0x01: Sync ");
1317 fhGet4ChanErrors->GetYaxis()->SetBinLabel(3, "0x02: Epoch count sync");
1318 fhGet4ChanErrors->GetYaxis()->SetBinLabel(4, "0x03: Epoch ");
1319 fhGet4ChanErrors->GetYaxis()->SetBinLabel(5, "0x04: FIFO Write ");
1320 fhGet4ChanErrors->GetYaxis()->SetBinLabel(6, "0x05: Lost event ");
1321 fhGet4ChanErrors->GetYaxis()->SetBinLabel(7, "0x06: Channel state ");
1322 fhGet4ChanErrors->GetYaxis()->SetBinLabel(8, "0x07: Token Ring state");
1323 fhGet4ChanErrors->GetYaxis()->SetBinLabel(9, "0x08: Token ");
1324 fhGet4ChanErrors->GetYaxis()->SetBinLabel(10, "0x09: Error Readout ");
1325 fhGet4ChanErrors->GetYaxis()->SetBinLabel(11, "0x0a: SPI ");
1326 fhGet4ChanErrors->GetYaxis()->SetBinLabel(12, "0x0b: DLL Lock error "); // <- From GET4 v1.2
1327 fhGet4ChanErrors->GetYaxis()->SetBinLabel(13, "0x0c: DLL Reset invoc."); // <- From GET4 v1.2
1328 fhGet4ChanErrors->GetYaxis()->SetBinLabel(14, "0x11: Overwrite ");
1329 fhGet4ChanErrors->GetYaxis()->SetBinLabel(15, "0x12: ToT out of range");
1330 fhGet4ChanErrors->GetYaxis()->SetBinLabel(16, "0x13: Event Discarded ");
1331 fhGet4ChanErrors->GetYaxis()->SetBinLabel(17, "0x14: Add. Rising edge"); // <- From GET4 v1.3
1332 fhGet4ChanErrors->GetYaxis()->SetBinLabel(18, "0x15: Unpaired Falling"); // <- From GET4 v1.3
1333 fhGet4ChanErrors->GetYaxis()->SetBinLabel(19, "0x16: Sequence error "); // <- From GET4 v1.3
1334 fhGet4ChanErrors->GetYaxis()->SetBinLabel(20, "0x7f: Unknown ");
1335 fhGet4ChanErrors->GetYaxis()->SetBinLabel(21, "Corrupt/unsuprtd error");
1336
1338 new TH2I("hGet4EpochFlags", "Epoch flags per GET4; GET4 chip # ; Type", fuNrOfGet4, 0., fuNrOfGet4, 4, 0., 4.);
1339 fhGet4EpochFlags->GetYaxis()->SetBinLabel(1, "SYNC");
1340 fhGet4EpochFlags->GetYaxis()->SetBinLabel(2, "Ep LOSS");
1341 fhGet4EpochFlags->GetYaxis()->SetBinLabel(3, "Da LOSS");
1342 fhGet4EpochFlags->GetYaxis()->SetBinLabel(4, "MISSMAT");
1343
1344 Double_t dSectorMin = -0.5 + fUnpackPar->GetGdpbToSectorOffset();
1345 Double_t dSectorMax = fuNrOfGdpbs + dSectorMin;
1347 new TH2I("hGdpbAsicSpiCounts", "SPI messages count per Sector and ASIC; ASIC Idx []; Sector []; SPI msg[]",
1348 fuNrOfGet4PerGdpb, -0.5, fuNrOfGet4PerGdpb - 0.5, fuNrOfGdpbs, dSectorMin, dSectorMax);
1349
1351 new TH2I("hGdpbMessageType", "Nb of message for each type per Sector; Type; Sector []",
1352 1 + gdpbv100::MSG_STAR_TRI_D, 0., 1 + gdpbv100::MSG_STAR_TRI_D, fuNrOfGdpbs, dSectorMin, dSectorMax);
1353 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_HIT, "HIT");
1354 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_EPOCH, "EPOCH");
1355 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SLOWC, "SLOWC");
1356 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_SYST, "SYST");
1357 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_A, "TRI_A");
1358 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_B, "TRI_B");
1359 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_C, "TRI_C");
1360 fhGdpbMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::MSG_STAR_TRI_D, "TRI_D");
1361
1363 new TH2I("hGdpbSysMessType", "Nb of system message for each type per Sector; System Type; Sector []",
1364 1 + gdpbv100::SYS_PATTERN, 0., 1 + gdpbv100::SYS_PATTERN, fuNrOfGdpbs, dSectorMin, dSectorMax);
1365 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_ERROR, "GET4 ERROR");
1366 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GDPB_UNKWN, "UNKW GET4 MSG");
1367 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_GET4_SYNC_MISS, "SYS_GET4_SYNC_MISS");
1368 fhGdpbSysMessType->GetXaxis()->SetBinLabel(1 + gdpbv100::SYS_PATTERN, "SYS_PATTERN");
1369
1371 new TH2I("hGdpbSysMessPattType", "Nb of pattern message for each type per Sector; Pattern Type; Sector []",
1372 1 + gdpbv100::PATT_RESYNC, 0., 1 + gdpbv100::PATT_RESYNC, fuNrOfGdpbs, dSectorMin, dSectorMax);
1373 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_MISSMATCH, "PATT_MISSMATCH");
1374 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_ENABLE, "PATT_ENABLE");
1375 fhGdpbSysMessPattType->GetXaxis()->SetBinLabel(1 + gdpbv100::PATT_RESYNC, "PATT_RESYNC");
1376
1377 fhGdpbEpochFlags = new TH2I("hGdpbEpochFlags", "Epoch flags per Sector; Sector # ; Type", fuNrOfGdpbs, dSectorMin,
1378 dSectorMax, 4, 0., 4.);
1379 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(1, "SYNC");
1380 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(2, "Ep LOSS");
1381 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(3, "Da LOSS");
1382 fhGdpbEpochFlags->GetYaxis()->SetBinLabel(4, "MISSMAT");
1383
1384 fhGdpbEpochSyncEvo = new TH2D("hGdpbEpochSyncEvo", "Epoch SYNC per second and Sector; Time[s]; Sector #; SYNC Nb",
1385 fuHistoryHistoSize, 0, fuHistoryHistoSize, fuNrOfGdpbs, dSectorMin, dSectorMax);
1386
1388 new TH2D("hGdpbEpochMissEvo", "Epoch Missmatch per second and Sector; Time[s]; Sector #; Missmatch Nb",
1389 fuHistoryHistoSize, 0, fuHistoryHistoSize, fuNrOfGdpbs, dSectorMin, dSectorMax);
1390
1392 new TH1D("hGdpbEndMsBufferNotEmpty", "MS where buffer is not empty at end, per Sector; Sector #; Bad MS",
1393 fuNrOfGdpbs, dSectorMin, dSectorMax);
1394
1395 fhGdpbEndMsDataLost = new TH2D("hGdpbEndMsDataLost",
1396 "Amount of lost data when buffer not empty at end, per MS and "
1397 "Sector; Sector #; Lost Data per bad MS []; Bad MS",
1398 fuNrOfGdpbs, dSectorMin, dSectorMax, iNbBinsLog - 1, dBinsLog);
1399
1400 if (kTRUE == fbDebugMonitorMode) {
1401 fhNbMissPatternPerMs = new TH2I("hNbMissPatternPerMs",
1402 "Nb of missmatch pattern per MS for each sector; Number of "
1403 "pattern messages []; sector []; MS",
1404 1000, -0.5, 999.5, fuNrOfGdpbs, dSectorMin, dSectorMax);
1405
1407 new TH2I("hPatternMissmatch", "Missmatch pattern integral per Sector; ASIC Pattern []; Sector []",
1408 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dSectorMin, dSectorMax);
1409
1410 fhPatternEnable = new TH2I("hPatternEnable", "Enable pattern integral per Sector; ASIC Pattern []; Sector []",
1411 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dSectorMin, dSectorMax);
1412
1413 fhPatternResync = new TH2I("hPatternResync", "Resync pattern integral per Sector; ASIC Pattern []; Sector []",
1414 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, fuNrOfGdpbs, dSectorMin, dSectorMax);
1415 } // if( kTRUE == fbDebugMonitorMode )
1416
1418 AddHistoToVector(fhMessType, sFolder);
1437 if (kTRUE == fbDebugMonitorMode) {
1442 } // if( kTRUE == fbDebugMonitorMode )
1443
1444 /*******************************************************************/
1445 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1446 UInt_t uSectorIndex = uGdpb + fUnpackPar->GetGdpbToSectorOffset();
1447 if (-1 < fiSectorIndex) uSectorIndex += fiSectorIndex;
1448
1449 std::string sFolderSector = Form("sector%02u", uSectorIndex);
1450 std::string sFolderSectorPatt = Form("sector%02u/Pattern", uSectorIndex);
1451 std::string sFolderSectorTrig = Form("sector%02u/Trigger", uSectorIndex);
1452
1453 fvhGdpbGet4MessType.push_back(new TH2I(Form("hGdpbGet4MessType_%02u", uGdpb),
1454 Form("Nb of message for each type per GET4 in Sector %02u; GET4 "
1455 "chip # ; Type",
1456 uSectorIndex),
1457 fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb, 4, 0., 4.));
1458 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(1, "DATA 32b");
1459 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(2, "EPOCH");
1460 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(3, "S.C. M");
1461 fvhGdpbGet4MessType[uGdpb]->GetYaxis()->SetBinLabel(4, "ERROR");
1462
1463 fvhGdpbGet4ChanScm.push_back(
1464 new TH2I(Form("hGdpbGet4ChanScm_%02u", uGdpb),
1465 Form("SC messages per GET4 channel in Sector %02u; GET4 channel # ; SC type", uSectorIndex),
1466 2 * fuNrOfChannelsPerGdpb, 0., fuNrOfChannelsPerGdpb, 5, 0., 5.));
1467 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(1, "Hit Scal");
1468 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(2, "Deadtime");
1469 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(3, "SPI");
1470 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(4, "SEU Scal");
1471 fvhGdpbGet4ChanScm[uGdpb]->GetYaxis()->SetBinLabel(5, "START");
1472
1473 fvhGdpbGet4ChanErrors.push_back(new TH2I(Form("hGdpbGet4ChanErrors_%02u", uGdpb),
1474 Form("Error messages per GET4 channel in Sector %02u; GET4 "
1475 "channel # ; Error",
1476 uSectorIndex),
1477 fuNrOfChannelsPerGdpb, 0., fuNrOfChannelsPerGdpb, 22, 0., 22.));
1478 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(1, "0x00: Readout Init ");
1479 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(2, "0x01: Sync ");
1480 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(3, "0x02: Epoch count sync");
1481 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(4, "0x03: Epoch ");
1482 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(5, "0x04: FIFO Write ");
1483 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(6, "0x05: Lost event ");
1484 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(7, "0x06: Channel state ");
1485 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(8, "0x07: Token Ring state");
1486 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(9, "0x08: Token ");
1487 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(10, "0x09: Error Readout ");
1488 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(11, "0x0a: SPI ");
1489 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(12, "0x0b: DLL Lock error "); // <- From GET4 v1.2
1490 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(13, "0x0c: DLL Reset invoc."); // <- From GET4 v1.2
1491 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(14, "0x11: Overwrite "); // <- From GET4 v1.0 to 1.3
1492 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(15, "0x12: ToT out of range");
1493 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(16, "0x13: Event Discarded ");
1494 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(17, "0x14: Add. Rising edge"); // <- From GET4 v1.3
1495 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(18, "0x15: Unpaired Falling"); // <- From GET4 v1.3
1496 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(19, "0x16: Sequence error "); // <- From GET4 v1.3
1497 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(20, "0x17: Epoch Overflow "); // <- From GET4 v2.0
1498 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(21, "0x7f: Unknown ");
1499 fvhGdpbGet4ChanErrors[uGdpb]->GetYaxis()->SetBinLabel(22, "Corrupt/unsuprtd error");
1500
1502 if (kTRUE == fbDebugMonitorMode) {
1503 fvhRawFt_gDPB.push_back(new TH2I(Form("RawFt_gDPB_%02u", uSectorIndex),
1504 Form("Raw FineTime Sector %02u Plot 0; channel; FineTime [bin]", uSectorIndex),
1506
1507 fvhRawCt_gDPB.push_back(
1508 new TH2I(Form("RawCt_gDPB_%02u", uSectorIndex),
1509 Form("Raw CoarseTime Sector %02u Plot 0; channel; CoarseTime [bin]", uSectorIndex),
1510 fuNrOfChannelsPerGdpb, 0, fuNrOfChannelsPerGdpb, 4096, 0, 4096));
1511 } // if( kTRUE == fbDebugMonitorMode )
1512
1513 fvhRemapTot_gDPB.push_back(new TH2I(Form("RemapTot_gDPB_%02u", uSectorIndex),
1514 Form("Raw TOT Sector %02u remapped; PADI channel; TOT [bin]", uSectorIndex),
1516
1517 fvhRemapChCount_gDPB.push_back(
1518 new TH1I(Form("RemapChCount_gDPB_%02u", uSectorIndex),
1519 Form("Channel counts Sector %02u remapped; PADI channel; Hits", uSectorIndex),
1521
1522 fvhRemapChRate_gDPB.push_back(new TH2D(Form("RemapChRate_gDPB_%02u", uSectorIndex),
1523 Form("PADI channel rate Sector %02u; Time in run [s]; PADI "
1524 "channel; Rate [1/s]",
1525 uSectorIndex),
1529
1531 if (kTRUE == fbDebugMonitorMode) {
1532 fvhGdpbPatternMissmatchEvo.push_back(new TH2I(Form("hGdpbPatternMissmatchEvo_%02u", uSectorIndex),
1533 Form("Missmatch pattern vs TS index in Sector %02u; TS # ; "
1534 "ASIC Pattern []",
1535 uSectorIndex),
1536 10000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1537
1538 fvhGdpbPatternEnableEvo.push_back(
1539 new TH2I(Form("hGdpbPatternEnableEvo_%02u", uSectorIndex),
1540 Form("Enable pattern vs TS index in Sector %02u; TS # ; ASIC Pattern []", uSectorIndex), 10000, 0.,
1541 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1542
1543 fvhGdpbPatternResyncEvo.push_back(
1544 new TH2I(Form("hGdpbPatternResyncEvo%02u", uSectorIndex),
1545 Form("Resync pattern vs TS index in Sector %02u; TS # ; ASIC Pattern []", uSectorIndex), 10000, 0.,
1546 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1547
1548 fvhGdpbMissmatchEvoPerTs.push_back(
1549 new TH2I(Form("hGdpbMissmatchEvoPerTs%02u", uSectorIndex),
1550 Form("Missmatch vs TS index in Sector %02u; TS # ; Asic []; Missmatch? []", uSectorIndex), 10000, 0.,
1551 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1552
1553 fvhGdpbMissmatchEnaEvoPerTs.push_back(new TH2I(Form("hGdpbMissmatchEnaEvoPerTs%02u", uSectorIndex),
1554 Form("Enable+Missmatch vs TS index in Sector %02u; TS # ; "
1555 "Asic []; Enabled & Missmatch? []",
1556 uSectorIndex),
1557 10000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1558
1559 fvhGdpbEnableEvoPerTs.push_back(
1560 new TH2I(Form("hGdpbEnableEvoPerTs%02u", uSectorIndex),
1561 Form("Enable vs TS index in Sector %02u; TS # ; Asic []; Enabled? []", uSectorIndex), 100000, 0.,
1562 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1563
1564 fvhGdpbResyncEvoPerTs.push_back(
1565 new TH2I(Form("hGdpbResyncEvoPerTs%02u", uSectorIndex),
1566 Form("Resync vs TS index in Sector %02u; TS # ; Asic []; Resync? []", uSectorIndex), 10000, 0., 100000,
1568
1569 fvhGdpbResyncEnaEvoPerTs.push_back(new TH2I(Form("hGdpbResyncEnaEvoPerTs%02u", uSectorIndex),
1570 Form("Enable+Resync vs TS index in Sector %02u; TS # ; Asic "
1571 "[]; Enabled & Resync? []",
1572 uSectorIndex),
1573 10000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1574
1575 fvhGdpbStateEvoPerTs.push_back(new TH2I(Form("hGdpbStateEvoPerTs%02u", uSectorIndex),
1576 Form("ASIC State vs TS index in Sector %02u; TS # ; Asic []; 0 = Off, "
1577 "1 = OK, 2 = Miss, 3 = Resync, 4 = Miss + Resync []",
1578 uSectorIndex),
1579 100000, 0., 100000, fuNrOfGet4PerGdpb, 0., fuNrOfGet4PerGdpb));
1580 } // if( kTRUE == fbDebugMonitorMode )
1581
1584 fvhTokenMsgType.push_back(new TH1F(Form("hTokenMsgType_gDPB_%02u", uSectorIndex),
1585 Form("STAR trigger Messages type Sector %02u; Type ; Counts", uSectorIndex), 4,
1586 0, 4));
1587 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(1, "A"); // gDPB TS high
1588 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(2, "B"); // gDPB TS low, STAR TS high
1589 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(3, "C"); // STAR TS mid
1590 fvhTokenMsgType[uGdpb]->GetXaxis()->SetBinLabel(4, "D"); // STAR TS low, token, CMDs
1591
1592 fvhTriggerRate.push_back(
1593 new TH1F(Form("hTriggerRate_gDPB_%02u", uSectorIndex),
1594 Form("STAR trigger signals per second Sector %02u; Time[s] ; Counts", uSectorIndex), fuHistoryHistoSize,
1595 0, fuHistoryHistoSize));
1596
1597 fvhCmdDaqVsTrig.push_back(new TH2I(
1598 Form("hCmdDaqVsTrig_gDPB_%02u", uSectorIndex),
1599 Form("STAR daq command VS STAR trigger command Sector %02u; DAQ ; TRIGGER", uSectorIndex), 16, 0, 16, 16, 0, 16));
1600 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(1, "0x0: no-trig "); // idle link
1601 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1602 2, "0x1: clear "); // clears redundancy counters on the readout boards
1603 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(3, "0x2: mast-rst"); // general reset of the whole front-end logic
1604 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(4, "0x3: spare "); // reserved
1605 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1606 5, "0x4: trigg. 0"); // Default physics readout, all det support required
1607 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(6, "0x5: trigg. 1"); //
1608 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(7, "0x6: trigg. 2"); //
1609 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(8, "0x7: trigg. 3"); //
1610 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(9, "0x8: puls. 0"); //
1611 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(10, "0x9: puls. 1"); //
1612 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(11, "0xA: puls. 2"); //
1613 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(12, "0xB: puls. 3"); //
1614 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(
1615 13,
1616 "0xC: config "); // housekeeping trigger: return geographic info of FE
1617 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(14, "0xD: abort "); // aborts and clears an active event
1618 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(15, "0xE: L1accept"); //
1619 fvhCmdDaqVsTrig[uGdpb]->GetXaxis()->SetBinLabel(16, "0xF: L2accept"); //
1620 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(1, "0x0: 0"); // To be filled at STAR
1621 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(2, "0x1: 1"); // To be filled at STAR
1622 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(3, "0x2: 2"); // To be filled at STAR
1623 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(4, "0x3: 3"); // To be filled at STAR
1624 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(5, "0x4: 4"); // To be filled at STAR
1625 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(6, "0x5: 5"); // To be filled at STAR
1626 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(7, "0x6: 6"); // To be filled at STAR
1627 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(8, "0x7: 7"); // To be filled at STAR
1628 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(9, "0x8: 8"); // To be filled at STAR
1629 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(10, "0x9: 9"); // To be filled at STAR
1630 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(11, "0xA: 10"); // To be filled at STAR
1631 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(12, "0xB: 11"); // To be filled at STAR
1632 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(13, "0xC: 12"); // To be filled at STAR
1633 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(14, "0xD: 13"); // To be filled at STAR
1634 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(15, "0xE: 14"); // To be filled at STAR
1635 fvhCmdDaqVsTrig[uGdpb]->GetYaxis()->SetBinLabel(16, "0xF: 15"); // To be filled at STAR
1636
1637 fvhStarTokenEvo.push_back(new TH2I(Form("hStarTokenEvo_gDPB_%02u", uSectorIndex),
1638 Form("STAR token value VS time Sector %02u; Time in Run [s] ; "
1639 "STAR Token; Counts",
1640 uSectorIndex),
1641 fuHistoryHistoSize, 0, fuHistoryHistoSize, 410, 0, 4100));
1642
1643 fvhStarTrigGdpbTsEvo.push_back(new TProfile(Form("hStarTrigGdpbTsEvo_gDPB_%02u", uSectorIndex),
1644 Form("gDPB TS in STAR triger tokens for Sector %02u; Time "
1645 "in Run [s] ; gDPB TS;",
1646 uSectorIndex),
1648
1649 fvhStarTrigStarTsEvo.push_back(new TProfile(Form("hStarTrigStarTsEvo_gDPB_%02u", uSectorIndex),
1650 Form("STAR TS in STAR triger tokens for Sector %02u; Time "
1651 "in Run [s] ; STAR TS;",
1652 uSectorIndex),
1654
1655
1658 AddHistoToVector(fvhGdpbGet4MessType[uGdpb], sFolderSector);
1659 AddHistoToVector(fvhGdpbGet4ChanScm[uGdpb], sFolderSector);
1660 AddHistoToVector(fvhGdpbGet4ChanErrors[uGdpb], sFolderSector);
1662 if (kTRUE == fbDebugMonitorMode) {
1663 AddHistoToVector(fvhRawFt_gDPB[uGdpb], sFolderSector);
1664 AddHistoToVector(fvhRawCt_gDPB[uGdpb], sFolderSector);
1665 } // if( kTRUE == fbDebugMonitorMode )
1666 AddHistoToVector(fvhRemapTot_gDPB[uGdpb], sFolderSector);
1667 AddHistoToVector(fvhRemapChCount_gDPB[uGdpb], sFolderSector);
1668 AddHistoToVector(fvhRemapChRate_gDPB[uGdpb], sFolderSector);
1669 if (kTRUE == fbDebugMonitorMode) {
1671 AddHistoToVector(fvhGdpbPatternMissmatchEvo[uGdpb], sFolderSectorPatt);
1672 AddHistoToVector(fvhGdpbPatternEnableEvo[uGdpb], sFolderSectorPatt);
1673 AddHistoToVector(fvhGdpbPatternResyncEvo[uGdpb], sFolderSectorPatt);
1675 AddHistoToVector(fvhGdpbMissmatchEvoPerTs[uGdpb], sFolderSectorPatt);
1676 AddHistoToVector(fvhGdpbMissmatchEnaEvoPerTs[uGdpb], sFolderSectorPatt);
1677 AddHistoToVector(fvhGdpbEnableEvoPerTs[uGdpb], sFolderSectorPatt);
1678 AddHistoToVector(fvhGdpbResyncEvoPerTs[uGdpb], sFolderSectorPatt);
1679 AddHistoToVector(fvhGdpbResyncEnaEvoPerTs[uGdpb], sFolderSectorPatt);
1680 AddHistoToVector(fvhGdpbStateEvoPerTs[uGdpb], sFolderSectorPatt);
1681 } // if( kTRUE == fbDebugMonitorMode )
1683 AddHistoToVector(fvhTokenMsgType[uGdpb], sFolderSectorTrig);
1684 AddHistoToVector(fvhTriggerRate[uGdpb], sFolderSectorTrig);
1685 AddHistoToVector(fvhCmdDaqVsTrig[uGdpb], sFolderSectorTrig);
1686 AddHistoToVector(fvhStarTokenEvo[uGdpb], sFolderSectorTrig);
1687 AddHistoToVector(fvhStarTrigGdpbTsEvo[uGdpb], sFolderSectorTrig);
1688 AddHistoToVector(fvhStarTrigStarTsEvo[uGdpb], sFolderSectorTrig);
1689 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1690
1691 /*******************************************************************/
1692 fhMsgCntEvo = new TH1I("hMsgCntEvo",
1693 "Evolution of Hit & error msgs counts vs time in run; "
1694 "Time in run [s]; Msgs Count []",
1696 fhHitCntEvo = new TH1I("hHitCntEvo", "Evolution of Hit counts vs time in run; Time in run [s]; Hits Count []",
1698 fhErrorCntEvo = new TH1I("hErrorCntEvo", "Evolution of Error counts vs time in run; Time in run [s]; Error Count []",
1700 fhLostEvtCntEvo = new TH1I("hLostEvtCntEvo",
1701 "Evolution of LostEvent counts vs time in run; "
1702 "Time in run [s]; LostEvent Count []",
1704
1705 fhErrorFractEvo = new TProfile("hErrorFractEvo",
1706 "Evolution of Error Fraction vs time in run; "
1707 "Time in run [s]; Error Fract []",
1709 fhLostEvtFractEvo = new TProfile("hLostEvtFractEvo",
1710 "Evolution of LostEvent Fraction vs time in "
1711 "run; Time in run [s]; LostEvent Fract []",
1713
1714 fhMsgCntPerMsEvo = new TH2I("hMsgCntPerMsEvo",
1715 "Evolution of Hit & error msgs counts, per MS vs time in run; "
1716 "Time in run [s]; Hits Count/MS []; MS",
1717 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog - 1, dBinsLog);
1718 fhHitCntPerMsEvo = new TH2I("hHitCntPerMsEvo",
1719 "Evolution of Hit counts, per MS vs time in run; "
1720 "Time in run [s]; Hits Count/MS []; MS",
1721 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog - 1, dBinsLog);
1722 fhErrorCntPerMsEvo = new TH2I("hErrorCntPerMsEvo",
1723 "Evolution of Error counts, per MS vs time in "
1724 "run; Time in run [s]; Error Count/MS []; MS",
1725 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog - 1, dBinsLog);
1726 fhLostEvtCntPerMsEvo = new TH2I("hLostEvtCntPerMsEvo",
1727 "Evolution of LostEvent, per MS counts vs time in run; Time in "
1728 "run [s]; LostEvent Count/MS []; MS",
1729 fuHistoryHistoSize, 0, fuHistoryHistoSize, iNbBinsLog - 1, dBinsLog);
1730
1731 fhErrorFractPerMsEvo = new TH2I("hErrorFractPerMsEvo",
1732 "Evolution of Error Fraction, per MS vs time in run; Time in run "
1733 "[s]; Error Fract/MS []; MS",
1734 fuHistoryHistoSize, 0, fuHistoryHistoSize, 1000, 0, 1);
1735 fhLostEvtFractPerMsEvo = new TH2I("hLostEvtFractPerMsEvo",
1736 "Evolution of LostEvent Fraction, per MS vs time in run; Time in "
1737 "run [s]; LostEvent Fract/MS []; MS",
1738 fuHistoryHistoSize, 0, fuHistoryHistoSize, 1000, 0, 1);
1739
1741 AddHistoToVector(fhMsgCntEvo, sFolder);
1742 AddHistoToVector(fhHitCntEvo, sFolder);
1745
1748
1754
1755 /*******************************************************************/
1756
1757 /*******************************************************************/
1760 fcSummary = new TCanvas("cSummary", "gDPB Monitoring Summary");
1761 fcSummary->Divide(2, 3);
1762
1763 // 1st Column: Messages types
1764 fcSummary->cd(1);
1765 gPad->SetGridx();
1766 gPad->SetGridy();
1767 gPad->SetLogy();
1768 fhMessType->Draw();
1769
1770 fcSummary->cd(2);
1771 gPad->SetGridx();
1772 gPad->SetGridy();
1773 gPad->SetLogy();
1774 fhSysMessType->Draw();
1775
1776 fcSummary->cd(3);
1777 gPad->SetGridx();
1778 gPad->SetGridy();
1779 gPad->SetLogz();
1780 fhGet4MessType->Draw("colz");
1781
1782 // 2nd Column: GET4 Errors + Epoch flags + SCm
1783 fcSummary->cd(4);
1784 gPad->SetGridx();
1785 gPad->SetGridy();
1786 gPad->SetLogz();
1787 fhGet4ChanErrors->Draw("colz");
1788
1789 fcSummary->cd(5);
1790 gPad->SetGridx();
1791 gPad->SetGridy();
1792 gPad->SetLogz();
1793 fhGet4EpochFlags->Draw("colz");
1794
1795 fcSummary->cd(6);
1796 gPad->SetGridx();
1797 gPad->SetGridy();
1798 fhGet4ChanScm->Draw("colz");
1799
1800 AddCanvasToVector(fcSummary, "canvases");
1802
1804 fcSummaryGdpb = new TCanvas("cSummaryGdpb", "gDPB Monitoring Summary");
1805 fcSummaryGdpb->Divide(2, 3);
1806
1807 fcSummaryGdpb->cd(1);
1808 gPad->SetGridx();
1809 gPad->SetGridy();
1810 gPad->SetLogz();
1811 fhGdpbMessType->Draw("colz");
1812
1813 fcSummaryGdpb->cd(2);
1814 gPad->SetGridx();
1815 gPad->SetGridy();
1816 gPad->SetLogz();
1817 fhGdpbSysMessPattType->Draw("text colz");
1818
1819 fcSummaryGdpb->cd(3);
1820 gPad->SetGridx();
1821 gPad->SetGridy();
1822 gPad->SetLogz();
1823 fhGdpbSysMessType->Draw("colz");
1824
1825 fcSummaryGdpb->cd(5);
1826 gPad->SetGridx();
1827 gPad->SetGridy();
1828 gPad->SetLogz();
1829 fhGdpbEpochFlags->Draw("text colz");
1830
1831 fcSummaryGdpb->cd(4);
1832 gPad->SetGridx();
1833 gPad->SetGridy();
1834 fhGdpbEpochSyncEvo->Draw("colz");
1835
1836 fcSummaryGdpb->cd(6);
1837 gPad->SetGridx();
1838 gPad->SetGridy();
1839 gPad->SetLogz();
1840 fhGdpbEpochMissEvo->Draw("colz");
1841
1842 AddCanvasToVector(fcSummaryGdpb, "canvases");
1844 fcStarTrigTokenType = new TCanvas("cStarTrigTokenType", "STAR trigger token message type per sector");
1845 fcStarTriggerRate = new TCanvas("cStarTriggerRate", "STAR trigger rate per sector");
1846 fcStarTrigCmdDaqVsTrig = new TCanvas("cStarTrigCmdDaqVsTrig", "STAR trigger command types per sector");
1847 fcStarTrigStarTokenEvo = new TCanvas("cStarTrigStarTokenEvo", "STAR trigger token evolution per sector");
1848 fcStarTrigGdpbTsEvo = new TCanvas("cStarTrigGdpbTsEvo", "STAR trigger gDPB TS evo per sector");
1849 fcStarTrigStarTsEvo = new TCanvas("cStarTrigStarTsEvo", "STAR trigger STAR TS evo per sector");
1850
1851 fcStarTrigTokenType->Divide(4, 3);
1852 fcStarTriggerRate->Divide(4, 3);
1853 fcStarTrigCmdDaqVsTrig->Divide(4, 3);
1854 fcStarTrigStarTokenEvo->Divide(4, 3);
1855 fcStarTrigGdpbTsEvo->Divide(4, 3);
1856 fcStarTrigStarTsEvo->Divide(4, 3);
1857
1864
1865 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
1866 UInt_t uSectorIndex = uGdpb + fUnpackPar->GetGdpbToSectorOffset();
1867 if (-1 < fiSectorIndex) uSectorIndex += fiSectorIndex;
1868
1869 fvcSumGdpbGet4.push_back(new TCanvas(Form("cSumSector%02u", uSectorIndex),
1870 Form("Summary per GET4 or channel for sector %02u", uSectorIndex)));
1871 fvcSumGdpbGet4[uGdpb]->Divide(2, 2);
1872
1873 fvcSumGdpbGet4[uGdpb]->cd(1);
1874 gPad->SetGridx();
1875 gPad->SetGridy();
1876 gPad->SetLogz();
1877 fvhGdpbGet4MessType[uGdpb]->Draw("colz");
1878
1879 fvcSumGdpbGet4[uGdpb]->cd(2);
1880 gPad->SetGridx();
1881 gPad->SetGridy();
1882 gPad->SetLogz();
1883 fvhGdpbGet4ChanScm[uGdpb]->Draw("colz");
1884
1885 fvcSumGdpbGet4[uGdpb]->cd(3);
1886 gPad->SetGridx();
1887 gPad->SetGridy();
1888 gPad->SetLogz();
1889 fvhGdpbGet4ChanErrors[uGdpb]->Draw("colz");
1890
1891 fvcSumGdpbGet4[uGdpb]->cd(4);
1892 gPad->SetGridx();
1893 gPad->SetGridy();
1894 gPad->SetLogz();
1895 fvhRemapTot_gDPB[uGdpb]->Draw("colz");
1896
1897
1898 AddCanvasToVector(fvcSumGdpbGet4[uGdpb], "canvases");
1899
1900 fcStarTrigTokenType->cd(1 + uGdpb);
1901 gPad->SetGridx();
1902 gPad->SetGridy();
1903 fvhTokenMsgType[uGdpb]->Draw("hist");
1904
1905 fcStarTriggerRate->cd(1 + uGdpb);
1906 gPad->SetGridx();
1907 gPad->SetGridy();
1908 gPad->SetLogy();
1909 fvhTriggerRate[uGdpb]->Draw("hist");
1910
1911 fcStarTrigCmdDaqVsTrig->cd(1 + uGdpb);
1912 gPad->SetGridx();
1913 gPad->SetGridy();
1914 gPad->SetLogz();
1915 fvhCmdDaqVsTrig[uGdpb]->Draw("colz");
1916
1917 fcStarTrigStarTokenEvo->cd(1 + uGdpb);
1918 gPad->SetGridx();
1919 gPad->SetGridy();
1920 gPad->SetLogz();
1921 fvhStarTokenEvo[uGdpb]->Draw("colz");
1922
1923 fcStarTrigGdpbTsEvo->cd(1 + uGdpb);
1924 gPad->SetGridx();
1925 gPad->SetGridy();
1926 fvhStarTrigGdpbTsEvo[uGdpb]->Draw("hist");
1927
1928 fcStarTrigStarTsEvo->cd(1 + uGdpb);
1929 gPad->SetGridx();
1930 gPad->SetGridy();
1931 fvhStarTrigStarTsEvo[uGdpb]->Draw("hist");
1932 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1933 /*******************************************************************/
1934
1935 return kTRUE;
1936}
1938{
1939 if (kTRUE == fbDebugMonitorMode) {
1941 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb)
1942 for (UInt_t uAsic = 0; uAsic < fuNrOfGet4PerGdpb; ++uAsic) {
1943 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1944 fvhGdpbMissmatchEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1945 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1946
1947 if (fvvbGdpbLastEnablePattern[uGdpb][uAsic]) {
1948 fvhGdpbEnableEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1949
1950 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1951 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1952 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1953
1954 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1955 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1956 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1957
1959 if (fvvbGdpbLastMissmatchPattern[uGdpb][uAsic]) {
1960 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1961 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 4);
1962 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1963 else
1964 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 2);
1965 } // if( fvvbGdpbLastMissmatchPattern[ uGdpb ][ uAsic ] )
1966 else if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1967 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 3);
1968 } // else if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1969 else
1970 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 1);
1971 } // if( fvvbGdpbLastEnablePattern[ uGdpb ][ uAsic ] )
1972 else
1973 fvhGdpbStateEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic, 0);
1974
1975 if (fvvbGdpbLastResyncPattern[uGdpb][uAsic]) {
1976 fvhGdpbResyncEvoPerTs[uGdpb]->Fill(fulCurrentTsIdx, uAsic);
1977 } // if( fvvbGdpbLastResyncPattern[ uGdpb ][ uAsic ] )
1978 } // Loop on gDPB and ASICs
1979 } // if( kTRUE == fbDebugMonitorMode )
1980 /*
1981 UInt_t uCountHitsInMs = 0;
1982 UInt_t uCountErrorsInMs = 0;
1983 UInt_t uCountLostEvtInMs = 0;
1984
1985 Double_t dFractErrorsInMs = uCountErrorsInMs;
1986 Double_t dFractLostEvtInMs = uCountLostEvtInMs;
1987 dFractErrorsInMs /= ( uCountHitsInMs + uCountErrorsInMs );
1988 dFractLostEvtInMs /= ( uCountHitsInMs + uCountErrorsInMs );
1989
1990 fhMsgCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountHitsInMs + uCountErrorsInMs );
1991 fhHitCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountHitsInMs );
1992 fhErrorCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountErrorsInMs );
1993 fhLostEvtCntPerMsEvo->Fill( fdMsTime - fdStartTime, uCountLostEvtInMs );
1994 fhErrorFractPerMsEvo->Fill( fdMsTime - fdStartTime, dFractErrorsInMs );
1995 fhLostEvtFractPerMsEvo->Fill( fdMsTime - fdStartTime, dFractLostEvtInMs );
1996*/
1997 return kTRUE;
1998}
2000{
2001 fhMessType->Reset();
2002 fhSysMessType->Reset();
2003 fhGet4MessType->Reset();
2004 fhGet4ChanScm->Reset();
2005 fhGet4ChanErrors->Reset();
2006 fhGet4EpochFlags->Reset();
2007 fhGdpbAsicSpiCounts->Reset();
2008 fhGdpbMessType->Reset();
2009 fhGdpbSysMessType->Reset();
2010 fhGdpbSysMessPattType->Reset();
2011 fhGdpbEpochFlags->Reset();
2012 fhGdpbEpochSyncEvo->Reset();
2013 fhGdpbEpochMissEvo->Reset();
2015 fhGdpbEndMsDataLost->Reset();
2016 if (kTRUE == fbDebugMonitorMode) {
2017 fhNbMissPatternPerMs->Reset();
2018 fhPatternMissmatch->Reset();
2019 fhPatternEnable->Reset();
2020 fhPatternResync->Reset();
2021 } // if( kTRUE == fbDebugMonitorMode )
2022
2023 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2024 fvhGdpbGet4MessType[uGdpb]->Reset();
2025 fvhGdpbGet4ChanScm[uGdpb]->Reset();
2026 fvhGdpbGet4ChanErrors[uGdpb]->Reset();
2027 if (kTRUE == fbDebugMonitorMode) {
2028 fvhRawFt_gDPB[uGdpb]->Reset();
2029 fvhRawCt_gDPB[uGdpb]->Reset();
2030 } // if( kTRUE == fbDebugMonitorMode )
2031 fvhRemapTot_gDPB[uGdpb]->Reset();
2032 fvhRemapChCount_gDPB[uGdpb]->Reset();
2033 fvhRemapChRate_gDPB[uGdpb]->Reset();
2034 if (kTRUE == fbDebugMonitorMode) {
2035 fvhGdpbPatternMissmatchEvo[uGdpb]->Reset();
2036 fvhGdpbPatternEnableEvo[uGdpb]->Reset();
2037 fvhGdpbPatternResyncEvo[uGdpb]->Reset();
2038 fvhGdpbMissmatchEvoPerTs[uGdpb]->Reset();
2039 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Reset();
2040 fvhGdpbEnableEvoPerTs[uGdpb]->Reset();
2041 fvhGdpbResyncEvoPerTs[uGdpb]->Reset();
2042 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Reset();
2043 fvhGdpbStateEvoPerTs[uGdpb]->Reset();
2044 } // if( kTRUE == fbDebugMonitorMode )
2045 fvhTokenMsgType[uGdpb]->Reset();
2046 fvhTriggerRate[uGdpb]->Reset();
2047 fvhCmdDaqVsTrig[uGdpb]->Reset();
2048 fvhStarTokenEvo[uGdpb]->Reset();
2049 fvhStarTrigGdpbTsEvo[uGdpb]->Reset();
2050 fvhStarTrigStarTsEvo[uGdpb]->Reset();
2051 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2052
2053 fhMsgCntEvo->Reset();
2054 fhHitCntEvo->Reset();
2055 fhErrorCntEvo->Reset();
2056 fhLostEvtCntEvo->Reset();
2057 fhErrorFractEvo->Reset();
2058 fhLostEvtFractEvo->Reset();
2059 fhHitCntPerMsEvo->Reset();
2060 fhErrorCntPerMsEvo->Reset();
2061 fhLostEvtCntPerMsEvo->Reset();
2062 fhErrorFractPerMsEvo->Reset();
2063 fhLostEvtFractPerMsEvo->Reset();
2064
2065
2068 fdStartTime = -1.0;
2069
2070 return kTRUE;
2071}
2073{
2074 fhGdpbEpochSyncEvo->Reset();
2075 fhGdpbEpochMissEvo->Reset();
2076
2077 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2078 fvhRemapChRate_gDPB[uGdpb]->Reset();
2079 if (kTRUE == fbDebugMonitorMode) {
2080 // fvhGdpbPatternMissmatchEvo[ uGdpb ] ->Reset();
2081 // fvhGdpbPatternEnableEvo[ uGdpb ] ->Reset();
2082 // fvhGdpbPatternResyncEvo[ uGdpb ] ->Reset();
2083 fvhGdpbMissmatchEvoPerTs[uGdpb]->Reset();
2084 fvhGdpbMissmatchEnaEvoPerTs[uGdpb]->Reset();
2085 fvhGdpbEnableEvoPerTs[uGdpb]->Reset();
2086 fvhGdpbResyncEvoPerTs[uGdpb]->Reset();
2087 fvhGdpbResyncEnaEvoPerTs[uGdpb]->Reset();
2088 fvhGdpbStateEvoPerTs[uGdpb]->Reset();
2089 } // if( kTRUE == fbDebugMonitorMode )
2090 fvhTriggerRate[uGdpb]->Reset();
2091 fvhStarTokenEvo[uGdpb]->Reset();
2092 fvhStarTrigGdpbTsEvo[uGdpb]->Reset();
2093 fvhStarTrigStarTsEvo[uGdpb]->Reset();
2094 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2095
2096 fhMsgCntEvo->Reset();
2097 fhHitCntEvo->Reset();
2098 fhErrorCntEvo->Reset();
2099 fhLostEvtCntEvo->Reset();
2100 fhErrorFractEvo->Reset();
2101 fhLostEvtFractEvo->Reset();
2102 fhHitCntPerMsEvo->Reset();
2103 fhErrorCntPerMsEvo->Reset();
2104 fhLostEvtCntPerMsEvo->Reset();
2105 fhErrorFractPerMsEvo->Reset();
2106 fhLostEvtFractPerMsEvo->Reset();
2107
2108 fdStartTime = -1;
2109}
2110// -------------------------------------------------------------------------
2112{
2114 TDirectory* oldDir = NULL;
2115 TFile* histoFile = NULL;
2116 // Store current directory position to allow restore later
2117 oldDir = gDirectory;
2118 // open separate histo file in recreate mode
2119 histoFile = new TFile(fsHistoFileName, "RECREATE");
2120
2121 if (nullptr == histoFile) return kFALSE;
2122
2125 /*
2126 TString sFolder = "";
2127 if( nullptr == gDirectory->Get( sFolder ) )
2128 gDirectory->mkdir( sFolder );
2129 gDirectory->cd( sFolder );
2130*/
2131 fhGdpbEpochFlags->Write();
2132 if (kTRUE == fbDebugMonitorMode) {
2133 fhPatternMissmatch->Write();
2134 fhPatternEnable->Write();
2135 } // if( kTRUE == fbDebugMonitorMode )
2136
2137 for (UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb) {
2140 /*
2141 TString sFolder = "";
2142 if( nullptr == gDirectory->Get( sFolder ) )
2143 gDirectory->mkdir( sFolder );
2144 gDirectory->cd( sFolder );
2145*/
2146 fvhGdpbGet4MessType[uGdpb]->Write();
2147 /*
2148 if( kTRUE == fbDebugMonitorMode )
2149 {
2150 fvhGdpbPatternMissmatchEvo[ uGdpb ]->Write();
2151 } // if( kTRUE == fbDebugMonitorMode )
2152*/
2153 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
2154
2156 oldDir->cd();
2157 histoFile->Close();
2158
2159 return kTRUE;
2160}
2161// -------------------------------------------------------------------------
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.
UInt_t fuMinTotPulser
Number of channels per GDPB.
static const UInt_t kuBytesPerMessage
UInt_t fuNrOfChannelsPerGet4
Number of GET4s per FEE.
void ProcessSysMess(gdpbv100::FullMessage mess)
Bool_t fbDebugMonitorMode
Control flags.
std::map< gdpbv100::MessageTypes, UInt_t > fmMsgCounter
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
Int_t fiBinSizeDatePlots
Start of run time since "epoch" in s, for the plots with date as X axis.
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::chrono::steady_clock::time_point ftStartTimeUnix
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
Int_t fiRunStartDateTimeSec
Index of the sector from which the MS currently unpacked is coming.
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)
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.