150 LOG(info) <<
"Nr. of STS Modules: " <<
fuNbModules;
154 for (UInt_t uModIdx = 0; uModIdx <
fuNbModules; ++uModIdx) {
157 LOG(info) <<
"Module #" << std::setw(2) << uModIdx <<
" Type " << std::setw(4) <<
fviModuleType[uModIdx]
158 <<
" Address 0x" << std::setw(8) << std::hex <<
fviModAddress[uModIdx] << std::dec;
162 LOG(info) <<
"Nr. of STS DPBs: " <<
fuNrOfDpbs;
165 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
167 LOG(info) <<
"Eq. ID for DPB #" << std::setw(2) << uDpb <<
" = 0x" << std::setw(4) << std::hex
172 LOG(info) <<
"Nr. of FEBs: " <<
fuNbFebs;
185 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
190 for (UInt_t uCrobIdx = 0; uCrobIdx <
fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx) {
196 for (UInt_t uFebIdx = 0; uFebIdx <
fUnpackPar->GetNbFebsPerCrob(); ++uFebIdx) {
243 LOG(fatal) << Form(
"Bad module type for DPB #%02u CROB #%u FEB %02u: %d", uDpb, uCrobIdx, uFebIdx,
253 LOG(fatal) << Form(
"Bad module Index and/or Side for DPB #%02u CROB "
254 "#%u FEB %02u: %d %d",
262 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
263 TString sPrintoutLine = Form(
"DPB #%02u CROB Active ?: ", uDpb);
264 for (UInt_t uCrobIdx = 0; uCrobIdx <
fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx) {
267 LOG(info) << sPrintoutLine;
270 UInt_t uGlobalFebIdx = 0;
271 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
272 for (UInt_t uCrobIdx = 0; uCrobIdx <
fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx) {
273 LOG(info) << Form(
"DPB #%02u CROB #%u: ", uDpb, uCrobIdx);
274 for (UInt_t uFebIdx = 0; uFebIdx <
fUnpackPar->GetNbFebsPerCrob(); ++uFebIdx) {
276 LOG(info) << Form(
" FEB #%02u (%02u): Mod. Idx = %03d Side %c (%2d) Type %c "
277 "(%2d) (Addr. 0x%08x) ADC gain %4.0f e- ADC Offs %5.0f e-",
284 LOG(info) << Form(
"Disabled FEB #%02u (%02u): Mod. Idx = %03d Side %c (%2d) Type %c "
285 "(%2d) (Addr. 0x%08x) ADC gain %4.0f e- ADC Offs %5.0f e-",
296 if (
fbBinningFw) LOG(info) <<
"Unpacking data in bin sorter FW mode";
298 LOG(info) <<
"Unpacking data in full time sorter FW mode (legacy)";
303 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
312 for (UInt_t uAsicIdx = 0; uAsicIdx <
fuNbStsXyters; ++uAsicIdx) {
968 new TH1I(
"hStsDigisTimeInRun",
"Digis Nb vs Time in Run; Time in run [s]; Digis Nb []", 36000, 0, 3600);
971 fhVectorSize =
new TH1I(
"fhVectorSize",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
973 new TH1I(
"fhVectorCapacity",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
978 fhMsCntEvo =
new TH1I(
"fhMsCntEvo",
"; MS index [s]; Counts []", 600, 0.0, 600.0);
981 fhMsErrorsEvo =
new TH2I(
"fhMsErrorsEvo",
"; MS index [s]; Error type []; Counts []", 600, 0.0, 600.0, 4, -0.5, 3.5);
992 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
994 UInt_t uSector = fUnpackPar->GetGdpbToSectorOffset() + uGdpb;
995 std::string sFolder = Form( "sector%2u", uSector);
997 LOG(info) << "gDPB " << uGdpb << " is " << sFolder;
999 fvhHitsTimeToTriggerRaw.push_back( new TH1D(
1000 Form( "hHitsTimeToTriggerRawSect%2u", uSector ),
1001 Form( "Time to trigger for all neighboring hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
1002 2000, -5000, 5000 ) );
1004 UInt_t uNbBinsDtSel = fdStarTriggerWinSize[ uGdpb ];
1005 Double_t dMaxDtSel = fdStarTriggerDelay[ uGdpb ] + fdStarTriggerWinSize[ uGdpb ];
1006 fvhHitsTimeToTriggerSel.push_back( new TH1D(
1007 Form( "hHitsTimeToTriggerSelSect%2u", uSector ),
1008 Form( "Time to trigger for all selected hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
1009 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel ) );
1012 AddHistoToVector( fvhHitsTimeToTriggerRaw[ uGdpb ], sFolder );
1013 AddHistoToVector( fvhHitsTimeToTriggerSel[ uGdpb ], sFolder );
1015 if( kTRUE == fbDebugMonitorMode )
1017 fvhHitsTimeToTriggerSelVsDaq.push_back( new TH2D(
1018 Form( "hHitsTimeToTriggerSelVsDaqSect%2u", uSector ),
1019 Form( "Time to trigger for all selected hits vs DAQ CMD in sector %2u; t - Ttrigg [ns]; DAQ CMD []; Hits []", uSector ),
1020 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
1023 fvhHitsTimeToTriggerSelVsTrig.push_back( new TH2D(
1024 Form( "hHitsTimeToTriggerSelVsTrigSect%2u", uSector ),
1025 Form( "Time to trigger for all selected hits vs TRIG CMD in sector %2u; t - Ttrigg [ns]; TRIG CMD []; Hits []", uSector ),
1026 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
1029 fvhTriggerDt.push_back( new TH1I(
1030 Form( "hTriggerDtSect%2u", uSector ),
1031 Form( "Trigger time difference between sector %2u and the first sector, full events only; Ttrigg%2u - TtriggRef [Clk]; events []",
1037 UInt_t uNbBinsInTs = fdMsSizeInNs * 111 / 1000. / 10.;
1038 UInt_t uNbBinsInMs = fdMsSizeInNs * 20 / 1000. / 10.;
1040 fvhTriggerDistributionInTs.push_back( new TH1I( Form( "hTriggerDistInTsSect%2u", uSector ),
1041 Form( "Trigger distribution inside TS in sector %2u; Time in TS [us]; Trigger [];", uSector ),
1042 uNbBinsInTs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 101 / 1000. - 0.5 ) );
1044 fvhTriggerDistributionInMs.push_back( new TH1I( Form( "hTriggerDistInMsSect%2u", uSector ),
1045 Form( "Trigger distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
1046 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
1048 fvhMessDistributionInMs.push_back( new TH1I( Form( "hMessDistInMsSect%2u", uSector ),
1049 Form( "Messages distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
1050 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
1053 AddHistoToVector( fvhHitsTimeToTriggerSelVsDaq[ uGdpb ], sFolder );
1054 AddHistoToVector( fvhHitsTimeToTriggerSelVsTrig[ uGdpb ], sFolder );
1055 AddHistoToVector( fvhTriggerDt[ uGdpb ], sFolder );
1056 AddHistoToVector( fvhTriggerDistributionInTs[ uGdpb ], sFolder );
1057 AddHistoToVector( fvhTriggerDistributionInMs[ uGdpb ], sFolder );
1058 AddHistoToVector( fvhMessDistributionInMs[ uGdpb ], sFolder );
1059 } // if( kTRUE == fbDebugMonitorMode )
1060 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1063 fhEventNbPerTs = new TH1I( "hEventNbPerTs",
1064 "Number of Events per TS; Events []; TS []",
1067 fhEventSizeDistribution = new TH1I( "hEventSizeDistribution",
1068 "Event size distribution; Event size [byte]; Events []",
1069 CbmTofStarSubevent2019::GetMaxOutputSize()/8 , 0, CbmTofStarSubevent2019::GetMaxOutputSize() );
1071 fhEventSizeEvolution = new TProfile( "hEventSizeEvolution",
1072 "Event size evolution; Time in run [min]; mean Event size [byte];",
1075 fhEventNbEvolution = new TH1I( "hEventNbEvolution",
1076 "Event number evolution; Time in run [min]; Events [];",
1080 AddHistoToVector( fhEventNbPerTs, "eventbuilder" );
1081 AddHistoToVector( fhEventSizeDistribution, "eventbuilder" );
1082 AddHistoToVector( fhEventSizeEvolution, "eventbuilder" );
1083 AddHistoToVector( fhEventNbEvolution, "eventbuilder" );
1085 if( kTRUE == fbDebugMonitorMode )
1089 UInt_t uNbBinsInTs = fdMsSizeInNs * 101 / 1000. / 10.;
1091 fhEventNbDistributionInTs = new TH1I( "hEventNbDistributionInTs",
1092 "Event number distribution inside TS; Time in TS [us]; Events [];",
1093 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
1095 fhEventSizeDistributionInTs = new TProfile( "hEventSizeDistributionInTs",
1096 "Event size distribution inside TS; Time in TS [us]; mean Event size [Byte];",
1097 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
1099 fhRawTriggersStats = new TH2I(
1100 "hRawTriggersStats",
1101 "Raw triggers statistics per sector; ; Sector []; Messages []",
1104 fhRawTriggersStats->GetXaxis()->SetBinLabel( 1, "A");
1105 fhRawTriggersStats->GetXaxis()->SetBinLabel( 2, "B");
1106 fhRawTriggersStats->GetXaxis()->SetBinLabel( 3, "C");
1107 fhRawTriggersStats->GetXaxis()->SetBinLabel( 4, "D");
1108 fhRawTriggersStats->GetXaxis()->SetBinLabel( 5, "F");
1110 fhMissingTriggersEvolution = new TH2I(
1111 "hMissingTriggersEvolution",
1112 "Missing trigger counts per sector vs time in run; Time in run [min]; Sector []; Missing triggers []",
1117 AddHistoToVector( fhEventNbDistributionInTs, "eventbuilder" );
1118 AddHistoToVector( fhEventSizeDistributionInTs, "eventbuilder" );
1119 AddHistoToVector( fhRawTriggersStats, "eventbuilder" );
1120 AddHistoToVector( fhMissingTriggersEvolution, "eventbuilder" );
1121 } // if( kTRUE == fbDebugMonitorMode )
1128 fcTimeToTrigRaw = new TCanvas( "cTimeToTrigRaw", "Raw Time to trig for all sectors", w, h);
1129 fcTimeToTrigRaw->Divide( 2, fuNrOfGdpbs / 2 );
1130 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1132 fcTimeToTrigRaw->cd( 1 + uGdpb );
1136 fvhHitsTimeToTriggerRaw[ uGdpb ]->Draw();
1137 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1140 fcTimeToTrigSel = new TCanvas( "cTimeToTrigSel", "Selected Time to trig for all sectors", w, h);
1141 fcTimeToTrigSel->Divide( 2, fuNrOfGdpbs / 2 );
1142 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1144 fcTimeToTrigSel->cd( 1 + uGdpb );
1148 fvhHitsTimeToTriggerSel[ uGdpb ]->Draw();
1149 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1151 if( kTRUE == fbDebugMonitorMode )
1154 fcTrigDistMs = new TCanvas( "cTrigDistMs", "Trigger time to MS start for all sectors", w, h);
1155 fcTrigDistMs->Divide( 2, fuNrOfGdpbs / 2 );
1156 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1158 fcTrigDistMs->cd( 1 + uGdpb );
1162 fvhTriggerDistributionInMs[ uGdpb ]->Draw();
1163 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1166 fcMessDistMs = new TCanvas( "cMessDistMs", "Message time to MS start for all sectors", w, h);
1167 fcMessDistMs->Divide( 2, fuNrOfGdpbs / 2 );
1168 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1170 fcMessDistMs->cd( 1 + uGdpb );
1174 fvhMessDistributionInMs[ uGdpb ]->Draw();
1175 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1176 } // if( kTRUE == fbDebugMonitorMode )
1179 fcEventBuildStats = new TCanvas( "cEvtBuildStats", "Event building statistics", w, h);
1180 if( kTRUE == fbDebugMonitorMode )
1181 fcEventBuildStats->Divide( 2, 3 );
1182 else fcEventBuildStats->Divide( 2, 2 );
1184 fcEventBuildStats->cd( 1 );
1188 fhEventNbPerTs->Draw();
1190 fcEventBuildStats->cd( 2 );
1194 fhEventSizeDistribution->Draw();
1196 fcEventBuildStats->cd( 3 );
1200 fhEventSizeEvolution->Draw();
1202 fcEventBuildStats->cd( 4 );
1206 fhEventNbEvolution->Draw();
1208 if( kTRUE == fbDebugMonitorMode )
1210 fcEventBuildStats->cd( 5 );
1214 fhEventNbDistributionInTs->Draw();
1216 fcEventBuildStats->cd( 6 );
1220 fhEventSizeDistributionInTs->Draw();
1221 } // if( kTRUE == fbDebugMonitorMode )
1223 AddCanvasToVector( fcEventBuildStats, "canvases" );