10 : dir1_(ps.getUntrackedParameter<
std::
string>(
"dir1")),
11 dir2_(ps.getUntrackedParameter<
std::
string>(
"dir2")),
12 outputDir_(ps.getUntrackedParameter<
std::
string>(
"outputDir", dir1_)),
21 : dir1_(handler.dir1_),
23 outputDir_(handler.outputDir_),
24 plotName_(handler.plotName_),
32 loadHistograms(igetter);
46 h_diff = h_diff_->getTH1F();
50 h_diff = h_diff_->getTH2F();
53 }
else if (isProfile) {
54 h_diff = h_diff_->getTProfile();
55 h1 = h1_->getTProfile();
56 h2 = h2_->getTProfile();
59 <<
"Unknown histogram type. Quitting booking" << std::endl;
67 h_diff->SetEntries(h1->GetEntries() + h2->GetEntries());
73 h1_ = igetter.
get(h1Name);
74 h2_ = igetter.
get(h2Name);
77 edm::LogWarning(
"L1TDiffHarvesting::L1TDiffPlotHandler::loadHistograms")
78 << (!h1_ && !h2_ ? h1Name +
" && " + h2Name
81 <<
" not gettable. Quitting booking" << std::endl;
86 histType1_ = h1_->kind();
87 histType2_ = h2_->kind();
93 <<
" Could not find a supported histogram type" << std::endl;
96 if (histType1_ != histType2_) {
98 <<
" Histogram 1 and 2 have different histogram types" << std::endl;
112 TH1F *h1 = h1_->getTH1F();
113 double min = h1->GetXaxis()->GetXmin();
114 double max = h1->GetXaxis()->GetXmax();
115 int nBins = h1->GetNbinsX();
119 double minX = h1->GetXaxis()->GetXmin();
120 double maxX = h1->GetXaxis()->GetXmax();
121 double minY = h1->GetYaxis()->GetXmin();
122 double maxY = h1->GetYaxis()->GetXmax();
123 int nBinsX = h1->GetNbinsX();
124 int nBinsY = h1->GetNbinsY();
127 }
else if (isProfile) {
129 double minX = h1->GetXaxis()->GetXmin();
130 double maxX = h1->GetXaxis()->GetXmax();
131 double minY = h1->GetYaxis()->GetXmin();
132 double maxY = h1->GetYaxis()->GetXmax();
133 int nBins = h1->GetNbinsX();
137 <<
"Unknown histogram type. Quitting booking" << std::endl;
145 for (
const auto &plotConfig : ps.
getUntrackedParameter<std::vector<edm::ParameterSet>>(
"plotCfgs")) {
146 vector<string>
plots = plotConfig.getUntrackedParameter<vector<string>>(
"plots");
156 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"Called endRun." << std::endl;
159 plotHandler.computeDiff(ibooker, igetter);
L1TDiffPlotHandler(const edm::ParameterSet &ps, std::string plotName)
virtual TProfile * getTProfile() const
void loadHistograms(DQMStore::IGetter &igetter)
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
L1TDiffPlotHandlers plotHandlers_
virtual void setCurrentFolder(std::string const &fullpath)
L1TDiffHarvesting(const edm::ParameterSet &ps)
~L1TDiffHarvesting() override
#define DEFINE_FWK_MODULE(type)
void bookDiff(DQMStore::IBooker &ibooker)
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
bool is2D(HitType hitType)
void computeDiff(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
Log< level::Info, false > LogInfo
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual MonitorElement * get(std::string const &fullpath) const
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())