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();
62 std::size_t lsize = histoName.size();
63 if ((lsize >= nsize) && (histoName.find(name) == (lsize - nsize))) {
64 res.push_back(&histoName);
68 std::ostringstream oss;
71 for (
auto const &histoName : histoNames_) {
72 oss << sep <<
' ' << histoName;
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";
142 return bookH1andDivide(iBooker, iGetter, name,
get(iGetter, num),
get(iGetter, denom), titleX, titleY, title);
153 return bookH2andDivide(iBooker, iGetter, name,
get(iGetter, num),
get(iGetter, denom), titleX, titleY, title);
161 return cloneH1(iBooker, iGetter, clone,
get(iGetter, original), title);
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()) {
200 if (!titleY.empty()) {
201 me->
getTH1F()->GetYaxis()->SetTitle(titleY.c_str());
203 if (TString(option) !=
"") {
224 if (!titleX.empty()) {
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()) {
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()) {
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) !=
"") {
321 me->
getTH1F()->StatOverflows(kTRUE);
334 if ((!num) || (!denom))
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());
365 if ((!num) || (!denom))
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());
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 getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() 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 void setOption(const char *option)
virtual TH1F * getTH1F() const
void setBookPrefix(const std::string &)
const std::string & getName() const
get name of ME
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="")
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())
virtual MonitorElement * get(std::string const &fullpath) const
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 * bookH2andDivide(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
virtual TProfile * getTProfile() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
T getParameter(std::string const &) const
std::string inputInternalPath_
virtual DQM_DEPRECATED void setStatOverflows(bool value)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
~ElectronDqmHarvesterBase() override
virtual std::vector< std::string > getMEs() const
std::vector< std::string > histoNames_
virtual void enableSumw2()
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)
virtual TH1 * getTH1() const
ElectronDqmHarvesterBase(const edm::ParameterSet &conf)
virtual void finalize(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)