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 : !h1_ ? h1Name : h2Name) <<
" not gettable. Quitting booking"
84 histType1_ = h1_->kind();
85 histType2_ = h2_->kind();
91 <<
" Could not find a supported histogram type" << std::endl;
94 if (histType1_ != histType2_) {
96 <<
" Histogram 1 and 2 have different histogram types" << std::endl;
110 TH1F *h1 = h1_->getTH1F();
111 double min = h1->GetXaxis()->GetXmin();
112 double max = h1->GetXaxis()->GetXmax();
113 int nBins = h1->GetNbinsX();
117 double minX = h1->GetXaxis()->GetXmin();
118 double maxX = h1->GetXaxis()->GetXmax();
119 double minY = h1->GetYaxis()->GetXmin();
120 double maxY = h1->GetYaxis()->GetXmax();
121 int nBinsX = h1->GetNbinsX();
122 int nBinsY = h1->GetNbinsY();
125 }
else if (isProfile) {
127 double minX = h1->GetXaxis()->GetXmin();
128 double maxX = h1->GetXaxis()->GetXmax();
129 double minY = h1->GetYaxis()->GetXmin();
130 double maxY = h1->GetYaxis()->GetXmax();
131 int nBins = h1->GetNbinsX();
135 <<
"Unknown histogram type. Quitting booking" << std::endl;
143 for (
const auto &plotConfig : ps.
getUntrackedParameter<std::vector<edm::ParameterSet>>(
"plotCfgs")) {
144 vector<string>
plots = plotConfig.getUntrackedParameter<vector<string>>(
"plots");
154 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"Called endRun." << std::endl;
157 plotHandler.computeDiff(ibooker, igetter);