877 new TH1I(
"hMuchDigisTimeInRun",
"Digis Nb vs Time in Run; Time in run [s]; Digis Nb []", 36000, 0, 3600);
880 fhVectorSize =
new TH1I(
"fhVectorSize",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
882 new TH1I(
"fhVectorCapacity",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
888 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
890 UInt_t uSector = fUnpackPar->GetGdpbToSectorOffset() + uGdpb;
891 std::string sFolder = Form( "sector%2u", uSector);
893 LOG(info) << "gDPB " << uGdpb << " is " << sFolder;
895 fvhHitsTimeToTriggerRaw.push_back( new TH1D(
896 Form( "hHitsTimeToTriggerRawSect%2u", uSector ),
897 Form( "Time to trigger for all neighboring hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
898 2000, -5000, 5000 ) );
900 UInt_t uNbBinsDtSel = fdStarTriggerWinSize[ uGdpb ];
901 Double_t dMaxDtSel = fdStarTriggerDelay[ uGdpb ] + fdStarTriggerWinSize[ uGdpb ];
902 fvhHitsTimeToTriggerSel.push_back( new TH1D(
903 Form( "hHitsTimeToTriggerSelSect%2u", uSector ),
904 Form( "Time to trigger for all selected hits in sector %2u; t - Ttrigg [ns]; Hits []", uSector ),
905 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel ) );
908 AddHistoToVector( fvhHitsTimeToTriggerRaw[ uGdpb ], sFolder );
909 AddHistoToVector( fvhHitsTimeToTriggerSel[ uGdpb ], sFolder );
911 if( kTRUE == fbDebugMonitorMode )
913 fvhHitsTimeToTriggerSelVsDaq.push_back( new TH2D(
914 Form( "hHitsTimeToTriggerSelVsDaqSect%2u", uSector ),
915 Form( "Time to trigger for all selected hits vs DAQ CMD in sector %2u; t - Ttrigg [ns]; DAQ CMD []; Hits []", uSector ),
916 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
919 fvhHitsTimeToTriggerSelVsTrig.push_back( new TH2D(
920 Form( "hHitsTimeToTriggerSelVsTrigSect%2u", uSector ),
921 Form( "Time to trigger for all selected hits vs TRIG CMD in sector %2u; t - Ttrigg [ns]; TRIG CMD []; Hits []", uSector ),
922 uNbBinsDtSel, fdStarTriggerDelay[ uGdpb ], dMaxDtSel,
925 fvhTriggerDt.push_back( new TH1I(
926 Form( "hTriggerDtSect%2u", uSector ),
927 Form( "Trigger time difference between sector %2u and the first sector, full events only; Ttrigg%2u - TtriggRef [Clk]; events []",
933 UInt_t uNbBinsInTs = fdMsSizeInNs * 111 / 1000. / 10.;
934 UInt_t uNbBinsInMs = fdMsSizeInNs * 20 / 1000. / 10.;
936 fvhTriggerDistributionInTs.push_back( new TH1I( Form( "hTriggerDistInTsSect%2u", uSector ),
937 Form( "Trigger distribution inside TS in sector %2u; Time in TS [us]; Trigger [];", uSector ),
938 uNbBinsInTs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 101 / 1000. - 0.5 ) );
940 fvhTriggerDistributionInMs.push_back( new TH1I( Form( "hTriggerDistInMsSect%2u", uSector ),
941 Form( "Trigger distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
942 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
944 fvhMessDistributionInMs.push_back( new TH1I( Form( "hMessDistInMsSect%2u", uSector ),
945 Form( "Messages distribution inside MS in sector %2u; Time in MS [us]; Trigger [];", uSector ),
946 uNbBinsInMs, -0.5 - fdMsSizeInNs * 10 / 1000., fdMsSizeInNs * 10 / 1000. - 0.5 ) );
949 AddHistoToVector( fvhHitsTimeToTriggerSelVsDaq[ uGdpb ], sFolder );
950 AddHistoToVector( fvhHitsTimeToTriggerSelVsTrig[ uGdpb ], sFolder );
951 AddHistoToVector( fvhTriggerDt[ uGdpb ], sFolder );
952 AddHistoToVector( fvhTriggerDistributionInTs[ uGdpb ], sFolder );
953 AddHistoToVector( fvhTriggerDistributionInMs[ uGdpb ], sFolder );
954 AddHistoToVector( fvhMessDistributionInMs[ uGdpb ], sFolder );
955 } // if( kTRUE == fbDebugMonitorMode )
956 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
959 fhEventNbPerTs = new TH1I( "hEventNbPerTs",
960 "Number of Events per TS; Events []; TS []",
963 fhEventSizeDistribution = new TH1I( "hEventSizeDistribution",
964 "Event size distribution; Event size [byte]; Events []",
965 CbmTofStarSubevent2019::GetMaxOutputSize()/8 , 0, CbmTofStarSubevent2019::GetMaxOutputSize() );
967 fhEventSizeEvolution = new TProfile( "hEventSizeEvolution",
968 "Event size evolution; Time in run [min]; mean Event size [byte];",
971 fhEventNbEvolution = new TH1I( "hEventNbEvolution",
972 "Event number evolution; Time in run [min]; Events [];",
976 AddHistoToVector( fhEventNbPerTs, "eventbuilder" );
977 AddHistoToVector( fhEventSizeDistribution, "eventbuilder" );
978 AddHistoToVector( fhEventSizeEvolution, "eventbuilder" );
979 AddHistoToVector( fhEventNbEvolution, "eventbuilder" );
981 if( kTRUE == fbDebugMonitorMode )
985 UInt_t uNbBinsInTs = fdMsSizeInNs * 101 / 1000. / 10.;
987 fhEventNbDistributionInTs = new TH1I( "hEventNbDistributionInTs",
988 "Event number distribution inside TS; Time in TS [us]; Events [];",
989 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
991 fhEventSizeDistributionInTs = new TProfile( "hEventSizeDistributionInTs",
992 "Event size distribution inside TS; Time in TS [us]; mean Event size [Byte];",
993 uNbBinsInTs, -0.5, fdMsSizeInNs * 101 / 1000. - 0.5 );
995 fhRawTriggersStats = new TH2I(
997 "Raw triggers statistics per sector; ; Sector []; Messages []",
1000 fhRawTriggersStats->GetXaxis()->SetBinLabel( 1, "A");
1001 fhRawTriggersStats->GetXaxis()->SetBinLabel( 2, "B");
1002 fhRawTriggersStats->GetXaxis()->SetBinLabel( 3, "C");
1003 fhRawTriggersStats->GetXaxis()->SetBinLabel( 4, "D");
1004 fhRawTriggersStats->GetXaxis()->SetBinLabel( 5, "F");
1006 fhMissingTriggersEvolution = new TH2I(
1007 "hMissingTriggersEvolution",
1008 "Missing trigger counts per sector vs time in run; Time in run [min]; Sector []; Missing triggers []",
1013 AddHistoToVector( fhEventNbDistributionInTs, "eventbuilder" );
1014 AddHistoToVector( fhEventSizeDistributionInTs, "eventbuilder" );
1015 AddHistoToVector( fhRawTriggersStats, "eventbuilder" );
1016 AddHistoToVector( fhMissingTriggersEvolution, "eventbuilder" );
1017 } // if( kTRUE == fbDebugMonitorMode )
1024 fcTimeToTrigRaw = new TCanvas( "cTimeToTrigRaw", "Raw Time to trig for all sectors", w, h);
1025 fcTimeToTrigRaw->Divide( 2, fuNrOfGdpbs / 2 );
1026 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1028 fcTimeToTrigRaw->cd( 1 + uGdpb );
1032 fvhHitsTimeToTriggerRaw[ uGdpb ]->Draw();
1033 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1036 fcTimeToTrigSel = new TCanvas( "cTimeToTrigSel", "Selected Time to trig for all sectors", w, h);
1037 fcTimeToTrigSel->Divide( 2, fuNrOfGdpbs / 2 );
1038 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1040 fcTimeToTrigSel->cd( 1 + uGdpb );
1044 fvhHitsTimeToTriggerSel[ uGdpb ]->Draw();
1045 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1047 if( kTRUE == fbDebugMonitorMode )
1050 fcTrigDistMs = new TCanvas( "cTrigDistMs", "Trigger time to MS start for all sectors", w, h);
1051 fcTrigDistMs->Divide( 2, fuNrOfGdpbs / 2 );
1052 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1054 fcTrigDistMs->cd( 1 + uGdpb );
1058 fvhTriggerDistributionInMs[ uGdpb ]->Draw();
1059 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1062 fcMessDistMs = new TCanvas( "cMessDistMs", "Message time to MS start for all sectors", w, h);
1063 fcMessDistMs->Divide( 2, fuNrOfGdpbs / 2 );
1064 for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1066 fcMessDistMs->cd( 1 + uGdpb );
1070 fvhMessDistributionInMs[ uGdpb ]->Draw();
1071 } // for( UInt_t uGdpb = 0; uGdpb < fuNrOfGdpbs; ++uGdpb )
1072 } // if( kTRUE == fbDebugMonitorMode )
1075 fcEventBuildStats = new TCanvas( "cEvtBuildStats", "Event building statistics", w, h);
1076 if( kTRUE == fbDebugMonitorMode )
1077 fcEventBuildStats->Divide( 2, 3 );
1078 else fcEventBuildStats->Divide( 2, 2 );
1080 fcEventBuildStats->cd( 1 );
1084 fhEventNbPerTs->Draw();
1086 fcEventBuildStats->cd( 2 );
1090 fhEventSizeDistribution->Draw();
1092 fcEventBuildStats->cd( 3 );
1096 fhEventSizeEvolution->Draw();
1098 fcEventBuildStats->cd( 4 );
1102 fhEventNbEvolution->Draw();
1104 if( kTRUE == fbDebugMonitorMode )
1106 fcEventBuildStats->cd( 5 );
1110 fhEventNbDistributionInTs->Draw();
1112 fcEventBuildStats->cd( 6 );
1116 fhEventSizeDistributionInTs->Draw();
1117 } // if( kTRUE == fbDebugMonitorMode )
1119 AddCanvasToVector( fcEventBuildStats, "canvases" );