138 LOG(info) <<
"Nr. of STS Modules: " <<
fuNbModules;
141 for (UInt_t uModIdx = 0; uModIdx <
fuNbModules; ++uModIdx) {
143 LOG(info) <<
"Module #" << std::setw(2) << uModIdx <<
" Address 0x" << std::setw(8) << std::hex
148 LOG(info) <<
"Nr. of STS DPBs: " <<
fuNrOfDpbs;
151 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
153 LOG(info) <<
"Eq. ID for DPB #" << std::setw(2) << uDpb <<
" = 0x" << std::setw(4) << std::hex
158 LOG(info) <<
"Nr. of FEBs: " <<
fuNbFebs;
171 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
176 for (UInt_t uCrobIdx = 0; uCrobIdx <
fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx) {
182 for (UInt_t uFebIdx = 0; uFebIdx <
fUnpackPar->GetNbFebsPerCrob(); ++uFebIdx) {
204 LOG(fatal) << Form(
"Bad module Index for DPB #%02u CROB #%u FEB %02u: %d", uDpb, uCrobIdx, uFebIdx,
211 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
212 TString sPrintoutLine = Form(
"DPB #%02u CROB Active ?: ", uDpb);
213 for (UInt_t uCrobIdx = 0; uCrobIdx <
fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx) {
216 LOG(info) << sPrintoutLine;
219 UInt_t uGlobalFebIdx = 0;
220 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
221 for (UInt_t uCrobIdx = 0; uCrobIdx <
fUnpackPar->GetNbCrobsPerDpb(); ++uCrobIdx) {
222 LOG(info) << Form(
"DPB #%02u CROB #%u: ", uDpb, uCrobIdx);
223 for (UInt_t uFebIdx = 0; uFebIdx <
fUnpackPar->GetNbFebsPerCrob(); ++uFebIdx) {
225 LOG(info) << Form(
" FEB #%02u (%02u): Mod. Idx = %03d (Addr. "
226 "0x%08x) ADC gain %4.0f e- ADC Offs %5.0f e-",
238 for (UInt_t uDpb = 0; uDpb <
fuNrOfDpbs; ++uDpb) {
693 new TH1I(
"hStsDigisTimeInRun",
"Digis Nb vs Time in Run; Time in run [s]; Digis Nb []", 36000, 0, 3600);
696 fhVectorSize =
new TH1I(
"fhVectorSize",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
698 new TH1I(
"fhVectorCapacity",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
703 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
705 UInt_t uSector = fUnpackPar->GetGdpbToSectorOffset() + uGdpb;
706 std::string sFolder = Form( "sector%2u", uSector);
708 LOG(info) << "gDPB " << uGdpb << " is " << sFolder;
710 fvhHitsTimeToTriggerRaw.push_back( new TH1D(
711 Form( "hHitsTimeToTriggerRawSect%2u", uSector ),
712 Form( "Time to trigger for all neighboring hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
713 2000, -5000, 5000 ) );
715 UInt_t uNbBinsDtSel = fdStarTriggerWinSize[ uGdpb ];
716 Double_t dMaxDtSel = fdStarTriggerDelay[ uGdpb ] + fdStarTriggerWinSize[ uGdpb ];
717 fvhHitsTimeToTriggerSel.push_back( new TH1D(
718 Form( "hHitsTimeToTriggerSelSect%2u", uSector ),
719 Form( "Time to trigger for all selected hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
720 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel ) );
723 AddHistoToVector( fvhHitsTimeToTriggerRaw[ uGdpb ], sFolder );
724 AddHistoToVector( fvhHitsTimeToTriggerSel[ uGdpb ], sFolder );
726 if( kTRUE == fbDebugMonitorMode )
728 fvhHitsTimeToTriggerSelVsDaq.push_back( new TH2D(
729 Form( "hHitsTimeToTriggerSelVsDaqSect%2u", uSector ),
730 Form( "Time to trigger for all selected hits vs DAQ CMD in sector %2u; t - Ttrigg [ns]; DAQ CMD []; Hits []", uSector ),
731 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
734 fvhHitsTimeToTriggerSelVsTrig.push_back( new TH2D(
735 Form( "hHitsTimeToTriggerSelVsTrigSect%2u", uSector ),
736 Form( "Time to trigger for all selected hits vs TRIG CMD in sector %2u; t - Ttrigg [ns]; TRIG CMD []; Hits []", uSector ),
737 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
740 fvhTriggerDt.push_back( new TH1I(
741 Form( "hTriggerDtSect%2u", uSector ),
742 Form( "Trigger time difference between sector %2u and the first sector, full events only; Ttrigg%2u - TtriggRef [Clk]; events []",
748 UInt_t uNbBinsInTs = fdMsSizeInNs * 111 / 1000. / 10.;
749 UInt_t uNbBinsInMs = fdMsSizeInNs * 20 / 1000. / 10.;
751 fvhTriggerDistributionInTs.push_back( new TH1I( Form( "hTriggerDistInTsSect%2u", uSector ),
752 Form( "Trigger distribution inside TS in sector %2u; Time in TS [us]; Trigger [];", uSector ),
753 uNbBinsInTs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 101 / 1000. - 0.5 ) );
755 fvhTriggerDistributionInMs.push_back( new TH1I( Form( "hTriggerDistInMsSect%2u", uSector ),
756 Form( "Trigger distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
757 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
759 fvhMessDistributionInMs.push_back( new TH1I( Form( "hMessDistInMsSect%2u", uSector ),
760 Form( "Messages distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
761 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
764 AddHistoToVector( fvhHitsTimeToTriggerSelVsDaq[ uGdpb ], sFolder );
765 AddHistoToVector( fvhHitsTimeToTriggerSelVsTrig[ uGdpb ], sFolder );
766 AddHistoToVector( fvhTriggerDt[ uGdpb ], sFolder );
767 AddHistoToVector( fvhTriggerDistributionInTs[ uGdpb ], sFolder );
768 AddHistoToVector( fvhTriggerDistributionInMs[ uGdpb ], sFolder );
769 AddHistoToVector( fvhMessDistributionInMs[ uGdpb ], sFolder );
770 } // if( kTRUE == fbDebugMonitorMode )
771 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
774 fhEventNbPerTs = new TH1I( "hEventNbPerTs",
775 "Number of Events per TS; Events []; TS []",
778 fhEventSizeDistribution = new TH1I( "hEventSizeDistribution",
779 "Event size distribution; Event size [byte]; Events []",
780 CbmTofStarSubevent2019::GetMaxOutputSize()/8 , 0, CbmTofStarSubevent2019::GetMaxOutputSize() );
782 fhEventSizeEvolution = new TProfile( "hEventSizeEvolution",
783 "Event size evolution; Time in run [min]; mean Event size [byte];",
786 fhEventNbEvolution = new TH1I( "hEventNbEvolution",
787 "Event number evolution; Time in run [min]; Events [];",
791 AddHistoToVector( fhEventNbPerTs, "eventbuilder" );
792 AddHistoToVector( fhEventSizeDistribution, "eventbuilder" );
793 AddHistoToVector( fhEventSizeEvolution, "eventbuilder" );
794 AddHistoToVector( fhEventNbEvolution, "eventbuilder" );
796 if( kTRUE == fbDebugMonitorMode )
800 UInt_t uNbBinsInTs = fdMsSizeInNs * 101 / 1000. / 10.;
802 fhEventNbDistributionInTs = new TH1I( "hEventNbDistributionInTs",
803 "Event number distribution inside TS; Time in TS [us]; Events [];",
804 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
806 fhEventSizeDistributionInTs = new TProfile( "hEventSizeDistributionInTs",
807 "Event size distribution inside TS; Time in TS [us]; mean Event size [Byte];",
808 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
810 fhRawTriggersStats = new TH2I(
812 "Raw triggers statistics per sector; ; Sector []; Messages []",
815 fhRawTriggersStats->GetXaxis()->SetBinLabel( 1, "A");
816 fhRawTriggersStats->GetXaxis()->SetBinLabel( 2, "B");
817 fhRawTriggersStats->GetXaxis()->SetBinLabel( 3, "C");
818 fhRawTriggersStats->GetXaxis()->SetBinLabel( 4, "D");
819 fhRawTriggersStats->GetXaxis()->SetBinLabel( 5, "F");
821 fhMissingTriggersEvolution = new TH2I(
822 "hMissingTriggersEvolution",
823 "Missing trigger counts per sector vs time in run; Time in run [min]; Sector []; Missing triggers []",
828 AddHistoToVector( fhEventNbDistributionInTs, "eventbuilder" );
829 AddHistoToVector( fhEventSizeDistributionInTs, "eventbuilder" );
830 AddHistoToVector( fhRawTriggersStats, "eventbuilder" );
831 AddHistoToVector( fhMissingTriggersEvolution, "eventbuilder" );
832 } // if( kTRUE == fbDebugMonitorMode )
839 fcTimeToTrigRaw = new TCanvas( "cTimeToTrigRaw", "Raw Time to trig for all sectors", w, h);
840 fcTimeToTrigRaw->Divide( 2, fuNrOfGdpbs / 2 );
841 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
843 fcTimeToTrigRaw->cd( 1 + uGdpb );
847 fvhHitsTimeToTriggerRaw[ uGdpb ]->Draw();
848 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
851 fcTimeToTrigSel = new TCanvas( "cTimeToTrigSel", "Selected Time to trig for all sectors", w, h);
852 fcTimeToTrigSel->Divide( 2, fuNrOfGdpbs / 2 );
853 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
855 fcTimeToTrigSel->cd( 1 + uGdpb );
859 fvhHitsTimeToTriggerSel[ uGdpb ]->Draw();
860 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
862 if( kTRUE == fbDebugMonitorMode )
865 fcTrigDistMs = new TCanvas( "cTrigDistMs", "Trigger time to MS start for all sectors", w, h);
866 fcTrigDistMs->Divide( 2, fuNrOfGdpbs / 2 );
867 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
869 fcTrigDistMs->cd( 1 + uGdpb );
873 fvhTriggerDistributionInMs[ uGdpb ]->Draw();
874 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
877 fcMessDistMs = new TCanvas( "cMessDistMs", "Message time to MS start for all sectors", w, h);
878 fcMessDistMs->Divide( 2, fuNrOfGdpbs / 2 );
879 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
881 fcMessDistMs->cd( 1 + uGdpb );
885 fvhMessDistributionInMs[ uGdpb ]->Draw();
886 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
887 } // if( kTRUE == fbDebugMonitorMode )
890 fcEventBuildStats = new TCanvas( "cEvtBuildStats", "Event building statistics", w, h);
891 if( kTRUE == fbDebugMonitorMode )
892 fcEventBuildStats->Divide( 2, 3 );
893 else fcEventBuildStats->Divide( 2, 2 );
895 fcEventBuildStats->cd( 1 );
899 fhEventNbPerTs->Draw();
901 fcEventBuildStats->cd( 2 );
905 fhEventSizeDistribution->Draw();
907 fcEventBuildStats->cd( 3 );
911 fhEventSizeEvolution->Draw();
913 fcEventBuildStats->cd( 4 );
917 fhEventNbEvolution->Draw();
919 if( kTRUE == fbDebugMonitorMode )
921 fcEventBuildStats->cd( 5 );
925 fhEventNbDistributionInTs->Draw();
927 fcEventBuildStats->cd( 6 );
931 fhEventSizeDistributionInTs->Draw();
932 } // if( kTRUE == fbDebugMonitorMode )
934 AddCanvasToVector( fcEventBuildStats, "canvases" );