20 : bookPrefix_(
"ele"), bookIndex_(0), histoNamesReady(
false), finalDone_(
false)
50 std::ostringstream oss ;
60 typedef std::vector<std::string> HistoNames ;
61 typedef HistoNames::iterator HistoNamesItr ;
64 HistoNamesItr histoName ;
65 std::vector<HistoNamesItr> res ;
69 std::size_t nsize = name.size(), lsize = histoName->size() ;
70 if ( (lsize>=nsize) &&
71 (histoName->find(name)==(lsize-nsize)) )
72 { res.push_back(histoName) ; }
76 std::ostringstream oss ;
80 { oss<<sep<<
' '<<*histoName ; sep =
',' ; }
85 else if (res.size()>1)
87 std::ostringstream oss ;
90 std::vector<HistoNamesItr>::iterator resItr ;
91 for ( resItr = res.begin() ; resItr != res.end() ; ++resItr )
92 { oss<<sep<<
' '<<(**resItr) ; sep =
',' ; }
113 edm::LogWarning(
"ElectronDqmHarvesterBase::endLuminosityBlock")<<
"finalize() already called" ;
127 {
edm::LogWarning(
"ElectronDqmHarvesterBase::dqmEndJob")<<
"finalize() already called" ; }
161 return bookH1andDivide(iBooker, iGetter, name,
get(iGetter, num),
get(iGetter, denom),titleX,titleY,title) ;
169 {
return bookH2andDivide(iBooker, iGetter, name,
get(iGetter, num),
get(iGetter, denom),titleX,titleY,title) ; }
175 {
return cloneH1(iBooker, iGetter, clone,
get(iGetter, original),title) ; }
181 Double_t minimum, Double_t maximum )
182 {
return profileX(iBooker, iGetter,
get(iGetter, me2d),title,titleX,titleY,minimum,maximum) ; }
188 Double_t minimum, Double_t maximum )
189 {
return profileY(iBooker, iGetter,
get(iGetter, me2d),title,titleX,titleY,minimum,maximum) ; }
193 int nchX,
double lowX,
double highX,
199 if (titleX!=
"") { me->
getTH1F()->GetXaxis()->SetTitle(titleX.c_str()) ; }
200 if (titleY!=
"") { me->
getTH1F()->GetYaxis()->SetTitle(titleY.c_str()) ; }
201 if (TString(option)!=
"") { me->
getTH1F()->SetOption(option) ; }
202 if (bookStatOverflowFlag_) {me->
getTH1F()->StatOverflows(kTRUE) ; }
208 int nchX,
double lowX,
double highX,
215 if (titleX!=
"") { me->
getTH1F()->GetXaxis()->SetTitle(titleX.c_str()) ; }
216 if (titleY!=
"") { me->
getTH1F()->GetYaxis()->SetTitle(titleY.c_str()) ; }
217 if (TString(option)!=
"") { me->
getTH1F()->SetOption(option) ; }
218 if (bookStatOverflowFlag_) {me->
getTH1F()->StatOverflows(kTRUE) ; }
224 int nchX,
double lowX,
double highX,
225 int nchY,
double lowY,
double highY,
231 if (titleX!=
"") { me->
getTH2F()->GetXaxis()->SetTitle(titleX.c_str()) ; }
232 if (titleY!=
"") { me->
getTH2F()->GetYaxis()->SetTitle(titleY.c_str()) ; }
233 if (TString(option)!=
"") { me->
getTH2F()->SetOption(option) ; }
234 if (bookStatOverflowFlag_) {me->
getTH1F()->StatOverflows(kTRUE) ; }
240 int nchX,
double lowX,
double highX,
241 int nchY,
double lowY,
double highY,
248 if (titleX!=
"") { me->
getTH2F()->GetXaxis()->SetTitle(titleX.c_str()) ; }
249 if (titleY!=
"") { me->
getTH2F()->GetYaxis()->SetTitle(titleY.c_str()) ; }
250 if (TString(option)!=
"") { me->
getTH2F()->SetOption(option) ; }
251 if (bookStatOverflowFlag_) {me->
getTH1F()->StatOverflows(kTRUE) ; }
257 int nchX,
double lowX,
double highX,
258 double lowY,
double highY,
264 if (titleX!=
"") { me->
getTProfile()->GetXaxis()->SetTitle(titleX.c_str()) ; }
265 if (titleY!=
"") { me->
getTProfile()->GetYaxis()->SetTitle(titleY.c_str()) ; }
266 if (TString(option)!=
"") { me->
getTProfile()->SetOption(option) ; }
267 if (bookStatOverflowFlag_) {me->
getTH1F()->StatOverflows(kTRUE) ; }
277 if ((!num)||(!denom))
return 0 ;
280 TH1F * h_temp = (TH1F *)num->
getTH1F()->Clone(name2.c_str()) ;
283 h_temp->GetXaxis()->SetTitle(titleX.c_str()) ;
284 h_temp->GetYaxis()->SetTitle(titleY.c_str()) ;
285 if (title!=
"") { h_temp->SetTitle(title.c_str()) ; }
286 if (verbosity_>0) { h_temp->Print() ; }
299 if ((!num)||(!denom))
return 0 ;
302 TH2F * h_temp = (TH2F *)num->
getTH2F()->Clone(name2.c_str()) ;
305 h_temp->GetXaxis()->SetTitle(titleX.c_str()) ;
306 h_temp->GetYaxis()->SetTitle(titleY.c_str()) ;
307 if (title!=
"") { h_temp->SetTitle(title.c_str()) ; }
308 if (verbosity_>0) { h_temp->Print() ; }
320 if (!original)
return 0 ;
323 TH1F * h_temp = (TH1F *)original->
getTH1F()->Clone(name2.c_str()) ;
325 if (title!=
"") { h_temp->SetTitle(title.c_str()) ; }
334 Double_t minimum, Double_t maximum )
338 TProfile * p1_temp = me2d->
getTH2F()->ProfileX() ;
339 if (title!=
"") { p1_temp->SetTitle(title.c_str()) ; }
340 if (titleX!=
"") { p1_temp->GetXaxis()->SetTitle(titleX.c_str()) ; }
341 if (titleY!=
"") { p1_temp->GetYaxis()->SetTitle(titleY.c_str()) ; }
342 if (minimum!=-1111) { p1_temp->SetMinimum(minimum) ; }
343 if (maximum!=-1111) { p1_temp->SetMaximum(maximum) ; }
352 Double_t minimum, Double_t maximum )
356 TProfile * p1_temp = me2d->
getTH2F()->ProfileY() ;
357 if (title!=
"") { p1_temp->SetTitle(title.c_str()) ; }
358 if (titleX!=
"") { p1_temp->GetXaxis()->SetTitle(titleX.c_str()) ; }
359 if (titleY!=
"") { p1_temp->GetYaxis()->SetTitle(titleY.c_str()) ; }
360 if (minimum!=-1111) { p1_temp->SetMinimum(minimum) ; }
361 if (maximum!=-1111) { p1_temp->SetMaximum(maximum) ; }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
void remove(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &name)
const std::string * find(DQMStore::IGetter &iGetter, const std::string &name)
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
MonitorElement * bookProfile(Args &&...args)
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")
MonitorElement * get(const std::string &path)
void setBookPrefix(const std::string &)
bool bookStatOverflowFlag_
virtual ~ElectronDqmHarvesterBase()
MonitorElement * cloneH1(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *original, const std::string &title="")
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 setBookStatOverflowFlag(const bool &)
MonitorElement * book1D(Args &&...args)
std::string outputInternalPath_
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")
void setBookEfficiencyFlag(const bool &)
std::vector< std::string > getMEs(void)
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")
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
TH1F * getTH1F(void) const
std::string inputInternalPath_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
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 * 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")
std::vector< std::string > histoNames_
TProfile * getTProfile(void) const
void setEfficiencyFlag(void)
volatile std::atomic< bool > shutdown_flag false
MonitorElement * get(DQMStore::IGetter &iGetter, const std::string &name)
TH2F * getTH2F(void) const
void removeElement(Args &&...args)
std::string newName(const std::string &name)
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")
ElectronDqmHarvesterBase(const edm::ParameterSet &conf)
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)
virtual void finalize(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
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="")