152 LOG(info) <<
"Nr. of STS Modules: " <<
fuNbModules;
156 for (UInt_t uModIdx = 0; uModIdx <
fuNbModules; ++uModIdx) {
159 LOG(info) <<
"Module #" << std::setw(2) << uModIdx <<
" Type " << std::setw(4) <<
fviModuleType[uModIdx]
160 <<
" Address 0x" << std::setw(8) << std::hex <<
fviModAddress[uModIdx] << std::dec;
164 LOG(info) <<
"Nr. of STS DPBs: " <<
fuNrOfDpbs;
167 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
169 LOG(info) <<
"Eq. ID for DPB #" << std::setw(2) << uDpb <<
" = 0x" << std::setw(4) << std::hex
174 LOG(info) <<
"Nr. of FEBs: " <<
fuNbFebs;
187 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
245 LOG(fatal) << Form(
"Bad module type for DPB #%02u CROB #%u FEB %02u: %d", uDpb, uCrobIdx, uFebIdx,
255 LOG(fatal) << Form(
"Bad module Index and/or Side for DPB #%02u CROB "
256 "#%u FEB %02u: %d %d",
264 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
265 TString sPrintoutLine = Form(
"DPB #%02u CROB Active ?: ", uDpb);
269 LOG(info) << sPrintoutLine;
272 UInt_t uGlobalFebIdx = 0;
273 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
275 LOG(info) << Form(
"DPB #%02u CROB #%u: ", uDpb, uCrobIdx);
278 LOG(info) << Form(
" FEB #%02u (%02u): Mod. Idx = %03d Side %c (%2d) Type %c "
279 "(%2d) (Addr. 0x%08x) ADC gain %4.0f e- ADC Offs %5.0f e-",
286 LOG(info) << Form(
"Disabled FEB #%02u (%02u): Mod. Idx = %03d Side %c (%2d) Type %c "
287 "(%2d) (Addr. 0x%08x) ADC gain %4.0f e- ADC Offs %5.0f e-",
298 if (
fbBinningFw) LOG(info) <<
"Unpacking data in bin sorter FW mode";
300 LOG(info) <<
"Unpacking data in full time sorter FW mode (legacy)";
305 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
314 for (UInt_t uAsicIdx = 0; uAsicIdx <
fuNbStsXyters; ++uAsicIdx) {
970 new TH1I(
"hStsDigisTimeInRun",
"Digis Nb vs Time in Run; Time in run [s]; Digis Nb []", 36000, 0, 3600);
973 fhVectorSize =
new TH1I(
"fhVectorSize",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
975 new TH1I(
"fhVectorCapacity",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
980 fhMsCntEvo =
new TH1I(
"fhMsCntEvo",
"; MS index [s]; Counts []", 600, 0.0, 600.0);
983 fhMsErrorsEvo =
new TH2I(
"fhMsErrorsEvo",
"; MS index [s]; Error type []; Counts []", 600, 0.0, 600.0, 4, -0.5, 3.5);
994 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
996 UInt_t uSector = fUnpackPar->GetGdpbToSectorOffset() + uGdpb;
997 std::string sFolder = Form( "sector%2u", uSector);
999 LOG(info) << "gDPB " << uGdpb << " is " << sFolder;
1001 fvhHitsTimeToTriggerRaw.push_back( new TH1D(
1002 Form( "hHitsTimeToTriggerRawSect%2u", uSector ),
1003 Form( "Time to trigger for all neighboring hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
1004 2000, -5000, 5000 ) );
1006 UInt_t uNbBinsDtSel = fdStarTriggerWinSize[ uGdpb ];
1007 Double_t dMaxDtSel = fdStarTriggerDelay[ uGdpb ] + fdStarTriggerWinSize[ uGdpb ];
1008 fvhHitsTimeToTriggerSel.push_back( new TH1D(
1009 Form( "hHitsTimeToTriggerSelSect%2u", uSector ),
1010 Form( "Time to trigger for all selected hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
1011 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel ) );
1014 AddHistoToVector( fvhHitsTimeToTriggerRaw[ uGdpb ], sFolder );
1015 AddHistoToVector( fvhHitsTimeToTriggerSel[ uGdpb ], sFolder );
1017 if( kTRUE == fbDebugMonitorMode )
1019 fvhHitsTimeToTriggerSelVsDaq.push_back( new TH2D(
1020 Form( "hHitsTimeToTriggerSelVsDaqSect%2u", uSector ),
1021 Form( "Time to trigger for all selected hits vs DAQ CMD in sector %2u; t - Ttrigg [ns]; DAQ CMD []; Hits []", uSector ),
1022 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
1025 fvhHitsTimeToTriggerSelVsTrig.push_back( new TH2D(
1026 Form( "hHitsTimeToTriggerSelVsTrigSect%2u", uSector ),
1027 Form( "Time to trigger for all selected hits vs TRIG CMD in sector %2u; t - Ttrigg [ns]; TRIG CMD []; Hits []", uSector ),
1028 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
1031 fvhTriggerDt.push_back( new TH1I(
1032 Form( "hTriggerDtSect%2u", uSector ),
1033 Form( "Trigger time difference between sector %2u and the first sector, full events only; Ttrigg%2u - TtriggRef [Clk]; events []",
1039 UInt_t uNbBinsInTs = fdMsSizeInNs * 111 / 1000. / 10.;
1040 UInt_t uNbBinsInMs = fdMsSizeInNs * 20 / 1000. / 10.;
1042 fvhTriggerDistributionInTs.push_back( new TH1I( Form( "hTriggerDistInTsSect%2u", uSector ),
1043 Form( "Trigger distribution inside TS in sector %2u; Time in TS [us]; Trigger [];", uSector ),
1044 uNbBinsInTs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 101 / 1000. - 0.5 ) );
1046 fvhTriggerDistributionInMs.push_back( new TH1I( Form( "hTriggerDistInMsSect%2u", uSector ),
1047 Form( "Trigger distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
1048 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
1050 fvhMessDistributionInMs.push_back( new TH1I( Form( "hMessDistInMsSect%2u", uSector ),
1051 Form( "Messages distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
1052 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
1055 AddHistoToVector( fvhHitsTimeToTriggerSelVsDaq[ uGdpb ], sFolder );
1056 AddHistoToVector( fvhHitsTimeToTriggerSelVsTrig[ uGdpb ], sFolder );
1057 AddHistoToVector( fvhTriggerDt[ uGdpb ], sFolder );
1058 AddHistoToVector( fvhTriggerDistributionInTs[ uGdpb ], sFolder );
1059 AddHistoToVector( fvhTriggerDistributionInMs[ uGdpb ], sFolder );
1060 AddHistoToVector( fvhMessDistributionInMs[ uGdpb ], sFolder );
1061 } // if( kTRUE == fbDebugMonitorMode )
1062 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1065 fhEventNbPerTs = new TH1I( "hEventNbPerTs",
1066 "Number of Events per TS; Events []; TS []",
1069 fhEventSizeDistribution = new TH1I( "hEventSizeDistribution",
1070 "Event size distribution; Event size [byte]; Events []",
1071 CbmTofStarSubevent2019::GetMaxOutputSize()/8 , 0, CbmTofStarSubevent2019::GetMaxOutputSize() );
1073 fhEventSizeEvolution = new TProfile( "hEventSizeEvolution",
1074 "Event size evolution; Time in run [min]; mean Event size [byte];",
1077 fhEventNbEvolution = new TH1I( "hEventNbEvolution",
1078 "Event number evolution; Time in run [min]; Events [];",
1082 AddHistoToVector( fhEventNbPerTs, "eventbuilder" );
1083 AddHistoToVector( fhEventSizeDistribution, "eventbuilder" );
1084 AddHistoToVector( fhEventSizeEvolution, "eventbuilder" );
1085 AddHistoToVector( fhEventNbEvolution, "eventbuilder" );
1087 if( kTRUE == fbDebugMonitorMode )
1091 UInt_t uNbBinsInTs = fdMsSizeInNs * 101 / 1000. / 10.;
1093 fhEventNbDistributionInTs = new TH1I( "hEventNbDistributionInTs",
1094 "Event number distribution inside TS; Time in TS [us]; Events [];",
1095 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
1097 fhEventSizeDistributionInTs = new TProfile( "hEventSizeDistributionInTs",
1098 "Event size distribution inside TS; Time in TS [us]; mean Event size [Byte];",
1099 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
1101 fhRawTriggersStats = new TH2I(
1102 "hRawTriggersStats",
1103 "Raw triggers statistics per sector; ; Sector []; Messages []",
1106 fhRawTriggersStats->GetXaxis()->SetBinLabel( 1, "A");
1107 fhRawTriggersStats->GetXaxis()->SetBinLabel( 2, "B");
1108 fhRawTriggersStats->GetXaxis()->SetBinLabel( 3, "C");
1109 fhRawTriggersStats->GetXaxis()->SetBinLabel( 4, "D");
1110 fhRawTriggersStats->GetXaxis()->SetBinLabel( 5, "F");
1112 fhMissingTriggersEvolution = new TH2I(
1113 "hMissingTriggersEvolution",
1114 "Missing trigger counts per sector vs time in run; Time in run [min]; Sector []; Missing triggers []",
1119 AddHistoToVector( fhEventNbDistributionInTs, "eventbuilder" );
1120 AddHistoToVector( fhEventSizeDistributionInTs, "eventbuilder" );
1121 AddHistoToVector( fhRawTriggersStats, "eventbuilder" );
1122 AddHistoToVector( fhMissingTriggersEvolution, "eventbuilder" );
1123 } // if( kTRUE == fbDebugMonitorMode )
1130 fcTimeToTrigRaw = new TCanvas( "cTimeToTrigRaw", "Raw Time to trig for all sectors", w, h);
1131 fcTimeToTrigRaw->Divide( 2, fuNrOfGdpbs / 2 );
1132 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1134 fcTimeToTrigRaw->cd( 1 + uGdpb );
1138 fvhHitsTimeToTriggerRaw[ uGdpb ]->Draw();
1139 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1142 fcTimeToTrigSel = new TCanvas( "cTimeToTrigSel", "Selected Time to trig for all sectors", w, h);
1143 fcTimeToTrigSel->Divide( 2, fuNrOfGdpbs / 2 );
1144 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1146 fcTimeToTrigSel->cd( 1 + uGdpb );
1150 fvhHitsTimeToTriggerSel[ uGdpb ]->Draw();
1151 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1153 if( kTRUE == fbDebugMonitorMode )
1156 fcTrigDistMs = new TCanvas( "cTrigDistMs", "Trigger time to MS start for all sectors", w, h);
1157 fcTrigDistMs->Divide( 2, fuNrOfGdpbs / 2 );
1158 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1160 fcTrigDistMs->cd( 1 + uGdpb );
1164 fvhTriggerDistributionInMs[ uGdpb ]->Draw();
1165 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1168 fcMessDistMs = new TCanvas( "cMessDistMs", "Message time to MS start for all sectors", w, h);
1169 fcMessDistMs->Divide( 2, fuNrOfGdpbs / 2 );
1170 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1172 fcMessDistMs->cd( 1 + uGdpb );
1176 fvhMessDistributionInMs[ uGdpb ]->Draw();
1177 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1178 } // if( kTRUE == fbDebugMonitorMode )
1181 fcEventBuildStats = new TCanvas( "cEvtBuildStats", "Event building statistics", w, h);
1182 if( kTRUE == fbDebugMonitorMode )
1183 fcEventBuildStats->Divide( 2, 3 );
1184 else fcEventBuildStats->Divide( 2, 2 );
1186 fcEventBuildStats->cd( 1 );
1190 fhEventNbPerTs->Draw();
1192 fcEventBuildStats->cd( 2 );
1196 fhEventSizeDistribution->Draw();
1198 fcEventBuildStats->cd( 3 );
1202 fhEventSizeEvolution->Draw();
1204 fcEventBuildStats->cd( 4 );
1208 fhEventNbEvolution->Draw();
1210 if( kTRUE == fbDebugMonitorMode )
1212 fcEventBuildStats->cd( 5 );
1216 fhEventNbDistributionInTs->Draw();
1218 fcEventBuildStats->cd( 6 );
1222 fhEventSizeDistributionInTs->Draw();
1223 } // if( kTRUE == fbDebugMonitorMode )
1225 AddCanvasToVector( fcEventBuildStats, "canvases" );