 |
Belle II Software
release-05-01-25
|
12 #include <dqm/analysis/modules/DQMHistAnalysisHLTMonObj.h>
14 #include <hlt/softwaretrigger/modules/dqm/SoftwareTriggerHLTDQMModule.h>
16 #include <dqm/analysis/modules/DQMHistAnalysis.h>
27 DQMHistAnalysisHLTMonObjModule::DQMHistAnalysisHLTMonObjModule()
30 setDescription(
"Produces MonitoringObject for the HLT from the available DQM histograms");
60 TH1* h_hlt =
findHist(
"softwaretrigger/total_result");
61 TH1* h_skim =
findHist(
"softwaretrigger/skim");
62 TH1* h_budget =
findHist(
"timing_statistics/fullTimeHistogram");
63 TH1* h_processing =
findHist(
"timing_statistics/processingTimeHistogram");
64 TH1* h_l1 =
findHist(
"softwaretrigger_before_filter/hlt_unit_number");
67 if (h_hlt) n_hlt = (double)h_hlt->GetBinContent((h_hlt->GetXaxis())->FindFixBin(
"total_result"));
70 if (h_l1) n_l1 = h_l1->GetEntries();
75 for (
int ibin = 1; ibin < h_skim->GetXaxis()->GetNbins() + 1; ibin++) {
76 double nentr = (double)h_skim->GetBinContent(ibin);
77 std::string bin_name(h_skim->GetXaxis()->GetBinLabel(ibin));
83 if (h_budget) bgt = h_budget->GetMean();
89 if (h_processing) procTime = h_processing->GetMean();
92 TH1* h_budgetUnit =
nullptr;
96 h_budgetUnit =
findHist((
"timing_statistics/fullTimePerUnitHistogram_HLT" + std::to_string(index)).c_str());
98 if (h_budgetUnit) bgunit = h_budgetUnit->GetMean();
101 h_budgetUnit =
findHist((
"timing_statistics/processingTimePerUnitHistogram_HLT" + std::to_string(index)).c_str());
102 if (h_budgetUnit) bgunit = h_budgetUnit->GetMean();
107 B2DEBUG(20,
"DQMHistAnalysisHLTMonObj : endRun called");
112 B2DEBUG(20,
"terminate called");
static constexpr unsigned int max_hlt_units
Maximum number of HLT units used during the experiment.
void setDescription(const std::string &description)
Sets the description of the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
virtual void initialize() override
Initialize the Module.
static TH1 * findHist(const std::string &histname)
Find histogram.
virtual ~DQMHistAnalysisHLTMonObjModule()
Destructor.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Abstract base class for different kinds of events.
void setVariable(const std::string &var, float val, float upErr=-1., float dwErr=-1)
set value to float variable (new variable is made if not yet existing)
MonitoringObject * m_monObj
MonitoringObject to be produced by this module.
virtual void terminate() override
Termination action.
virtual void endRun() override
End-of-run action.
virtual void event() override
Event processor.
static MonitoringObject * getMonitoringObject(const std::string &histname)
Get MonitoringObject with given name (new object is created if non-existing)
virtual void beginRun() override
Begin run function.
The base class for the histogram analysis module.