23#include "FairRootManager.h"
25#include "FairRunOnline.h"
26#include "FairRuntimeDb.h"
30#include "TClonesArray.h"
32#include "THttpServer.h"
63 , fvMsComponentsListSts()
64 , fvMsComponentsListTof()
67 , fbIgnoreOverlapMs(kFALSE)
68 , fUnpackParSts(nullptr)
70 , fmStsDpbIdIndexMap()
72 , fUnpackParTof(nullptr)
74 , fmTofDpbIdIndexMap()
77 , fdStsTofOffsetNs(0.0)
78 , fdMuchTofOffsetNs(0.0)
79 , fsHistoFileFullname(
"data/mCBMsyncHistos.root")
80 , fbPrintMessages(kFALSE)
81 , fPrintMessCtrlSts(
stsxyter::MessagePrintMask::msg_print_Human)
85 , fuCurrentEquipmentId(0)
88 , fiRunStartDateTimeSec(-1)
89 , fiBinSizeDatePlots(-1)
90 , fvulStsCurrentTsMsb()
91 , fvuStsCurrentTsMsbCycle()
92 , fvmStsSdpbHitsInMs()
93 , fvmStsSdpbHitsInTs()
94 , fulTofCurrentTsIndex(0)
100 , fviTofMsgCounter(1 +
gdpbv100::MSG_STAR_TRI_D, 0)
101 , fvulTofCurrentEpoch()
102 , fvulTofCurrentEpochCycle()
103 , fvulTofCurrentEpochFull()
104 , fulTofCurrentEpochTime(0)
105 , fvmTofEpSupprBuffer()
106 , fvmTofGdpbHitsInMs()
107 , fvmTofGdpbHitsInTs()
108 , fvuHitsNbInTimeBinSts(kuNbTimeBins, 0)
109 , fvuHitsNbInTimeBinMuch(kuNbTimeBins, 0)
110 , fvuHitsNbInTimeBinTof(kuNbTimeBins, 0)
111 , fvuHitsNbInTimeBinDiam(kuNbTimeBins, 0)
112 , fhMcbmHitsNbPerTsEvo()
113 , fhMcbmHitsNbFineEvo()
114 , fhMcbmHitsRateEvo()
115 , fhDiamondHitsRateMapEvo()
116 , fhDiamondHitsRateDerivative()
117 , fhMuchVsStsHitsNbPerTimeBin()
118 , fhTofVsStsHitsNbPerTimeBin()
119 , fhDiamVsStsHitsNbPerTimeBin()
120 , fhStsVsMuchHitsNbPerTimeBin()
121 , fhTofVsMuchHitsNbPerTimeBin()
122 , fhDiamVsMuchHitsNbPerTimeBin()
123 , fhStsVsTofHitsNbPerTimeBin()
124 , fhMuchVsTofHitsNbPerTimeBin()
125 , fhDiamVsTofHitsNbPerTimeBin()
126 , fhStsVsDiamHitsNbPerTimeBin()
127 , fhTofVsDiamHitsNbPerTimeBin()
128 , fhMuchVsDiamHitsNbPerTimeBin()
136 LOG(info) <<
"Initializing flib StsXyter unpacker for STS";
138 FairRootManager* ioman = FairRootManager::Instance();
139 if (ioman ==
nullptr) { LOG(fatal) <<
"No FairRootManager instance"; }
146 LOG(info) <<
"Setting parameter containers for " << GetName();
154 LOG(info) <<
"Init parameter containers for " << GetName();
166 LOG(info) <<
"ReInit parameter containers for " << GetName();
175 LOG(info) <<
"Eq. ID for DPB #" << std::setw(2) << uDpb <<
" = 0x" << std::setw(4) << std::hex
210 switch (usDetectorId) {
222 LOG(warning) <<
"CbmMcbm2018MonitorStsSync::AddMsComponentToList => "
223 <<
"Ignore component " << component <<
" as detector id " << usDetectorId
224 <<
" is not supported by this unpacker.";
258 TString sHistName {
""};
316 LOG(info) <<
"Done Creating STS Histograms";
323 TString sHistName {
""};
389 LOG(info) <<
"Done Creating TOF Histograms";
396 TString sHistName {
""};
397 TString sHistTitle {
""};
401 sHistName =
"hMcbmHitsNbPerTsEvo";
402 sHistTitle =
"Nb STS or TOF hits, per DPB and per TS; TS index []; DPB []; Nb Hits []";
405 sHistName =
"hMcbmHitsNbFineEvo";
406 sHistTitle =
"Nb STS or TOF hits, per DPB and per 100 ms; t [s]; DPB []; Hit rate [1/s]";
409 sHistName =
"hMcbmHitsRateEvo";
410 sHistTitle =
"STS or TOF hits rate per DPB as function of time in run; t "
411 "[s]; DPB []; Hit rate [1/s]";
414 sHistName =
"hDiamondHitsRateMapEvo";
415 sHistTitle =
"Counts per diamond strip and 100 ms as function of time in "
416 "run; t [s]; strip []; Counts []";
419 sHistName =
"hDiamondHitsRateDerivative";
420 sHistTitle =
"Variation of the diamond counts per s in 100 ms bins as "
421 "function of time in run; t [s]; Delta(Counts/s) []";
424 sHistName =
"hMuchVsStsHitsNbPerTimeBin";
425 sHistTitle = Form(
"Nb Hits in MUCH vs Sts in time bins of %5u ns; Nb Hits "
426 "STS []; Nb Hits TOF []; Time bins []",
429 sHistName =
"hTofVsStsHitsNbPerTimeBin";
430 sHistTitle = Form(
"Nb Hits in TOF vs Sts in time bins of %5u ns; Nb Hits STS "
431 "[]; Nb Hits MUCH []; Time bins []",
434 sHistName =
"hDiamVsStsHitsNbPerTimeBin";
435 sHistTitle = Form(
"Nb Hits in Diam vs Sts in time bins of %5u ns; Nb Hits "
436 "STS []; Nb Hits Diam []; Time bins []",
440 sHistName =
"hStsVsMuchHitsNbPerTimeBin";
441 sHistTitle = Form(
"Nb Hits in STS vs MUCH in time bins of %5u ns; Nb Hits "
442 "MUCH []; Nb Hits STS []; Time bins []",
445 sHistName =
"hTofVsMuchHitsNbPerTimeBin";
446 sHistTitle = Form(
"Nb Hits in TOF vs MUCH in time bins of %5u ns; Nb Hits "
447 "MUCH []; Nb Hits TOF []; Time bins []",
450 sHistName =
"hDiamVsMuchHitsNbPerTimeBin";
451 sHistTitle = Form(
"Nb Hits in Diam vs MUCH in time bins of %5u ns; Nb Hits "
452 "MUCH []; Nb Hits Diam []; Time bins []",
456 sHistName =
"hStsVsTofHitsNbPerTimeBin";
457 sHistTitle = Form(
"Nb Hits in STS vs TOF in time bins of %5u ns; Nb Hits TOF "
458 "[]; Nb Hits STS []; Time bins []",
461 sHistName =
"hMuchVsTofHitsNbPerTimeBin";
462 sHistTitle = Form(
"Nb Hits in MUCH vs TOF in time bins of %5u ns; Nb Hits "
463 "TOF []; Nb Hits MUCH []; Time bins []",
466 sHistName =
"hDiamVsTofHitsNbPerTimeBin";
467 sHistTitle = Form(
"Nb Hits in Diam vs TOF in time bins of %5u ns; Nb Hits "
468 "TOF []; Nb Hits Diam []; Time bins []",
472 sHistName =
"hStsVsDiamHitsNbPerTimeBin";
473 sHistTitle = Form(
"Nb Hits in STS vs Diam in time bins of %5u ns; Nb Hits "
474 "Diam []; Nb Hits STS []; Time bins []",
477 sHistName =
"hTofVsDiamHitsNbPerTimeBin";
478 sHistTitle = Form(
"Nb Hits in TOF vs Diam in time bins of %5u ns; Nb Hits "
479 "Diam []; Nb Hits TOF []; Time bins []",
482 sHistName =
"hMuchVsDiamHitsNbPerTimeBin";
483 sHistTitle = Form(
"Nb Hits in MUCH vs Diam in time bins of %5u ns; Nb Hits "
484 "Diam []; Nb Hits MUCH []; Time bins []",
488 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
522 LOG(info) <<
"Done Creating mCBM Histograms";
542 LOG(debug) <<
"Timeslice contains " << ts.num_microslices(component) <<
"microslices.";
556 for (UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx++) {
561 if (kFALSE ==
ProcessStsMs(ts, uMsComp, uMsIdx))
return kFALSE;
568 if (kFALSE ==
ProcessTofMs(ts, uMsComp, uMsIdx))
return kFALSE;
574 for( UInt_t uSdpb = 0; uSdpb < fuStsNrOfDpbs; ++uSdpb )
575 std::sort( fvmStsSdpbHitsInMs[ uSdpb ].begin(), fvmStsSdpbHitsInMs[ uSdpb ].end() );
582 for( UInt_t uGdpb = 0; uGdpb < fuTofNrOfDpbs; ++uGdpb )
583 std::sort( fvmTofGdpbHitsInMs[ uGdpb ].begin(), fvmTofGdpbHitsInMs[ uGdpb ].end() );
586 for (UInt_t uHitDia = 0; uHitDia < uNbDiaHits; uHitDia++) {
591 case 0: uChan = 0;
break;
592 case 32: uChan = 1;
break;
593 case 64: uChan = 2;
break;
594 case 96: uChan = 3;
break;
595 case 160: uChan = 4;
break;
596 case 192: uChan = 5;
break;
597 case 224: uChan = 6;
break;
598 case 256: uChan = 7;
break;
615 for (UInt_t uHit = 0; uHit < uNbHitsInMs; ++uHit) {
616 Double_t dHitTimeInTs =
625 if (iTimeBin < 0 ||
kuNbTimeBins <=
static_cast<UInt_t
>(iTimeBin)) {
626 LOG(debug) <<
"sDPB hits with time out of the TS!! " << dHitTimeInTs <<
" " << iTimeBin;
637 fvmStsSdpbHitsInTs[ uSdpb ].insert( fvmStsSdpbHitsInTs[ uSdpb ].end(),
638 fvmStsSdpbHitsInMs[ uSdpb ].begin(),
639 fvmStsSdpbHitsInMs[ uSdpb ].end() );
659 for (UInt_t uHit = 0; uHit < uNbHitsInMs; ++uHit) {
663 if (iTimeBin < 0 ||
kuNbTimeBins <=
static_cast<UInt_t
>(iTimeBin)) {
664 LOG(debug) <<
"gDPB hits with time out of the TS!! " <<
fvmTofGdpbHitsInMs[uGdpb][uHit].GetFullTimeNs() <<
" "
687 UInt_t uNbDiaHits = fvmTofGdpbHitsInTs[ fuDiamondDpbIdx ].size();
688 for( UInt_t uHitDia = 0; uHitDia < uNbDiaHits; uHitDia++)
690 Double_t dDiaTime = fvmTofGdpbHitsInTs[ fuDiamondDpbIdx ][ uHitDia ].GetFullTimeNs();
693 for( UInt_t uSdpb = 1; uSdpb < fuStsNrOfDpbs; ++uSdpb )
695 UInt_t uNbHits = fvmStsSdpbHitsInTs[ uSdpb ].size();
696 for( UInt_t uHit = 0; uHit < uNbHits; ++uHit )
698 Double_t dHitTime = stsxyter::kdClockCycleNs * fvmStsSdpbHitsInTs[ uSdpb ][ uHit ].GetTs();
700 Double_t dDt = dHitTime - dDiaTime;
701 fhMcbmTimeDiffToDiamondTs->Fill( dDt / 1e6, uSdpb );
703 fvhMcbmTimeDiffToDiamondTsEvoDpb[ uSdpb ]->Fill( fulCurrentTsIdx, dDt / 1e6 );
704 } // for( UInt_t uHit = 0; uHit < uNbHits; ++uHit )
705 } // for( UInt_t uSdpb = 0; uSdpb < fuStsNrOfDpbs; ++uSdpb )
707 for( UInt_t uGdpb = 0; uGdpb < fuTofNrOfDpbs; ++uGdpb )
709 if( fuDiamondDpbIdx == uGdpb )
712 UInt_t uNbHits = fvmTofGdpbHitsInTs[ uGdpb ].size();
713 for( UInt_t uHit = 0; uHit < uNbHits; ++uHit )
715 Double_t dHitTime = fvmTofGdpbHitsInTs[ uGdpb ][ uHit ].GetFullTimeNs();
717 Double_t dDt = dHitTime - dDiaTime;
718 fhMcbmTimeDiffToDiamondTs->Fill( dDt / 1e6, uGdpb + fuStsNrOfDpbs );
720 fvhMcbmTimeDiffToDiamondTsEvoDpb[ uGdpb + fuStsNrOfDpbs ]->Fill( fulCurrentTsIdx, dDt / 1e6 );
721 } // for( UInt_t uHit = 0; uHit < uNbHits; ++uHit )
722 } // for( UInt_t uGdpb = 0; uGdpb < fuTofNrOfDpbs; ++uGdpb )
723 } // for( UInt_t uHitDia = 0; uHitDia < uNbDiaHits; uHitDia++)
726 for( UInt_t uSdpb = 0; uSdpb < fuStsNrOfDpbs; ++uSdpb )
728 fvmStsSdpbHitsInTs[ uSdpb ].clear();
729 } // for( UInt_t uSdpb = 0; uSdpb < fuStsNrOfDpbs; ++uSdpb )
730 for( UInt_t uGdpb = 0; uGdpb < fuTofNrOfDpbs; ++uGdpb )
732 fvmTofGdpbHitsInTs[ uGdpb ].clear();
733 } // for( UInt_t uGdpb = 0; uGdpb < fuTofNrOfDpbs; ++uGdpb )
736 for (UInt_t uTimeBin = 0; uTimeBin <
kuNbTimeBins; ++uTimeBin) {
780 if (0 == ts.index() % 1000) {
781 LOG(info) <<
"End of TS " << std::setw(7) << ts.index();
790 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
792 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsComp, uMsIdx));
794 uint32_t uSize = msDescriptor.size;
798 <<
" has size: " << uSize;
806 LOG(info) <<
"---------------------------------------------------------------";
817 LOG(warning) <<
"Could not find the sDPB index for AFCK id 0x" << std::hex <<
fuCurrDpbId << std::dec
818 <<
" in timeslice " <<
fulCurrentTsIdx <<
" in microslice " << uMsIdx <<
" component " << uMsComp
820 <<
"If valid this index has to be added in the STS/MUCH "
821 "parameter file in the RocIdArray field";
835 LOG(warning) <<
"TS MSB cycle from MS header does not match current cycle from data "
838 << uTsMsbCycleHeader;
844 LOG(error) <<
"The input microslice buffer does NOT "
845 <<
"contain only complete nDPB messages!";
851 const uint32_t* pInBuff =
reinterpret_cast<const uint32_t*
>(msContent);
853 for (uint32_t uIdx = 0; uIdx < uNbMessages; ++uIdx) {
855 uint32_t ulData =
static_cast<uint32_t
>(pInBuff[uIdx]);
880 LOG(info) <<
"CbmMcbm2018MonitorMcbmRate::DoUnpack => "
881 <<
"EPOCH message at unexpected position in MS: message " << uIdx <<
" VS message 0 expected!";
890 LOG(fatal) <<
"CbmMcbm2018MonitorMcbmRate::DoUnpack => "
891 <<
"Unknown message type, should never happen, stopping here!";
947 if ((0 == uChanIdx % 2) && (543 < uChanIdx) && (uChanIdx < 633)) {
return; }
952 Long64_t ulStsHitTime = usRawTs;
982 LOG(info) <<
"TS MSb Jump in "
984 << std::setw(4) << uMsIdx <<
" Msg Idx " << std::setw(5) << uMessIdx <<
" DPB " << std::setw(2)
986 << std::setw(5) << uVal;
1007 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
1010 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsComp, uMsIdx));
1012 uint32_t
size = msDescriptor.size;
1014 if (
size > 0) LOG(debug) <<
"Microslice: " << msDescriptor.idx <<
" has size: " <<
size;
1016 Int_t messageType = -111;
1020 LOG(error) <<
"The input microslice buffer does NOT "
1021 <<
"contain only complete nDPB messages!";
1033 LOG(info) <<
"---------------------------------------------------------------";
1044 LOG(warning) <<
"Could not find the gDPB index for AFCK id 0x" << std::hex <<
fuTofGdpbId << std::dec
1045 <<
" in timeslice " <<
fulCurrentTsIdx <<
" in microslice " << uMsIdx <<
" component " << uMsComp
1047 <<
"If valid this index has to be added in the TOF parameter "
1048 "file in the RocIdArray field";
1055 const uint64_t* pInBuff =
reinterpret_cast<const uint64_t*
>(msContent);
1056 for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
1058 uint64_t ulData =
static_cast<uint64_t
>(pInBuff[uIdx]);
1067 if (fair::Logger::Logging(fair::Severity::debug2)) {
1076 switch (messageType) {
1096 LOG(error) <<
"Message type " << std::hex << std::setw(2) << static_cast<uint16_t>(messageType)
1097 <<
" not included in Get4 unpacker.";
1121 if (0 < ulCurEpochGdpbGet4) ulCurEpochGdpbGet4--;
1154 if (0 < iBufferSize) {
1155 LOG(debug) <<
"Now processing stored messages for for gDPB " <<
fuTofGdpbNr <<
" with epoch number "
1162 for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
1190 LOG(info) <<
"-------------------------------------";
1200 TFile* oldFile = gFile;
1201 TDirectory* oldDir = gDirectory;
1203 TFile* histoFile =
nullptr;
1204 if (
"" != sFileName) {
1206 histoFile =
new TFile(sFileName,
"RECREATE");
1217 gDirectory->mkdir(
"mCbmRate");
1218 gDirectory->cd(
"mCbmRate");
1224 gDirectory->cd(
"..");
1226 gDirectory->mkdir(
"mCbmCounts");
1227 gDirectory->cd(
"mCbmCounts");
1240 gDirectory->cd(
"..");
1243 if (
"" != sFileName) {
1250 gDirectory = oldDir;
ClassImp(CbmConverterManager)
static constexpr size_t size()
TH1 * fhDiamondHitsRateDerivative
Bool_t ProcessStsMs(const fles::Timeslice &ts, size_t uMsComp, UInt_t uMsIdx)
UInt_t fuCurrentEquipmentId
void FillTofEpochInfo(gdpbv100::Message)
TH2 * fhTofVsDiamHitsNbPerTimeBin
TH2 * fhDiamVsTofHitsNbPerTimeBin
stsxyter::MessagePrintMask fPrintMessCtrlSts
TH2 * fhMcbmHitsNbPerTsEvo
ULong64_t fulCurrentTsStartTime
void FillStsHitInfo(stsxyter::Message mess, const UInt_t &uMsIdx)
TH2 * fhTofVsMuchHitsNbPerTimeBin
void AddMsComponentToListSts(size_t component)
TH2 * fhStsVsTofHitsNbPerTimeBin
UInt_t fuCurrDpbId
Current equipment ID, tells from which DPB the current MS is originating.
Double_t fdMuchTofOffsetNs
static const UInt_t kuStsBytesPerMessage
UInt_t fuTotalNrOfDpb
Global parameters.
std::vector< UInt_t > fvuHitsNbInTimeBinSts
std::vector< int > fviTofMsgCounter
std::map< UInt_t, UInt_t > fmStsDpbIdIndexMap
Total number of Sts DPBs in system.
TH2 * fhTofVsStsHitsNbPerTimeBin
UInt_t fuCurrDpbIdx
Temp holder until Current equipment ID is properly filled in MS.
TH2 * fhDiamVsStsHitsNbPerTimeBin
std::vector< std::vector< gdpbv100::FullMessage > > fvmTofGdpbHitsInMs
Buffer for system sync check.
std::vector< UInt_t > fvuHitsNbInTimeBinTof
std::vector< ULong64_t > fvulTofCurrentEpoch
TH2 * fhMcbmHitsNbFineEvo
void SaveAllHistos(TString sFileName="")
Bool_t ReInitContainers()
TH2 * fhDiamondHitsRateMapEvo
Bool_t ProcessTofMs(const fles::Timeslice &ts, size_t uMsComp, UInt_t uMsIdx)
void FillTofEpochCycle(uint64_t ulCycleData)
void FillTofHitInfo(gdpbv100::Message)
CbmMcbm2018StsPar * fUnpackParSts
TH2 * fhStsVsDiamHitsNbPerTimeBin
CbmMcbm2018MonitorMcbmRate()
TH2 * fhStsVsMuchHitsNbPerTimeBin
static const UInt_t kuTimeBinSizeNs
ULong64_t fulCurrentMsIdx
std::vector< std::vector< gdpbv100::Message > > fvmTofEpSupprBuffer
Buffer for suppressed epoch processing.
TH2 * fhMuchVsDiamHitsNbPerTimeBin
virtual ~CbmMcbm2018MonitorMcbmRate()
void FillStsTsMsbInfo(stsxyter::Message mess, UInt_t uMessIdx=0, UInt_t uMsIdx=0)
std::vector< std::vector< stsxyter::FinalHit > > fvmStsSdpbHitsInMs
Current TS MSB cycle for DPB.
static const UInt_t kuNbTimeBins
virtual void SetNbMsInTs(size_t uCoreMsNb, size_t uOverlapMsNb)
std::map< UInt_t, UInt_t > fmTofDpbIdIndexMap
Total number of GDPBs in the system.
std::vector< UInt_t > fvuHitsNbInTimeBinMuch
TString fsHistoFileFullname
void CreateTofHistograms()
Processing methods.
Double_t fdStsTofOffsetNs
std::vector< ULong64_t > fvulTofCurrentEpochCycle
void FillStsEpochInfo(stsxyter::Message mess)
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
TH2 * fhMuchVsTofHitsNbPerTimeBin
std::vector< std::vector< stsxyter::FinalHit > > fvmStsSdpbHitsInTs
All hits (time in bins, ADC in bins, asic, channel) in last TS, sorted with "<" operator.
std::vector< size_t > fvMsComponentsListSts
void AddMsComponentToListTof(size_t component)
virtual void AddMsComponentToList(size_t component, UShort_t usDetectorId)
std::vector< size_t > fvMsComponentsListTof
ULong64_t fulCurrentTsIdx
std::vector< UInt_t > fvuHitsNbInTimeBinDiam
std::vector< ULong64_t > fvulTofCurrentEpochFull
std::vector< ULong64_t > fvulStsCurrentTsMsb
Bin size in s for the plots with date as X axis.
void CreateStsHistograms()
All hits (time in bins, ADC in bins, asic, channel) in last TS, sorted with "<" operator.
static const UInt_t kuTofBytesPerMessage
TODO => move to the message class!!
std::map< stsxyter::MessType, UInt_t > fmMsgCounter
void CreateMcbmHistograms()
CbmMcbm2018TofPar * fUnpackParTof
Unpacking and mapping parameters for TOF.
std::vector< std::vector< gdpbv100::FullMessage > > fvmTofGdpbHitsInTs
TH2 * fhMuchVsStsHitsNbPerTimeBin
UInt_t fuMuchDpbIdx
Map of DPB Identifier to DPB index.
ULong64_t fulTofCurrentEpochTime
std::vector< UInt_t > fvuStsCurrentTsMsbCycle
Current TS MSB for each DPB.
TH2 * fhDiamVsMuchHitsNbPerTimeBin
UInt_t GetDpbId(UInt_t uDpbIdx)
UInt_t ElinkIdxToAsicIdx(Bool_t bFebType, UInt_t uElink)
static constexpr UInt_t GetNbChanPerAsic()
Int_t GetNrOfGdpbs()
FIXME: replace with method returning the correspondign constants! see Star2019 parameter.
uint16_t getGdpbHitIs24b() const
uint32_t getGdpbEpEpochNb() const
void setGdpbEpEpochNb(uint32_t v)
uint16_t getGdpbGenChipId() const
void printDataCout(unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
Print message in human readable format to cout.
uint8_t getMessageType() const
Returns the message type. Valid for all message types. 4 bit.
uint64_t getMsgFullTime(uint64_t epoch) const
Returns expanded and adjusted time of message (in ns)
XPU_D uint16_t GetHitAdc() const
For Hit data: Returns ADC value (5 bit field)
XPU_D uint16_t GetHitChannel() const
For Hit data: Returns StsXYTER channel number (7 bit field)
bool PrintMess(std::ostream &os, MessagePrintMask ctrl=MessagePrintMask::msg_print_Human, bool bBinning=true) const
XPU_D uint16_t GetLinkIndex() const
For all data: Returns the (global) index of the eLink on which the message was received (n bit field)
XPU_D MessType GetMessType() const
Returns the message type, see enum MessType.
XPU_D uint16_t GetHitTime() const
For Hit data: Returns timestamp (8 bit field, 2 MSB bits overlap removed)
XPU_D uint32_t GetTsMsbVal() const
For TS MSB data: Returns the TS MSB 22 bit field)
const uint64_t kulEpochCycleBins
const uint32_t kuChipIdMergedEpoch
const uint32_t kuEpochCounterSz
const uint64_t kulEpochCycleFieldSz
static constexpr uint64_t kulTsCycleNbBins
static constexpr uint32_t kuHitNbTsBins
static constexpr double kdClockCycleNs