18 numeratorDir_(ps.getUntrackedParameter <
std::
string > (
"numeratorDir")),
19 denominatorDir_(ps.getUntrackedParameter <
std::
string > (
"denominatorDir", numeratorDir_)),
20 outputDir_(ps.getUntrackedParameter <
std::
string > (
"outputDir", numeratorDir_)),
22 numeratorSuffix_(ps.getUntrackedParameter <
std::
string > (
"numeratorSuffix",
"Num")),
23 denominatorSuffix_(ps.getUntrackedParameter <
std::
string > (
"denominatorSuffix",
"Den")),
55 << (!num && !den ? numeratorName +
" && " + denominatorName : !num ? numeratorName : denominatorName)
56 <<
" not gettable. Quitting booking" << endl;
66 << (!numH && !denH ? numeratorName +
" && " + denominatorName : !num ? numeratorName : denominatorName)
67 <<
" is not TH1F. Quitting booking" << endl;
73 int nBinsNum = numH->GetNbinsX();
74 int nBinsDen = denH->GetNbinsX();
76 if (nBinsNum != nBinsDen) {
77 edm::LogError(
"L1TEfficiencyPlotHandler") <<
" # bins in " << numeratorName <<
" and " << denominatorName
78 <<
" are different. Quitting booking" << endl;
82 double min = numH->GetXaxis()->GetXmin();
83 double max = numH->GetXaxis()->GetXmax();
108 effH->Divide(numH, denH, 1.0, 1.0,
"B");
113 verbose_(ps.getUntrackedParameter<bool>(
"verbose")),
117 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"____________ Storage initialization ____________ " << endl;
121 vector < string >
plots = plotConfig.getUntrackedParameter < vector < string >> (
"plots");
122 for (
auto plot : plots) {
137 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"Called endRun." << endl;
141 plotHandler.book(ibooker, igetter);
142 plotHandler.computeEfficiency(ibooker, igetter);
LuminosityBlockID id() const
T getUntrackedParameter(std::string const &, T const &) const
std::string numeratorSuffix_
std::string numeratorDir_
L1TEfficiencyHarvesting(const edm::ParameterSet &ps)
L1TEfficiencyPlotHandler(std::string dir, std::string plotName)
virtual void dqmEndLuminosityBlock(DQMStore::IGetter &igetter, edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
MonitorElement * h_efficiency_
std::string denominatorDir_
void computeEfficiency(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
L1TEfficiencyPlotHandler(const edm::ParameterSet &ps, std::string plotName)
MonitorElement * book1D(Args &&...args)
virtual void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
L1TEfficiencyPlotHandlerCollection plotHandlers_
void setCurrentFolder(const std::string &fullpath)
std::string denominatorSuffix_
TH1F * getTH1F(void) const
LuminosityBlockNumber_t luminosityBlock() const
void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
virtual ~L1TEfficiencyHarvesting()