19 : bookPrefix_(
"ele"), bookIndex_(0), histoNamesReady(
false), finalDone_(
false) {
44 std::ostringstream oss;
58 std::vector<const std::string *>
res;
59 std::size_t nsize =
name.size();
63 if ((lsize >= nsize) && (
histoName.find(
name) == (lsize - nsize))) {
68 std::ostringstream oss;
78 }
else if (
res.size() > 1) {
79 std::ostringstream oss;
82 for (
auto const resItr :
res) {
83 oss << sep <<
' ' << *resItr;
101 edm::LogWarning(
"ElectronDqmHarvesterBase::endLuminosityBlock") <<
"finalize() already called";
111 edm::LogWarning(
"ElectronDqmHarvesterBase::dqmEndJob") <<
"finalize() already called";
172 return profileX(iBooker, iGetter,
get(iGetter, me2d),
title, titleX, titleY, minimum, maximum);
183 return profileY(iBooker, iGetter,
get(iGetter, me2d),
title, titleX, titleY, minimum, maximum);
197 if (!titleX.empty()) {
198 me->setAxisTitle(titleX);
200 if (!titleY.empty()) {
201 me->getTH1F()->GetYaxis()->SetTitle(titleY.c_str());
203 if (TString(
option) !=
"") {
207 me->setStatOverflows(kTRUE);
224 if (!titleX.empty()) {
225 me->setAxisTitle(titleX);
227 if (!titleY.empty()) {
228 me->getTH1F()->GetYaxis()->SetTitle(titleY.c_str());
230 if (TString(
option) !=
"") {
234 me->getTH1F()->StatOverflows(kTRUE);
253 if (!titleX.empty()) {
254 me->setAxisTitle(titleX);
256 if (!titleY.empty()) {
257 me->getTH2F()->GetYaxis()->SetTitle(titleY.c_str());
259 if (TString(
option) !=
"") {
263 me->getTH1F()->StatOverflows(kTRUE);
283 if (!titleX.empty()) {
284 me->setAxisTitle(titleX);
286 if (!titleY.empty()) {
287 me->getTH2F()->GetYaxis()->SetTitle(titleY.c_str());
289 if (TString(
option) !=
"") {
293 me->getTH1F()->StatOverflows(kTRUE);
311 if (!titleX.empty()) {
312 me->getTProfile()->GetXaxis()->SetTitle(titleX.c_str());
314 if (!titleY.empty()) {
315 me->getTProfile()->GetYaxis()->SetTitle(titleY.c_str());
317 if (TString(
option) !=
"") {
318 me->getTProfile()->SetOption(
option);
321 me->getTH1F()->StatOverflows(kTRUE);
338 TH1F *h_temp = (TH1F *)
num->getTH1F()->Clone(
name2.c_str());
340 h_temp->Divide(
num->getTH1(),
denom->getTH1(), 1, 1,
"b");
341 h_temp->GetXaxis()->SetTitle(titleX.c_str());
342 h_temp->GetYaxis()->SetTitle(titleY.c_str());
343 if (!
title.empty()) {
344 h_temp->SetTitle(
title.c_str());
351 me->setEfficiencyFlag();
369 TH2F *h_temp = (TH2F *)
num->getTH2F()->Clone(
name2.c_str());
371 h_temp->Divide(
num->getTH1(),
denom->getTH1(), 1, 1,
"b");
372 h_temp->GetXaxis()->SetTitle(titleX.c_str());
373 h_temp->GetYaxis()->SetTitle(titleY.c_str());
374 if (!
title.empty()) {
375 h_temp->SetTitle(
title.c_str());
382 me->setEfficiencyFlag();
397 TH1F *h_temp = (TH1F *)
original->getTH1F()->Clone(
name2.c_str());
399 if (!
title.empty()) {
400 h_temp->SetTitle(
title.c_str());
417 TProfile *p1_temp = me2d->
getTH2F()->ProfileX();
418 if (!
title.empty()) {
419 p1_temp->SetTitle(
title.c_str());
421 if (!titleX.empty()) {
422 p1_temp->GetXaxis()->SetTitle(titleX.c_str());
424 if (!titleY.empty()) {
425 p1_temp->GetYaxis()->SetTitle(titleY.c_str());
427 if (minimum != -1111) {
428 p1_temp->SetMinimum(minimum);
430 if (maximum != -1111) {
431 p1_temp->SetMaximum(maximum);
448 TProfile *p1_temp = me2d->
getTH2F()->ProfileY();
449 if (!
title.empty()) {
450 p1_temp->SetTitle(
title.c_str());
452 if (!titleX.empty()) {
453 p1_temp->GetXaxis()->SetTitle(titleX.c_str());
455 if (!titleY.empty()) {
456 p1_temp->GetYaxis()->SetTitle(titleY.c_str());
458 if (minimum != -1111) {
459 p1_temp->SetMinimum(minimum);
461 if (maximum != -1111) {
462 p1_temp->SetMaximum(maximum);
T getParameter(std::string const &) const
MonitorElement * profileX(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
void remove(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &name)
MonitorElement * bookH1withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
MonitorElement * bookH2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
const std::string * find(DQMStore::IGetter &iGetter, const std::string &name)
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * bookH1(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
virtual std::vector< std::string > getMEs() const
void setBookPrefix(const std::string &)
bool bookStatOverflowFlag_
MonitorElement * get(DQMStore::IGetter &iGetter, const std::string &name)
MonitorElement * bookH2andDivide(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
MonitorElement * bookH1andDivide(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
MonitorElement * profileY(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
MonitorElement * bookH2withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
void setBookStatOverflowFlag(const bool &)
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())
std::string outputInternalPath_
void setBookEfficiencyFlag(const bool &)
MonitorElement * cloneH1(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *original, const std::string &title="")
MonitorElement * cloneH1(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, const std::string &original, const std::string &title="")
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::string inputInternalPath_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
virtual MonitorElement * get(std::string const &fullpath) const
const std::string & getName() const
get name of ME
~ElectronDqmHarvesterBase() override
std::vector< std::string > histoNames_
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
MonitorElement * bookP1(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P")
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())
std::string newName(const std::string &name)
ElectronDqmHarvesterBase(const edm::ParameterSet &conf)
virtual void finalize(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override