10#include <dqm/analysis/modules/DQMHistAnalysisTRGGDL.h>
39 setDescription(
"Modify and analyze the data quality histograms of TRGGDL");
53 for (
unsigned iskim = 0; iskim <
nskim_gdldqm; iskim++) {
54 char charhist_eff[1000];
55 sprintf(charhist_eff,
"hGDL_ana_eff_%s",
skim_smap[iskim].c_str());
57 sprintf(charhist_eff,
"hGDL_ana_eff_fast_%s",
skim_smap[iskim].c_str());
59 for (
int i = 0; i <
n_eff; i++) {
60 m_h_eff[iskim]->GetXaxis()->SetBinLabel(i + 1,
c_eff[i]);
63 char charhist_c_eff[1000];
64 sprintf(charhist_c_eff,
"TRGGDL/hGDL_ana_eff_%s",
skim_smap[iskim].c_str());
65 m_c_eff[iskim] =
new TCanvas(charhist_c_eff);
66 sprintf(charhist_c_eff,
"TRGGDL/hGDL_ana_eff_fast_%s",
skim_smap[iskim].c_str());
94 std::string aa =
"TRGAna:eff_shift_" + std::to_string(i);
95 SEVCHK(ca_create_channel(aa.c_str(), NULL, NULL, 10, &mychid[i]),
"ca_create_channel failure");
100 std::string aa =
"TRGAna:entry_" + std::to_string(i);
101 SEVCHK(ca_create_channel(aa.c_str(), NULL, NULL, 10, &mychid_entry[i]),
"ca_create_channel failure");
106 B2DEBUG(20,
"DQMHistAnalysisTRGGDL: initialized.");
113 for (
unsigned iskim = 0; iskim <
nskim_gdldqm; iskim++) {
117 sprintf(c_psn,
"TRGGDL/hGDL_psn_extra_fast_%s",
skim_smap[iskim].c_str());
121 B2WARNING(
"Histogram/canvas named TRGGDL/hGDL_psn_extra_fast is not found.");
336 for (
unsigned iskim = 0; iskim <
nskim_gdldqm; iskim++) {
340 sprintf(c_psn,
"TRGGDL/hGDL_psn_extra_%s",
skim_smap[iskim].c_str());
344 B2WARNING(
"Histogram/canvas named TRGGDL/hGDL_psn_extra is not found.");
349 if (
m_h_psn_extra[iskim]->GetBinContent(0 + 1) == 0)
continue;
350 if (
m_h_psn_extra[iskim]->GetBinContent(5 + 1) == 0)
continue;
376 if (
m_h_psn_extra[iskim]->GetBinContent(6 + 1) == 0)
continue;
446 if (
m_h_psn_extra[iskim]->GetBinContent(14 + 1) == 0)
continue;
581 B2WARNING(
"Histogram/canvas named hGDL_psn_pure_extra is not found.");
609 for (
unsigned iskim = 0; iskim <
nskim_gdldqm; iskim++) {
617 for (
unsigned iskim = 0; iskim <
nskim_gdldqm; iskim++) {
659 double eff_err_min = eff - 2 * err;
660 double eff_err_max = eff + 2 * err;
663 double eff_err_min_fast = eff_fast - 2 * err_fast;
664 double eff_err_max_fast = eff_fast + 2 * err_fast;
671 if (error_check == 1) {
745 if (mychid[i]) SEVCHK(ca_put(DBR_DOUBLE, mychid[i], (
void*)&data),
"ca_set failure");
750 B2WARNING(
"Histogram/canvas named hGDL_psn_extra is not found.");
752 B2WARNING(
"Histogram/canvas named hGDL_psn_extra is not found.");
754 if (i == 0 || i == 6) {
761 if (mychid_entry[i]) SEVCHK(ca_put(DBR_DOUBLE, mychid_entry[i], (
void*)&data),
"ca_set failure");
770 B2DEBUG(20,
"DQMHistAnalysisTRGGDL : endRun called");
778 if (mychid[i]) SEVCHK(ca_clear_channel(mychid[i]),
"ca_clear_channel failure");
781 if (mychid_entry[i]) SEVCHK(ca_clear_channel(mychid_entry[i]),
"ca_clear_channel failure");
785 B2DEBUG(20,
"terminate called");
The base class for the histogram analysis module.
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).
static const std::string & getRunType(void)
Get the list of the reference histograms.
bool getUseEpics(void)
Getter for EPICS usage.
TH1D * m_h_eff_shifter_fast
Histogram for TRGGDL efficiency, simplified one for CR shifter.
void initialize() override final
Initialize the Module.
static const int n_eff_shifter
number of bins for the simplified efficiency histogram
TCanvas * m_c_eff_shifter_fast
Canvas for TRGGDL efficiency, simplified one for CR shifter.
TCanvas * m_c_eff_fast[nskim_gdldqm]
Canvas for TRGGDL efficiency in each HLT skim.
bool m_IsPhysicsRun
Run type flag for physics runs.
TH1D * m_h_eff_fast[nskim_gdldqm]
Histogram for TRGGDL efficiency in each HLT skim.
bool m_enableAlert
Enable alert by base color of canvases.
static const int nskim_gdldqm
number of HLT skims
TLine * m_line_limit_high_shifter[n_eff_shifter]
upper limit line for the simplified efficiency histogram
double m_limit_low_shifter[n_eff_shifter]
lower limit value in each bin
TH1D * m_h_pure_eff
Histogram for TRGGDL efficiency with offline selection.
TLine * m_line_limit_low_shifter[n_eff_shifter]
lower limit line for the simplified efficiency histogram
void terminate() override final
Termination action.
TH1D * m_h_eff[nskim_gdldqm]
Histogram for TRGGDL efficiency in each HLT skim.
const char * c_eff[n_eff]
label of bins for the efficiency histogram
void event() override final
Event processor.
std::string skim_smap[nskim_gdldqm]
name of HLT skims
TH1D * m_h_eff_shifter
Histogram for TRGGDL efficiency, simplified one for CR shifter.
TH1D * m_h_psn_extra_fast[nskim_gdldqm]
DQM Histogram for PSN bits in each HLT skim.
double m_limit_high_shifter[n_eff_shifter]
upper limit value in each bin
TH1D * m_h_psn_pure_extra
DQM Histogram for PSN bits with offline selection.
static const int n_pure_eff
number of bins for the efficiency histogram with offline selection
TH1D * m_h_psn_extra[nskim_gdldqm]
DQM Histogram for PSN bits in each HLT skim.
TCanvas * m_c_pure_eff
Canvas for TRGGDL efficiency with offline selection.
void endRun() override final
End-of-run action.
DQMHistAnalysisTRGGDLModule()
Constructor.
TCanvas * m_c_eff[nskim_gdldqm]
Canvas for TRGGDL efficiency in each HLT skim.
const char * c_pure_eff[n_pure_eff]
label of bins for the efficiency histogram with offline selection
~DQMHistAnalysisTRGGDLModule()
Destructor.
TCanvas * m_c_eff_shifter
Canvas for TRGGDL efficiency, simplified one for CR shifter.
static const int n_eff
number of bins for the efficiency histogram
const char * c_eff_shifter[n_eff_shifter]
label of bins for the simplified efficiency histogram
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.