695 new TH1I(
"hStsDigisTimeInRun",
"Digis Nb vs Time in Run; Time in run [s]; Digis Nb []", 36000, 0, 3600);
698 fhVectorSize =
new TH1I(
"fhVectorSize",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
700 new TH1I(
"fhVectorCapacity",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
705 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
707 UInt_t uSector = fUnpackPar->GetGdpbToSectorOffset() + uGdpb;
708 std::string sFolder = Form( "sector%2u", uSector);
710 LOG(info) << "gDPB " << uGdpb << " is " << sFolder;
712 fvhHitsTimeToTriggerRaw.push_back( new TH1D(
713 Form( "hHitsTimeToTriggerRawSect%2u", uSector ),
714 Form( "Time to trigger for all neighboring hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
715 2000, -5000, 5000 ) );
717 UInt_t uNbBinsDtSel = fdStarTriggerWinSize[ uGdpb ];
718 Double_t dMaxDtSel = fdStarTriggerDelay[ uGdpb ] + fdStarTriggerWinSize[ uGdpb ];
719 fvhHitsTimeToTriggerSel.push_back( new TH1D(
720 Form( "hHitsTimeToTriggerSelSect%2u", uSector ),
721 Form( "Time to trigger for all selected hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
722 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel ) );
725 AddHistoToVector( fvhHitsTimeToTriggerRaw[ uGdpb ], sFolder );
726 AddHistoToVector( fvhHitsTimeToTriggerSel[ uGdpb ], sFolder );
728 if( kTRUE == fbDebugMonitorMode )
730 fvhHitsTimeToTriggerSelVsDaq.push_back( new TH2D(
731 Form( "hHitsTimeToTriggerSelVsDaqSect%2u", uSector ),
732 Form( "Time to trigger for all selected hits vs DAQ CMD in sector %2u; t - Ttrigg [ns]; DAQ CMD []; Hits []", uSector ),
733 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
736 fvhHitsTimeToTriggerSelVsTrig.push_back( new TH2D(
737 Form( "hHitsTimeToTriggerSelVsTrigSect%2u", uSector ),
738 Form( "Time to trigger for all selected hits vs TRIG CMD in sector %2u; t - Ttrigg [ns]; TRIG CMD []; Hits []", uSector ),
739 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
742 fvhTriggerDt.push_back( new TH1I(
743 Form( "hTriggerDtSect%2u", uSector ),
744 Form( "Trigger time difference between sector %2u and the first sector, full events only; Ttrigg%2u - TtriggRef [Clk]; events []",
750 UInt_t uNbBinsInTs = fdMsSizeInNs * 111 / 1000. / 10.;
751 UInt_t uNbBinsInMs = fdMsSizeInNs * 20 / 1000. / 10.;
753 fvhTriggerDistributionInTs.push_back( new TH1I( Form( "hTriggerDistInTsSect%2u", uSector ),
754 Form( "Trigger distribution inside TS in sector %2u; Time in TS [us]; Trigger [];", uSector ),
755 uNbBinsInTs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 101 / 1000. - 0.5 ) );
757 fvhTriggerDistributionInMs.push_back( new TH1I( Form( "hTriggerDistInMsSect%2u", uSector ),
758 Form( "Trigger distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
759 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
761 fvhMessDistributionInMs.push_back( new TH1I( Form( "hMessDistInMsSect%2u", uSector ),
762 Form( "Messages distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
763 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
766 AddHistoToVector( fvhHitsTimeToTriggerSelVsDaq[ uGdpb ], sFolder );
767 AddHistoToVector( fvhHitsTimeToTriggerSelVsTrig[ uGdpb ], sFolder );
768 AddHistoToVector( fvhTriggerDt[ uGdpb ], sFolder );
769 AddHistoToVector( fvhTriggerDistributionInTs[ uGdpb ], sFolder );
770 AddHistoToVector( fvhTriggerDistributionInMs[ uGdpb ], sFolder );
771 AddHistoToVector( fvhMessDistributionInMs[ uGdpb ], sFolder );
772 } // if( kTRUE == fbDebugMonitorMode )
773 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
776 fhEventNbPerTs = new TH1I( "hEventNbPerTs",
777 "Number of Events per TS; Events []; TS []",
780 fhEventSizeDistribution = new TH1I( "hEventSizeDistribution",
781 "Event size distribution; Event size [byte]; Events []",
782 CbmTofStarSubevent2019::GetMaxOutputSize()/8 , 0, CbmTofStarSubevent2019::GetMaxOutputSize() );
784 fhEventSizeEvolution = new TProfile( "hEventSizeEvolution",
785 "Event size evolution; Time in run [min]; mean Event size [byte];",
788 fhEventNbEvolution = new TH1I( "hEventNbEvolution",
789 "Event number evolution; Time in run [min]; Events [];",
793 AddHistoToVector( fhEventNbPerTs, "eventbuilder" );
794 AddHistoToVector( fhEventSizeDistribution, "eventbuilder" );
795 AddHistoToVector( fhEventSizeEvolution, "eventbuilder" );
796 AddHistoToVector( fhEventNbEvolution, "eventbuilder" );
798 if( kTRUE == fbDebugMonitorMode )
802 UInt_t uNbBinsInTs = fdMsSizeInNs * 101 / 1000. / 10.;
804 fhEventNbDistributionInTs = new TH1I( "hEventNbDistributionInTs",
805 "Event number distribution inside TS; Time in TS [us]; Events [];",
806 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
808 fhEventSizeDistributionInTs = new TProfile( "hEventSizeDistributionInTs",
809 "Event size distribution inside TS; Time in TS [us]; mean Event size [Byte];",
810 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
812 fhRawTriggersStats = new TH2I(
814 "Raw triggers statistics per sector; ; Sector []; Messages []",
817 fhRawTriggersStats->GetXaxis()->SetBinLabel( 1, "A");
818 fhRawTriggersStats->GetXaxis()->SetBinLabel( 2, "B");
819 fhRawTriggersStats->GetXaxis()->SetBinLabel( 3, "C");
820 fhRawTriggersStats->GetXaxis()->SetBinLabel( 4, "D");
821 fhRawTriggersStats->GetXaxis()->SetBinLabel( 5, "F");
823 fhMissingTriggersEvolution = new TH2I(
824 "hMissingTriggersEvolution",
825 "Missing trigger counts per sector vs time in run; Time in run [min]; Sector []; Missing triggers []",
830 AddHistoToVector( fhEventNbDistributionInTs, "eventbuilder" );
831 AddHistoToVector( fhEventSizeDistributionInTs, "eventbuilder" );
832 AddHistoToVector( fhRawTriggersStats, "eventbuilder" );
833 AddHistoToVector( fhMissingTriggersEvolution, "eventbuilder" );
834 } // if( kTRUE == fbDebugMonitorMode )
841 fcTimeToTrigRaw = new TCanvas( "cTimeToTrigRaw", "Raw Time to trig for all sectors", w, h);
842 fcTimeToTrigRaw->Divide( 2, fuNrOfGdpbs / 2 );
843 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
845 fcTimeToTrigRaw->cd( 1 + uGdpb );
849 fvhHitsTimeToTriggerRaw[ uGdpb ]->Draw();
850 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
853 fcTimeToTrigSel = new TCanvas( "cTimeToTrigSel", "Selected Time to trig for all sectors", w, h);
854 fcTimeToTrigSel->Divide( 2, fuNrOfGdpbs / 2 );
855 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
857 fcTimeToTrigSel->cd( 1 + uGdpb );
861 fvhHitsTimeToTriggerSel[ uGdpb ]->Draw();
862 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
864 if( kTRUE == fbDebugMonitorMode )
867 fcTrigDistMs = new TCanvas( "cTrigDistMs", "Trigger time to MS start for all sectors", w, h);
868 fcTrigDistMs->Divide( 2, fuNrOfGdpbs / 2 );
869 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
871 fcTrigDistMs->cd( 1 + uGdpb );
875 fvhTriggerDistributionInMs[ uGdpb ]->Draw();
876 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
879 fcMessDistMs = new TCanvas( "cMessDistMs", "Message time to MS start for all sectors", w, h);
880 fcMessDistMs->Divide( 2, fuNrOfGdpbs / 2 );
881 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
883 fcMessDistMs->cd( 1 + uGdpb );
887 fvhMessDistributionInMs[ uGdpb ]->Draw();
888 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
889 } // if( kTRUE == fbDebugMonitorMode )
892 fcEventBuildStats = new TCanvas( "cEvtBuildStats", "Event building statistics", w, h);
893 if( kTRUE == fbDebugMonitorMode )
894 fcEventBuildStats->Divide( 2, 3 );
895 else fcEventBuildStats->Divide( 2, 2 );
897 fcEventBuildStats->cd( 1 );
901 fhEventNbPerTs->Draw();
903 fcEventBuildStats->cd( 2 );
907 fhEventSizeDistribution->Draw();
909 fcEventBuildStats->cd( 3 );
913 fhEventSizeEvolution->Draw();
915 fcEventBuildStats->cd( 4 );
919 fhEventNbEvolution->Draw();
921 if( kTRUE == fbDebugMonitorMode )
923 fcEventBuildStats->cd( 5 );
927 fhEventNbDistributionInTs->Draw();
929 fcEventBuildStats->cd( 6 );
933 fhEventSizeDistributionInTs->Draw();
934 } // if( kTRUE == fbDebugMonitorMode )
936 AddCanvasToVector( fcEventBuildStats, "canvases" );