13 #include "FairLogger.h"
14 #include "FairRootManager.h"
16 #include "FairRunOnline.h"
17 #include "FairRuntimeDb.h"
38 , fbDebugMonitorMode(kFALSE)
39 , fbStoreLostEventMsg(kFALSE)
40 , fbAddStatusToEvent(kTRUE)
46 , fuNrOfChannelsPerGet4(0)
47 , fuNrOfChannelsPerFee(0)
49 , fuNrOfGet4PerGdpb(0)
50 , fuNrOfChannelsPerGdpb(0)
57 , fdAllowedTriggersSpread(-1.0)
58 , fdStarTriggerDeadtime()
59 , fdStarTriggerDelay()
60 , fdStarTriggerWinSize()
63 , fulCurrentTsIndex(0)
65 , fdTsStopTimeCore(-1.0)
75 , fvulCurrentEpochCycle()
76 , fvulCurrentEpochFull()
78 , fvvBufferMajorAsicErrors()
81 , fbTriggerFoundA(kFALSE)
82 , fbTriggerFoundB(kFALSE)
83 , fbTriggerFoundC(kFALSE)
88 , fvulGdpbTsFullLast()
89 , fvulStarTsFullLast()
92 , fvuStarTrigCmdLast()
93 , fvulGdpbTsFullLastCore()
94 , fvulStarTsFullLastCore()
95 , fvuStarTokenLastCore()
96 , fvuStarDaqCmdLastCore()
97 , fvuStarTrigCmdLastCore()
98 , fvdMessCandidateTimeStart()
99 , fvdMessCandidateTimeStop()
100 , fvdTrigCandidateTimeStart()
101 , fvdTrigCandidateTimeStop()
102 , fbEpochAfterCandWinFound(kFALSE)
103 , fbTriggerAfterCandWinFound(kFALSE)
104 , fvbGdpbLastMissmatchPattern()
105 , fvbGdpbLastEnablePattern()
106 , fvbGdpbLastResyncPattern()
107 , fvSectorStatusPattern()
108 , fvhHitsTimeToTriggerRaw()
109 , fvhHitsTimeToTriggerRawPulser()
110 , fvhHitsTimeToTriggerSel()
111 , fvhHitsTimeToTriggerSelVsDaq()
112 , fvhHitsTimeToTriggerSelVsTrig()
114 , fvhTriggerDistributionInTs()
115 , fvhTriggerDistributionInMs()
116 , fvhMessDistributionInMs()
117 , fhEventSizeDistribution(nullptr)
118 , fhEventSizeEvolution(nullptr)
119 , fhEventNbEvolution(nullptr)
120 , fhEventNbDistributionInTs(nullptr)
121 , fhEventSizeDistributionInTs(nullptr)
122 , fhRawTriggersStats(nullptr)
123 , fhRawTriggersStatsCore(nullptr)
124 , fhRawTriggersStatsOver(nullptr)
125 , fhRawTriggersStatsSel(nullptr)
126 , fhMissingTriggersEvolution(nullptr)
127 , fcTimeToTrigRaw(nullptr)
128 , fcTimeToTrigSel(nullptr)
129 , fcTrigDistMs(nullptr)
130 , fcMessDistMs(nullptr)
131 , fcEventBuildStats(nullptr)
132 , fcTriggerStats(nullptr) {}
135 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
145 LOG(info) <<
"Initializing STAR eTOF 2019 event builder algo";
158 LOG(info) <<
"Init parameter containers for CbmStar2019EventBuilderEtofAlgo";
164 LOG(info) <<
"**********************************************";
166 <<
"ReInit parameter containers for CbmStar2019EventBuilderEtofAlgo";
185 LOG(info) <<
"Monitor mode: " << (
fbMonitorMode ?
"ON" :
"OFF");
190 LOG(info) <<
"Store Lost Event Msg in event: "
193 LOG(info) <<
"Add status pattern to event: "
224 LOG(info) <<
"GDPB Id of TOF " << Form(
"%02d",
i) <<
" : " << std::hex
239 for (UInt_t uGbtx = 0; uGbtx <
fuNrOfGbtx; ++uGbtx) {
246 LOG(info) <<
"Nr. of RPCs per GBTx: ";
247 std::stringstream ss;
248 for (UInt_t uGbtx = 0; uGbtx <
fuNrOfGbtx; ++uGbtx)
250 LOG(info) << ss.str();
252 LOG(info) <<
"RPC type per GBTx: ";
254 for (UInt_t uGbtx = 0; uGbtx <
fuNrOfGbtx; ++uGbtx)
256 LOG(info) << ss.str();
258 LOG(info) <<
"RPC side per GBTx: ";
260 for (UInt_t uGbtx = 0; uGbtx <
fuNrOfGbtx; ++uGbtx)
262 LOG(info) << ss.str();
264 LOG(info) <<
"Module ID per GBTx: ";
266 for (UInt_t uGbtx = 0; uGbtx <
fuNrOfGbtx; ++uGbtx)
268 LOG(info) << ss.str();
272 LOG(info) <<
"Timeslice parameters: each MS is " <<
fdMsSizeInNs <<
" ns";
287 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
291 LOG(info) << Form(
"Trigger window parameters for gDPB %2u are: ", uGdpb)
331 UShort_t usDetectorId) {
340 <<
"CbmStar2019EventBuilderEtofAlgo::AddMsComponentToList => Component "
341 << component <<
" with detector ID 0x" << std::hex << usDetectorId
342 << std::dec <<
" added to list";
348 fdTsStartTime =
static_cast<Double_t
>(ts.descriptor(0, 0).idx);
364 LOG(info) <<
"In each TS " <<
fuNbMsLoop <<
" MS will be looped over";
373 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
440 <<
fuMsIndex <<
" for component " << uMsComp;
457 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
487 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
492 fdMsTime =
static_cast<double>(msDescriptor.idx);
493 uint32_t size = msDescriptor.size;
496 LOG(debug) <<
"Microslice: " << msDescriptor.idx <<
" has size: " << size;
499 const uint8_t* msContent =
500 reinterpret_cast<const uint8_t*
>(ts.content(uMsComp, uMsIdx));
518 LOG(error) <<
"The input microslice buffer does NOT "
519 <<
"contain only complete nDPB messages!";
532 LOG(warning) <<
"Could not find the gDPB index for AFCK id 0x" << std::hex
535 <<
"If valid this index has to be added in the TOF parameter "
536 "file in the RocIdArray field";
537 if (
iWarn == 100) LOG(fatal) <<
"Got max number of Warnings!";
562 Int_t messageType = -111;
563 const uint64_t* pInBuff =
reinterpret_cast<const uint64_t*
>(msContent);
564 for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
571 uint64_t ulData =
static_cast<uint64_t
>(pInBuff[uIdx]);
587 <<
" in messageType " << messageType;
606 LOG(warning) <<
"Message with Get4 ID too high: " <<
fuGet4Id <<
" VS "
609 switch (messageType) {
613 <<
"This event builder does not support 24b hit message!!!.";
640 LOG(debug2) <<
"This event builder does not support unmerged epoch "
670 LOG(error) <<
"Message type " << std::hex << std::setw(2)
671 <<
static_cast<uint16_t
>(messageType)
672 <<
" not included in Get4 unpacker.";
693 LOG(warning) <<
"CbmStar2019EventBuilderEtofAlgo::ProcessEpochCycle => "
694 <<
" Missmatch in epoch cycles detected for Gdpb " <<
fuGdpbNr
695 <<
", probably fake cycles due to epoch index corruption! "
696 << Form(
" Current cycle 0x%09llX New cycle 0x%09llX",
701 LOG(info) <<
"CbmStar2019EventBuilderEtofAlgo::ProcessEpochCycle => "
702 <<
" New epoch cycle for Gdpb " <<
fuGdpbNr
703 << Form(
": Current cycle 0x%09llX New cycle 0x%09llX",
770 "Problem: Overwritting a A trigger in TS %12llu MS %3u Core? %u",
774 << Form(
" (%u %u %u)",
800 "Problem: Found B trigger before A in TS %12llu MS %3u",
806 "Problem: Overwritting a B trigger in TS %12llu MS %3u Core? %u",
810 << Form(
" (%u %u %u)",
835 "Problem: Found C trigger before A or B in TS %12llu MS %3u",
841 "Problem: Overwritting a C trigger in TS %12llu MS %3u Core? %u",
845 << Form(
" (%u %u %u)",
855 ULong64_t ulNewGdpbTsFull =
870 LOG(info) << Form(
"Problem: Found D trigger before A or B or C in TS "
871 "%12llu MS %3u Core? %u",
875 << Form(
" (%u %u %u) token %5u",
929 LOG(warning) <<
"Possible error: identical STAR tokens found twice in "
930 "a row => ignore 2nd! "
937 << Form(
"TRG Wrd = %5x ", uTrigWord);
943 LOG(debug) <<
"Probable reset of the GDPB TS: old = "
945 <<
" new = " << Form(
"%16llu", ulNewGdpbTsFull)
949 <<
" GDPB #" << Form(
"%2u",
fuGdpbNr);
953 LOG(debug) <<
"Probable reset of the STAR TS: old = "
955 <<
" new = " << Form(
"%16llu", ulNewStarTsFull)
959 <<
" GDPB #" << Form(
"%2u",
fuGdpbNr);
973 Double_t dTriggerTime =
1021 if ((dTriggerTime -
fdMsTime) / 1000.0 < -1000) {
1024 << Form(
" Sector %3u ",
fuGdpbNr + 13)
1025 << Form(
" Ttrig %15.2f", dTriggerTime)
1027 << Form(
" dT %15.5f", ((dTriggerTime -
fdMsTime) / 1000.0));
1028 LOG(info) << Form(
"Full token, gDPB TS LSB bits: 0x%16llx, STAR TS "
1029 "MSB bits: 0x%16llx, token is %4u",
1040 default: LOG(error) <<
"Unknown Star Trigger messageindex: " << iMsgIndex;
1049 if (0 == iBufferSize)
return;
1051 LOG(debug) <<
"Now processing stored messages for for gDPB " <<
fuGdpbNr
1063 if (0 == ulCurEpochGdpbGet4)
return;
1066 ulCurEpochGdpbGet4--;
1068 Int_t messageType = -111;
1069 for (Int_t iMsgIdx = 0; iMsgIdx < iBufferSize; iMsgIdx++) {
1079 ulCurEpochGdpbGet4);
1082 switch (messageType) {
1111 LOG(error) <<
"Message type " << std::hex << std::setw(2)
1112 <<
static_cast<uint16_t
>(messageType)
1113 <<
" not included in Get4 unpacker.";
1188 LOG(error) <<
"Invalid mapping index " << uChanInSyst <<
" VS "
1190 <<
", " <<
fuGet4Id <<
", " << uChannel;
1212 LOG(debug) <<
" +++++++ > gDPB: " << std::hex << std::setw(4)
1213 <<
fuGdpbId << std::dec <<
", Chip = " << std::setw(2)
1218 << std::setw(2) << uData << std::dec
1219 <<
" -- GET4 V1 Error Event";
1221 LOG(debug) <<
" +++++++ >gDPB: " << std::hex << std::setw(4) <<
fuGdpbId
1222 << std::dec <<
", Chip = " << std::setw(2)
1227 << std::setw(2) << uData << std::dec
1228 <<
" -- GET4 V1 Error Event ";
1232 LOG(debug) <<
"Unknown GET4 message, data: " << std::hex << std::setw(8)
1234 <<
" Full message: " << std::hex << std::setw(16)
1235 << mess.
getData() << std::dec;
1239 LOG(debug) <<
"GET4 synchronization pulse missing";
1243 LOG(debug) <<
"ASIC pattern for missmatch, disable or resync";
1247 LOG(debug) <<
"Crazy system message, subtype "
1267 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1269 (uPattern >> uBit) & 0x1;
1276 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1278 (uPattern >> uBit) & 0x1;
1285 for (UInt_t uBit = 0; uBit < uNbBits; ++uBit) {
1287 (uPattern >> uBit) & 0x1;
1293 LOG(debug) <<
"Crazy pattern message, subtype " << usType;
1306 std::pair<uint64_t, std::bitset<kuNbAsicPerGdpb>>(
1318 std::pair<uint64_t, std::bitset<kuNbAsicPerGdpb>> statusIn) {
1320 static constexpr std::bitset<kuNbAsicPerGdpb> kbMask32 {0xFFFFFFFF};
1326 const std::bitset<kuNbAsicPerGdpb> bPatterBlock {
1327 (statusIn.second >> (32 * uIndex)) & kbMask32};
1336 bPatterBlock.to_ulong());
1347 std::vector<std::vector<CbmTofStarTrigger2019>::iterator>
1349 std::vector<std::vector<gdpbv100::FullMessage>::iterator>
1351 std::vector<std::vector<gdpbv100::FullMessage>::iterator>
1354 std::vector<std::pair<uint64_t, std::bitset<kuNbAsicPerGdpb>>>::iterator>
1356 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1364 Bool_t bAllSectAllTriggDone = kTRUE;
1365 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1368 bAllSectAllTriggDone = kFALSE;
1376 while (kFALSE == bAllSectAllTriggDone) {
1378 Bool_t bAllSectorsMatch = kTRUE;
1379 UInt_t uFirstStarToken = 0;
1380 UShort_t usFirstStarDaqCmd = 0;
1381 UShort_t usFirstStarTrigCmd = 0;
1382 ULong64_t ulFirstFullGdpbTs = 0;
1387 bAllSectorsMatch = kFALSE;
1392 uFirstStarToken = (*itTrigger[0]).GetStarToken();
1393 usFirstStarDaqCmd = (*itTrigger[0]).GetStarDaqCmd();
1394 usFirstStarTrigCmd = (*itTrigger[0]).GetStarTrigCmd();
1395 ulFirstFullGdpbTs = (*itTrigger[0]).GetFullGdpbTs();
1396 for (UInt_t uGdpb = 1; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1398 || (*itTrigger[uGdpb]).GetStarToken() != uFirstStarToken
1399 || (*itTrigger[uGdpb]).GetStarDaqCmd() != usFirstStarDaqCmd
1400 || (*itTrigger[uGdpb]).GetStarTrigCmd() != usFirstStarTrigCmd) {
1401 bAllSectorsMatch = kFALSE;
1407 if (kTRUE == bAllSectorsMatch) {
1414 Double_t dMeanTriggerGdpbTs = 0;
1415 Double_t dMeanTriggerStarTs = 0;
1416 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1418 dMeanTriggerGdpbTs += (*itTrigger[uGdpb]).GetFullGdpbTs();
1419 dMeanTriggerStarTs += (*itTrigger[uGdpb]).GetFullStarTs();
1422 Long64_t ilTriggerDt =
1423 static_cast<Long64_t
>((*itTrigger[uGdpb]).GetFullGdpbTs())
1424 -
static_cast<Long64_t
>(ulFirstFullGdpbTs);
1429 std::vector<gdpbv100::FullMessage> vTrigMess =
1430 (*itTrigger[uGdpb]).GetGdpbMessages();
1431 for (std::vector<gdpbv100::FullMessage>::iterator itMess =
1433 itMess != vTrigMess.end();
1435 starSubEvent.
AddMsg((*itMess));
1451 && ((*itStatUpdtStart[uGdpb]).
first)
1453 <= (*itTrigger[uGdpb]).GetFullGdpbTs()) {
1454 ++itStatUpdtStart[uGdpb];
1459 --itStatUpdtStart[uGdpb];
1487 UInt_t uNbErrorsInEventGdpb = 0;
1489 && (*itErrorMessStart[uGdpb]).GetFullTimeNs() < dWinBegErrors) {
1490 ++itErrorMessStart[uGdpb];
1493 && (*itErrorMessStart[uGdpb]).GetFullTimeNs() < dWinEnd) {
1496 starSubEvent.
AddMsg((*itErrorMessStart[uGdpb]));
1498 ++itErrorMessStart[uGdpb];
1499 ++uNbErrorsInEventGdpb;
1504 std::vector<gdpbv100::FullMessage>::iterator itFirstMessOutOfDeadtime =
1507 && ((*itMessStart[uGdpb]).GetFullTimeNs() < dDeadEnd
1508 || (*itMessStart[uGdpb]).GetFullTimeNs() < dWinEnd)) {
1509 Double_t dMessTime = (*itMessStart[uGdpb]).GetFullTimeNs();
1524 * (*itTrigger[uGdpb]).GetFullGdpbTs());
1527 == (*itMessStart[uGdpb]).getMessageType()) {
1528 UInt_t uTot = (*itMessStart[uGdpb]).getGdpbHit32Tot();
1529 Double_t dTimeDiff = dMessTime
1531 * (*itTrigger[uGdpb]).GetFullGdpbTs();
1533 && TMath::Abs(dTimeDiff) < 20e3)
1540 if (dWinBeg < dMessTime && dMessTime < dWinEnd) {
1541 starSubEvent.
AddMsg((*itMessStart[uGdpb]));
1547 * (*itTrigger[uGdpb]).GetFullGdpbTs());
1552 * (*itTrigger[uGdpb]).GetFullGdpbTs(),
1557 * (*itTrigger[uGdpb]).GetFullGdpbTs(),
1558 usFirstStarTrigCmd);
1564 if (dMessTime < dDeadEnd) ++itFirstMessOutOfDeadtime;
1566 ++itMessStart[uGdpb];
1568 itMessStart[uGdpb] = itFirstMessOutOfDeadtime;
1578 static_cast<ULong64_t
>(dMeanTriggerGdpbTs),
1579 static_cast<ULong64_t
>(dMeanTriggerStarTs),
1582 usFirstStarTrigCmd);
1591 std::vector<CbmTofStarTrigger2019>::iterator itEarliestTrigger;
1592 ULong64_t ulEarliestGdpbTs = 0xFFFFFFFFFFFFFFFFUL;
1593 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1595 && ((*itTrigger[uGdpb]).GetFullGdpbTs() < ulEarliestGdpbTs
1596 || 0xFFFFFFFFFFFFFFFFUL
1597 == (*itTrigger[uGdpb]).GetFullGdpbTs())) {
1598 itEarliestTrigger = itTrigger[uGdpb];
1599 ulEarliestGdpbTs = (*itTrigger[uGdpb]).GetFullGdpbTs();
1602 UInt_t uEarliestStarToken = (*itEarliestTrigger).GetStarToken();
1603 UShort_t usEarliestStarDaqCmd = (*itEarliestTrigger).GetStarDaqCmd();
1604 UShort_t usEarliestStarTrigCmd = (*itEarliestTrigger).GetStarTrigCmd();
1605 ULong64_t ulEarliestFullGdpbTs = (*itEarliestTrigger).GetFullGdpbTs();
1608 UInt_t uNrOfMatchedGdpbs = 0;
1609 std::vector<Bool_t> vbMatchingTrigger(
fuNrOfGdpbs, kFALSE);
1610 Double_t dMeanTriggerGdpbTs = 0;
1611 Double_t dMeanTriggerStarTs = 0;
1612 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1614 && (*itTrigger[uGdpb]).GetStarToken() == uEarliestStarToken
1615 && (*itTrigger[uGdpb]).GetStarDaqCmd() == usEarliestStarDaqCmd
1616 && (*itTrigger[uGdpb]).GetStarTrigCmd() == usEarliestStarTrigCmd) {
1617 uNrOfMatchedGdpbs++;
1618 vbMatchingTrigger[uGdpb] = kTRUE;
1621 Long64_t ilTriggerDt =
1622 static_cast<Long64_t
>((*itTrigger[uGdpb]).GetFullGdpbTs())
1623 -
static_cast<Long64_t
>(ulEarliestFullGdpbTs);
1627 dMeanTriggerGdpbTs += (*itTrigger[uGdpb]).GetFullGdpbTs();
1628 dMeanTriggerStarTs += (*itTrigger[uGdpb]).GetFullStarTs();
1633 dMeanTriggerGdpbTs /= uNrOfMatchedGdpbs;
1634 dMeanTriggerStarTs /= uNrOfMatchedGdpbs;
1636 static_cast<ULong64_t
>(dMeanTriggerGdpbTs),
1637 static_cast<ULong64_t
>(dMeanTriggerStarTs),
1638 (*itEarliestTrigger).GetStarToken(),
1639 (*itEarliestTrigger).GetStarDaqCmd(),
1640 (*itEarliestTrigger).GetStarTrigCmd());
1649 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1653 ULong64_t ulTriggerTime =
static_cast<ULong64_t
>(dMeanTriggerGdpbTs);
1654 if (kTRUE == vbMatchingTrigger[uGdpb]) {
1656 ulTriggerTime = (*itTrigger[uGdpb]).GetFullGdpbTs();
1659 std::vector<gdpbv100::FullMessage> vTrigMess =
1660 (*itTrigger[uGdpb]).GetGdpbMessages();
1661 for (std::vector<gdpbv100::FullMessage>::iterator itMess =
1663 itMess != vTrigMess.end();
1665 starSubEvent.
AddMsg((*itMess));
1681 && ((*itStatUpdtStart[uGdpb]).
first)
1684 ++itStatUpdtStart[uGdpb];
1689 --itStatUpdtStart[uGdpb];
1709 UInt_t uNbErrorsInEventGdpb = 0;
1711 && (*itErrorMessStart[uGdpb]).GetFullTimeNs() < dWinBegErrors) {
1712 ++itErrorMessStart[uGdpb];
1715 && (*itErrorMessStart[uGdpb]).GetFullTimeNs() < dWinEnd) {
1718 starSubEvent.
AddMsg((*itErrorMessStart[uGdpb]));
1720 ++itErrorMessStart[uGdpb];
1721 ++uNbErrorsInEventGdpb;
1726 std::vector<gdpbv100::FullMessage>::iterator itFirstMessOutOfDeadtime =
1729 && ((*itMessStart[uGdpb]).GetFullTimeNs() < dDeadEnd
1730 || (*itMessStart[uGdpb]).GetFullTimeNs() < dWinEnd)) {
1731 Double_t dMessTime = (*itMessStart[uGdpb]).GetFullTimeNs();
1746 == (*itMessStart[uGdpb]).getMessageType()) {
1747 UInt_t uTot = (*itMessStart[uGdpb]).getGdpbHit32Tot();
1748 Double_t dTimeDiff =
1751 && TMath::Abs(dTimeDiff) < 20e3)
1757 if (dWinBeg < dMessTime && dMessTime < dWinEnd) {
1758 starSubEvent.
AddMsg((*itMessStart[uGdpb]));
1766 usEarliestStarDaqCmd);
1769 usEarliestStarTrigCmd);
1775 if (dMessTime < dDeadEnd) ++itFirstMessOutOfDeadtime;
1777 ++itMessStart[uGdpb];
1779 itMessStart[uGdpb] = itFirstMessOutOfDeadtime;
1782 if (kTRUE == vbMatchingTrigger[uGdpb]) ++itTrigger[uGdpb];
1790 bAllSectAllTriggDone = kTRUE;
1791 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1794 bAllSectAllTriggDone = kFALSE;
1807 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
1809 std::string sFolder = Form(
"sector%2u", uSector);
1811 LOG(info) <<
"gDPB " << uGdpb <<
" is " << sFolder;
1814 new TH1D(Form(
"hHitsTimeToTriggerRawSect%2u", uSector),
1815 Form(
"Time to trigger for all neighboring hits in sector %2u; t "
1816 "- Ttrigg [ns]; Hits []",
1823 Double_t dMaxDtSel =
1826 new TH1D(Form(
"hHitsTimeToTriggerSelSect%2u", uSector),
1827 Form(
"Time to trigger for all selected hits in sector %2u; t - "
1828 "Ttrigg [ns]; Hits []",
1840 Form(
"hHitsTimeToTriggerRawPulserSect%2u", uSector),
1841 Form(
"Time to trigger for all neighboring hits within pulser TOT range "
1842 "in sector %2u; t - Ttrigg [ns]; TOT [bins]; Hits []",
1852 new TH2D(Form(
"hHitsTimeToTriggerSelVsDaqSect%2u", uSector),
1853 Form(
"Time to trigger for all selected hits vs DAQ CMD in "
1854 "sector %2u; t - Ttrigg [ns]; DAQ CMD []; Hits []",
1864 new TH2D(Form(
"hHitsTimeToTriggerSelVsTrigSect%2u", uSector),
1865 Form(
"Time to trigger for all selected hits vs TRIG CMD in "
1866 "sector %2u; t - Ttrigg [ns]; TRIG CMD []; Hits []",
1876 Form(
"hTriggerDtSect%2u", uSector),
1877 Form(
"Trigger time difference between sector %2u and the first sector, "
1878 "full events only; Ttrigg%2u - TtriggRef [Clk]; events []",
1891 new TH1I(Form(
"hTriggerDistInTsSect%2u", uSector),
1892 Form(
"Trigger distribution inside TS in sector %2u; Time in "
1893 "TS [us]; Trigger [];",
1900 new TH1I(Form(
"hTriggerDistInMsSect%2u", uSector),
1901 Form(
"Trigger distribution inside MS in sector %2u; Time in "
1902 "MS [us]; Trigger [];",
1909 new TH1I(Form(
"hMessDistInMsSect%2u", uSector),
1910 Form(
"Messages distribution inside MS in sector %2u; Time in "
1911 "MS [us]; Trigger [];",
1930 "Number of Events per TS; Events []; TS []",
1936 new TH1I(
"hEventSizeDistribution",
1937 "Event size distribution; Event size [byte]; Events []",
1943 "hEventSizeEvolution",
1944 "Event size evolution; Time in run [min]; mean Event size [byte];",
1950 new TH1I(
"hEventNbEvolution",
1951 "Event number evolution; Time in run [min]; Events [];",
1968 "hEventNbDistributionInTs",
1969 "Event number distribution inside TS; Time in TS [us]; Events [];",
1975 new TProfile(
"hEventSizeDistributionInTs",
1976 "Event size distribution inside TS; Time in TS [us]; mean "
1977 "Event size [Byte];",
1983 new TH2I(
"hRawTriggersStats",
1984 "Raw triggers statistics per sector; ; Sector []; Messages []",
1998 "hRawTriggersStatsCore",
1999 "Raw triggers in Core MS statistics per sector; ; Sector []; Messages []",
2013 "Raw triggers in Overlap MS statistics "
2014 "per sector; ; Sector []; Messages []",
2028 "hRawTriggersStatsSel",
2029 "Selected triggers statistics per sector; ; Sector []; Messages []",
2041 new TH2I(
"hMissingTriggersEvolution",
2042 "Missing trigger counts per sector vs time in run; Time in run "
2043 "[min]; Sector []; Missing triggers []",
2067 new TCanvas(
"cTimeToTrigRaw",
"Raw Time to trig for all sectors", w,
h);
2069 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
2080 "cTimeToTrigSel",
"Selected Time to trig for all sectors", w,
h);
2082 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
2094 "cTrigDistMs",
"Trigger time to MS start for all sectors", w,
h);
2096 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
2107 "cMessDistMs",
"Message time to MS start for all sectors", w,
h);
2109 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {
2119 new TCanvas(
"cTriggerStats",
"Trigger statistics per sector", w,
h);
2151 new TCanvas(
"cEvtBuildStats",
"Event building statistics", w,
h);
2203 for (UInt_t uEvent = 0; uEvent < uNbEvents; ++uEvent) {
2205 Double_t dEventTimeSec =
fvEventsBuffer[uEvent].GetEventTimeSec();
2206 Double_t dEventTimeMin = dEventTimeSec / 60.0;
2219 Double_t dEventTimeInTs =
2233 for (UInt_t uGdpb = 0; uGdpb <
fuNrOfGdpbs; ++uGdpb) {