64 TH1* h_hlt =
findHist(
"softwaretrigger/total_result");
65 TH1* h_skim =
findHist(
"softwaretrigger/skim");
66 TH1* h_budget =
findHist(
"timing_statistics/fullTimeHistogram");
67 TH1* h_processing =
findHist(
"timing_statistics/processingTimeHistogram");
68 TH1* h_meantime =
findHist(
"timing_statistics/meanTimeHistogram");
69 TH1* h_budg_unit =
findHist(
"timing_statistics/fullTimeMeanPerUnitHistogram");
70 TH1* h_proc_unit =
findHist(
"timing_statistics/processingTimeMeanPerUnitHistogram");
71 TH1* h_procs =
findHist(
"timing_statistics/processesPerUnitHistogram");
72 TH1* h_l1 =
findHist(
"softwaretrigger_before_filter/hlt_unit_number");
73 TH1* h_err_flag =
findHist(
"softwaretrigger_before_filter/error_flag");
74 TH1* h_hlt_triggers =
findHist(
"softwaretrigger/filter");
75 TH1* h_l1_triggers =
findHist(
"TRGGDL/hGDL_psn_all");
76 TH1* h_l1_triggers_filt =
findHist(
"softwaretrigger/l1_total_result");
77 TH1* h_l1_cat_w_overlap =
findHist(
"TRGGDL/hGDL_psn_raw_rate_all");
78 TH1* h_l1_cat_wo_overlap =
findHist(
"TRGGDL/hGDL_psn_effect_to_l1_all");
79 TH1* h_full_mem =
findHist(
"timing_statistics/fullMemoryHistogram");
80 TCanvas* c_GDL_ana_eff_shifter =
findCanvas(
"TRGGDL/hGDL_ana_eff_shifter");
81 TH1* h_GDL_ana_eff_shifter =
nullptr;
83 if (c_GDL_ana_eff_shifter) {
84 c_GDL_ana_eff_shifter->cd();
85 h_GDL_ana_eff_shifter =
dynamic_cast<TH1*
>(gPad->GetPrimitive(
"hGDL_ana_eff_shifter"));
92 if (h_hlt) h_hlt->Draw();
94 if (h_hlt_triggers) h_hlt_triggers->Draw();
96 if (h_err_flag) h_err_flag->Draw();
101 if (h_skim) h_skim->Draw();
107 if (h_l1) h_l1->Draw();
109 if (h_budget) h_budget->Draw();
111 if (h_processing) h_processing->Draw();
113 if (h_budg_unit) h_budg_unit->Draw();
115 if (h_proc_unit) h_proc_unit->Draw();
117 if (h_meantime) h_meantime->Draw();
119 if (h_procs) h_procs->Draw();
121 if (h_full_mem) h_full_mem->Draw();
127 if (h_l1_triggers) h_l1_triggers->Draw();
129 if (h_l1_triggers_filt) h_l1_triggers_filt->Draw();
131 if (h_l1_cat_w_overlap) h_l1_cat_w_overlap->Draw();
133 if (h_l1_cat_wo_overlap) h_l1_cat_wo_overlap->Draw();
138 if (h_GDL_ana_eff_shifter) h_GDL_ana_eff_shifter->Draw();
141 if (h_hlt) n_hlt = (double)h_hlt->GetBinContent((h_hlt->GetXaxis())->FindFixBin(
"total_result"));
142 m_monObj->setVariable(
"n_hlt", n_hlt);
144 if (h_l1) n_l1 = h_l1->GetEntries();
145 m_monObj->setVariable(
"n_l1", n_l1);
147 if (h_procs) n_procs = h_procs->GetEntries();
148 m_monObj->setVariable(
"n_procs", n_procs);
152 for (
int ibin = 1; ibin < h_skim->GetXaxis()->GetNbins() + 1; ibin++) {
153 double nentr = (double)h_skim->GetBinContent(ibin);
154 std::string bin_name(h_skim->GetXaxis()->GetBinLabel(ibin));
155 m_monObj->setVariable(bin_name.replace(0, 6,
"effCS"), nentr);
161 for (
int ibin = 1; ibin < h_l1_triggers->GetXaxis()->GetNbins() + 1; ibin++) {
162 double nentr = (double)h_l1_triggers->GetBinContent(ibin);
163 std::string bin_name(h_l1_triggers->GetXaxis()->GetBinLabel(ibin));
164 if (bin_name ==
"")
continue;
165 m_monObj->setVariable(bin_name.insert(0,
"effCS_l1_"), nentr);
169 if (h_l1_triggers_filt) {
171 for (
int ibin = 1; ibin < h_l1_triggers_filt->GetXaxis()->GetNbins() + 1; ibin++) {
172 double nentr = (double)h_l1_triggers_filt->GetBinContent(ibin);
173 std::string bin_name(h_l1_triggers_filt->GetXaxis()->GetBinLabel(ibin));
174 if (bin_name ==
"")
continue;
175 m_monObj->setVariable(bin_name.insert(0,
"effCS_l1_fON_"), nentr);
179 if (h_hlt_triggers) {
181 for (
int ibin = 1; ibin < h_hlt_triggers->GetXaxis()->GetNbins() + 1; ibin++) {
182 double nentr = (double)h_hlt_triggers->GetBinContent(ibin);
183 std::string bin_name(h_hlt_triggers->GetXaxis()->GetBinLabel(ibin));
184 bin_name = std::regex_replace(bin_name, std::regex(
"=="),
"_eq_");
185 bin_name = std::regex_replace(bin_name, std::regex(
"\\."),
"_");
186 m_monObj->setVariable(bin_name.insert(0,
"effCS_hlt_"), nentr);
192 for (
int ibin = 1; ibin < h_meantime->GetXaxis()->GetNbins() + 1; ibin++) {
193 double nentr = (double)h_meantime->GetBinContent(ibin);
194 std::string bin_name(h_meantime->GetXaxis()->GetBinLabel(ibin));
195 m_monObj->setVariable(bin_name.insert(0,
"secTime_"), nentr);
201 for (
int ibin = 1; ibin < h_err_flag->GetXaxis()->GetNbins() + 1; ibin++) {
202 double nentr = (double)h_err_flag->GetBinContent(ibin);
203 std::string bin_name(h_err_flag->GetXaxis()->GetBinLabel(ibin));
204 m_monObj->setVariable(bin_name.insert(0,
"errFlag_"), nentr);
208 if (h_l1_cat_w_overlap) {
210 for (
int ibin = 1; ibin < h_l1_cat_w_overlap->GetXaxis()->GetNbins() + 1; ibin++) {
211 double nentr = (double)h_l1_cat_w_overlap->GetBinContent(ibin);
212 std::string bin_name(h_l1_cat_w_overlap->GetXaxis()->GetBinLabel(ibin));
213 m_monObj->setVariable(bin_name.insert(0,
"l1_Ov_"), nentr);
217 if (h_l1_cat_wo_overlap) {
219 for (
int ibin = 1; ibin < h_l1_cat_wo_overlap->GetXaxis()->GetNbins() + 1; ibin++) {
220 double nentr = (double)h_l1_cat_wo_overlap->GetBinContent(ibin);
221 std::string bin_name(h_l1_cat_wo_overlap->GetXaxis()->GetBinLabel(ibin));
222 m_monObj->setVariable(bin_name.insert(0,
"l1_noOv_"), nentr);
226 if (h_GDL_ana_eff_shifter) {
228 for (
int ibin = 1; ibin < h_GDL_ana_eff_shifter->GetXaxis()->GetNbins() + 1; ibin++) {
229 double nentr = (double)h_GDL_ana_eff_shifter->GetBinContent(ibin);
230 std::string bin_name(h_GDL_ana_eff_shifter->GetXaxis()->GetBinLabel(ibin));
231 m_monObj->setVariable(bin_name.insert(0,
"GDLanaEffShifter_"), nentr);
236 if (h_budget) bgt = h_budget->GetMean();
237 m_monObj->setVariable(
"budget_time", bgt);
239 m_monObj->setVariable(
"n_l1_x_budget_time", n_l1 * bgt);
241 double procTime = 0.;
242 if (h_processing) procTime = h_processing->GetMean();
243 m_monObj->setVariable(
"processing_time", procTime);
245 double fullMemory = 0.;
246 if (h_full_mem) fullMemory = h_full_mem->GetBinLowEdge(h_full_mem->FindLastBinAbove(0) + 1);
247 m_monObj->setVariable(
"full_memory", fullMemory);
249 TH1* h_budgetUnit =
nullptr;
250 TH1* h_memoryUnit =
nullptr;
252 for (
unsigned int index = 1; index <= HLTUnits::max_hlt_units; index++) {
254 h_budgetUnit =
findHist((
"timing_statistics/fullTimePerUnitHistogram_HLT" + std::to_string(index)).c_str());
256 if (h_budgetUnit) bgunit = h_budgetUnit->GetMean();
257 m_monObj->setVariable((
"budget_time_HLT" + std::to_string(index)).c_str(), bgunit);
259 h_budgetUnit =
findHist((
"timing_statistics/processingTimePerUnitHistogram_HLT" + std::to_string(index)).c_str());
260 if (h_budgetUnit) bgunit = h_budgetUnit->GetMean();
262 m_monObj->setVariable((
"processing_time_HLT" + std::to_string(index)).c_str(), bgunit);
264 h_memoryUnit =
findHist((
"timing_statistics/fullMemoryPerUnitHistogram_HLT" + std::to_string(index)).c_str());
266 if (h_memoryUnit && bgunit > 0) memunit = h_memoryUnit->GetBinLowEdge(h_memoryUnit->FindLastBinAbove(0.) + 1);
267 m_monObj->setVariable((
"memory_HLT" + std::to_string(index)).c_str(), memunit);
270 B2DEBUG(20,
"DQMHistAnalysisHLTMonObj : endRun called");