875 new TH1I(
"hMuchDigisTimeInRun",
"Digis Nb vs Time in Run; Time in run [s]; Digis Nb []", 36000, 0, 3600);
878 fhVectorSize =
new TH1I(
"fhVectorSize",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
880 new TH1I(
"fhVectorCapacity",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
886 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
888 UInt_t uSector = fUnpackPar->GetGdpbToSectorOffset() + uGdpb;
889 std::string sFolder = Form( "sector%2u", uSector);
891 LOG(info) << "gDPB " << uGdpb << " is " << sFolder;
893 fvhHitsTimeToTriggerRaw.push_back( new TH1D(
894 Form( "hHitsTimeToTriggerRawSect%2u", uSector ),
895 Form( "Time to trigger for all neighboring hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
896 2000, -5000, 5000 ) );
898 UInt_t uNbBinsDtSel = fdStarTriggerWinSize[ uGdpb ];
899 Double_t dMaxDtSel = fdStarTriggerDelay[ uGdpb ] + fdStarTriggerWinSize[ uGdpb ];
900 fvhHitsTimeToTriggerSel.push_back( new TH1D(
901 Form( "hHitsTimeToTriggerSelSect%2u", uSector ),
902 Form( "Time to trigger for all selected hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
903 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel ) );
906 AddHistoToVector( fvhHitsTimeToTriggerRaw[ uGdpb ], sFolder );
907 AddHistoToVector( fvhHitsTimeToTriggerSel[ uGdpb ], sFolder );
909 if( kTRUE == fbDebugMonitorMode )
911 fvhHitsTimeToTriggerSelVsDaq.push_back( new TH2D(
912 Form( "hHitsTimeToTriggerSelVsDaqSect%2u", uSector ),
913 Form( "Time to trigger for all selected hits vs DAQ CMD in sector %2u; t - Ttrigg [ns]; DAQ CMD []; Hits []", uSector ),
914 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
917 fvhHitsTimeToTriggerSelVsTrig.push_back( new TH2D(
918 Form( "hHitsTimeToTriggerSelVsTrigSect%2u", uSector ),
919 Form( "Time to trigger for all selected hits vs TRIG CMD in sector %2u; t - Ttrigg [ns]; TRIG CMD []; Hits []", uSector ),
920 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
923 fvhTriggerDt.push_back( new TH1I(
924 Form( "hTriggerDtSect%2u", uSector ),
925 Form( "Trigger time difference between sector %2u and the first sector, full events only; Ttrigg%2u - TtriggRef [Clk]; events []",
931 UInt_t uNbBinsInTs = fdMsSizeInNs * 111 / 1000. / 10.;
932 UInt_t uNbBinsInMs = fdMsSizeInNs * 20 / 1000. / 10.;
934 fvhTriggerDistributionInTs.push_back( new TH1I( Form( "hTriggerDistInTsSect%2u", uSector ),
935 Form( "Trigger distribution inside TS in sector %2u; Time in TS [us]; Trigger [];", uSector ),
936 uNbBinsInTs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 101 / 1000. - 0.5 ) );
938 fvhTriggerDistributionInMs.push_back( new TH1I( Form( "hTriggerDistInMsSect%2u", uSector ),
939 Form( "Trigger distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
940 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
942 fvhMessDistributionInMs.push_back( new TH1I( Form( "hMessDistInMsSect%2u", uSector ),
943 Form( "Messages distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
944 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
947 AddHistoToVector( fvhHitsTimeToTriggerSelVsDaq[ uGdpb ], sFolder );
948 AddHistoToVector( fvhHitsTimeToTriggerSelVsTrig[ uGdpb ], sFolder );
949 AddHistoToVector( fvhTriggerDt[ uGdpb ], sFolder );
950 AddHistoToVector( fvhTriggerDistributionInTs[ uGdpb ], sFolder );
951 AddHistoToVector( fvhTriggerDistributionInMs[ uGdpb ], sFolder );
952 AddHistoToVector( fvhMessDistributionInMs[ uGdpb ], sFolder );
953 } // if( kTRUE == fbDebugMonitorMode )
954 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
957 fhEventNbPerTs = new TH1I( "hEventNbPerTs",
958 "Number of Events per TS; Events []; TS []",
961 fhEventSizeDistribution = new TH1I( "hEventSizeDistribution",
962 "Event size distribution; Event size [byte]; Events []",
963 CbmTofStarSubevent2019::GetMaxOutputSize()/8 , 0, CbmTofStarSubevent2019::GetMaxOutputSize() );
965 fhEventSizeEvolution = new TProfile( "hEventSizeEvolution",
966 "Event size evolution; Time in run [min]; mean Event size [byte];",
969 fhEventNbEvolution = new TH1I( "hEventNbEvolution",
970 "Event number evolution; Time in run [min]; Events [];",
974 AddHistoToVector( fhEventNbPerTs, "eventbuilder" );
975 AddHistoToVector( fhEventSizeDistribution, "eventbuilder" );
976 AddHistoToVector( fhEventSizeEvolution, "eventbuilder" );
977 AddHistoToVector( fhEventNbEvolution, "eventbuilder" );
979 if( kTRUE == fbDebugMonitorMode )
983 UInt_t uNbBinsInTs = fdMsSizeInNs * 101 / 1000. / 10.;
985 fhEventNbDistributionInTs = new TH1I( "hEventNbDistributionInTs",
986 "Event number distribution inside TS; Time in TS [us]; Events [];",
987 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
989 fhEventSizeDistributionInTs = new TProfile( "hEventSizeDistributionInTs",
990 "Event size distribution inside TS; Time in TS [us]; mean Event size [Byte];",
991 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
993 fhRawTriggersStats = new TH2I(
995 "Raw triggers statistics per sector; ; Sector []; Messages []",
998 fhRawTriggersStats->GetXaxis()->SetBinLabel( 1, "A");
999 fhRawTriggersStats->GetXaxis()->SetBinLabel( 2, "B");
1000 fhRawTriggersStats->GetXaxis()->SetBinLabel( 3, "C");
1001 fhRawTriggersStats->GetXaxis()->SetBinLabel( 4, "D");
1002 fhRawTriggersStats->GetXaxis()->SetBinLabel( 5, "F");
1004 fhMissingTriggersEvolution = new TH2I(
1005 "hMissingTriggersEvolution",
1006 "Missing trigger counts per sector vs time in run; Time in run [min]; Sector []; Missing triggers []",
1011 AddHistoToVector( fhEventNbDistributionInTs, "eventbuilder" );
1012 AddHistoToVector( fhEventSizeDistributionInTs, "eventbuilder" );
1013 AddHistoToVector( fhRawTriggersStats, "eventbuilder" );
1014 AddHistoToVector( fhMissingTriggersEvolution, "eventbuilder" );
1015 } // if( kTRUE == fbDebugMonitorMode )
1022 fcTimeToTrigRaw = new TCanvas( "cTimeToTrigRaw", "Raw Time to trig for all sectors", w, h);
1023 fcTimeToTrigRaw->Divide( 2, fuNrOfGdpbs / 2 );
1024 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1026 fcTimeToTrigRaw->cd( 1 + uGdpb );
1030 fvhHitsTimeToTriggerRaw[ uGdpb ]->Draw();
1031 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1034 fcTimeToTrigSel = new TCanvas( "cTimeToTrigSel", "Selected Time to trig for all sectors", w, h);
1035 fcTimeToTrigSel->Divide( 2, fuNrOfGdpbs / 2 );
1036 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1038 fcTimeToTrigSel->cd( 1 + uGdpb );
1042 fvhHitsTimeToTriggerSel[ uGdpb ]->Draw();
1043 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1045 if( kTRUE == fbDebugMonitorMode )
1048 fcTrigDistMs = new TCanvas( "cTrigDistMs", "Trigger time to MS start for all sectors", w, h);
1049 fcTrigDistMs->Divide( 2, fuNrOfGdpbs / 2 );
1050 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1052 fcTrigDistMs->cd( 1 + uGdpb );
1056 fvhTriggerDistributionInMs[ uGdpb ]->Draw();
1057 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1060 fcMessDistMs = new TCanvas( "cMessDistMs", "Message time to MS start for all sectors", w, h);
1061 fcMessDistMs->Divide( 2, fuNrOfGdpbs / 2 );
1062 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1064 fcMessDistMs->cd( 1 + uGdpb );
1068 fvhMessDistributionInMs[ uGdpb ]->Draw();
1069 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1070 } // if( kTRUE == fbDebugMonitorMode )
1073 fcEventBuildStats = new TCanvas( "cEvtBuildStats", "Event building statistics", w, h);
1074 if( kTRUE == fbDebugMonitorMode )
1075 fcEventBuildStats->Divide( 2, 3 );
1076 else fcEventBuildStats->Divide( 2, 2 );
1078 fcEventBuildStats->cd( 1 );
1082 fhEventNbPerTs->Draw();
1084 fcEventBuildStats->cd( 2 );
1088 fhEventSizeDistribution->Draw();
1090 fcEventBuildStats->cd( 3 );
1094 fhEventSizeEvolution->Draw();
1096 fcEventBuildStats->cd( 4 );
1100 fhEventNbEvolution->Draw();
1102 if( kTRUE == fbDebugMonitorMode )
1104 fcEventBuildStats->cd( 5 );
1108 fhEventNbDistributionInTs->Draw();
1110 fcEventBuildStats->cd( 6 );
1114 fhEventSizeDistributionInTs->Draw();
1115 } // if( kTRUE == fbDebugMonitorMode )
1117 AddCanvasToVector( fcEventBuildStats, "canvases" );