CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Protected Member Functions | Private Member Functions | Private Attributes
ElectronDqmHarvesterBase Class Reference

#include <ElectronDqmHarvesterBase.h>

Inheritance diagram for ElectronDqmHarvesterBase:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase ElectronMcFakePostValidator ElectronMcSignalPostValidator ElectronMcSignalPostValidatorMiniAOD ElectronOfflineClient

Protected Member Functions

void beginJob ()
 
MonitorElementbookH1 (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")
 
MonitorElementbookH1andDivide (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="")
 
MonitorElementbookH1andDivide (DQMStore::IBooker &iBooker, DQMStore::IGetter &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="")
 
MonitorElementbookH1withSumw2 (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")
 
MonitorElementbookH2 (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")
 
MonitorElementbookH2andDivide (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="")
 
MonitorElementbookH2andDivide (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="")
 
MonitorElementbookH2withSumw2 (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")
 
MonitorElementbookP1 (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")
 
MonitorElementcloneH1 (DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *original, const std::string &title="")
 
MonitorElementcloneH1 (DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, const std::string &original, const std::string &title="")
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
 ElectronDqmHarvesterBase (const edm::ParameterSet &conf)
 
virtual void finalize (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
 
bool finalStepDone ()
 
MonitorElementget (DQMStore::IGetter &iGetter, const std::string &name)
 
MonitorElementprofileX (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)
 
MonitorElementprofileX (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
MonitorElementprofileY (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)
 
MonitorElementprofileY (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &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)
 
void setBookEfficiencyFlag (const bool &)
 
void setBookIndex (short)
 
void setBookPrefix (const std::string &)
 
void setBookStatOverflowFlag (const bool &)
 
int verbosity ()
 
virtual ~ElectronDqmHarvesterBase ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

const std::string * find (DQMStore::IGetter &iGetter, const std::string &name)
 
std::string newName (const std::string &name)
 

Private Attributes

bool bookEfficiencyFlag_ = false
 
short bookIndex_
 
std::string bookPrefix_
 
bool bookStatOverflowFlag_ = false
 
bool finalDone_
 
std::string finalStep_
 
std::vector< std::string > histoNames_
 
bool histoNamesReady
 
std::string inputFile_
 
std::string inputInternalPath_
 
std::string outputFile_
 
std::string outputInternalPath_
 
int verbosity_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 19 of file ElectronDqmHarvesterBase.h.

Constructor & Destructor Documentation

ElectronDqmHarvesterBase::ElectronDqmHarvesterBase ( const edm::ParameterSet conf)
explicitprotected

Definition at line 19 of file ElectronDqmHarvesterBase.cc.

References finalStep_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), inputFile_, inputInternalPath_, outputFile_, outputInternalPath_, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity_.

20  : bookPrefix_("ele"), bookIndex_(0), histoNamesReady(false), finalDone_(false)
21  {
22  verbosity_ = conf.getUntrackedParameter<int>("Verbosity") ;
23  finalStep_ = conf.getParameter<std::string>("FinalStep") ;
24  inputFile_ = conf.getParameter<std::string>("InputFile") ;
25  outputFile_ = conf.getParameter<std::string>("OutputFile") ;
26  inputInternalPath_ = conf.getParameter<std::string>("InputFolderName") ;
27  outputInternalPath_ = conf.getParameter<std::string>("OutputFolderName") ;
28  }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
ElectronDqmHarvesterBase::~ElectronDqmHarvesterBase ( )
protectedvirtual

Definition at line 30 of file ElectronDqmHarvesterBase.cc.

31  {
32  }

Member Function Documentation

void ElectronDqmHarvesterBase::beginJob ( void  )
protectedvirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 103 of file ElectronDqmHarvesterBase.cc.

104  {
105  }
MonitorElement * ElectronDqmHarvesterBase::bookH1 ( DQMStore::IBooker 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" 
)
protected

Definition at line 192 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::book1D(), MonitorElement::getTH1F(), hlt_dqm_clientPB-live_cfg::me, and DQMStore::IBooker::setCurrentFolder().

196  {
198  MonitorElement * me = iBooker.book1D(newName(name),title,nchX,lowX,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) ; }
203  return me ;
204  }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH1F * getTH1F(void) const
std::string newName(const std::string &name)
MonitorElement * ElectronDqmHarvesterBase::bookH1andDivide ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  name,
MonitorElement num,
MonitorElement denom,
const std::string &  titleX,
const std::string &  titleY,
const std::string &  title = "" 
)
protected

Definition at line 272 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::book1D(), MonitorElement::getTH1(), MonitorElement::getTH1F(), hlt_dqm_clientPB-live_cfg::me, DQMStore::IBooker::setCurrentFolder(), MonitorElement::setEfficiencyFlag(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ElectronOfflineClient::finalize(), ElectronMcSignalPostValidator::finalize(), and ElectronMcFakePostValidator::finalize().

276  {
277  if ((!num)||(!denom)) return 0 ;
279  std::string name2 = newName(name) ;
280  TH1F * h_temp = (TH1F *)num->getTH1F()->Clone(name2.c_str()) ;
281  h_temp->Reset() ;
282  h_temp->Divide(num->getTH1(),denom->getTH1(),1,1,"b") ;
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() ; }
287  MonitorElement * me = iBooker.book1D(name2,h_temp) ;
288  if (bookEfficiencyFlag_) { me->setEfficiencyFlag(); }
289  delete h_temp ;
290  return me ;
291  }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
TH1 * getTH1(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH1F * getTH1F(void) const
void setEfficiencyFlag(void)
std::string newName(const std::string &name)
MonitorElement * ElectronDqmHarvesterBase::bookH1andDivide ( DQMStore::IBooker iBooker,
DQMStore::IGetter 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 = "" 
)
protected

Definition at line 156 of file ElectronDqmHarvesterBase.cc.

160  {
161  return bookH1andDivide(iBooker, iGetter, name,get(iGetter, num),get(iGetter, denom),titleX,titleY,title) ;
162  }
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 * ElectronDqmHarvesterBase::bookH1withSumw2 ( DQMStore::IBooker 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" 
)
protected

Definition at line 207 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::book1D(), MonitorElement::getTH1F(), hlt_dqm_clientPB-live_cfg::me, and DQMStore::IBooker::setCurrentFolder().

Referenced by ElectronMcFakePostValidator::finalize(), and ElectronMcSignalPostValidator::finalize().

211  {
213  MonitorElement * me = iBooker.book1D(newName(name),title,nchX,lowX,highX) ;
214  me->getTH1F()->Sumw2() ;
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) ; }
219  return me ;
220  }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH1F * getTH1F(void) const
std::string newName(const std::string &name)
MonitorElement * ElectronDqmHarvesterBase::bookH2 ( DQMStore::IBooker 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" 
)
protected

Definition at line 223 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::book2D(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), hlt_dqm_clientPB-live_cfg::me, and DQMStore::IBooker::setCurrentFolder().

228  {
230  MonitorElement * me = iBooker.book2D(newName(name),title,nchX,lowX,highX,nchY,lowY,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) ; }
235  return me ;
236  }
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
TH1F * getTH1F(void) const
TH2F * getTH2F(void) const
std::string newName(const std::string &name)
MonitorElement * ElectronDqmHarvesterBase::bookH2andDivide ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  name,
MonitorElement num,
MonitorElement denom,
const std::string &  titleX,
const std::string &  titleY,
const std::string &  title = "" 
)
protected

Definition at line 294 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::book2D(), MonitorElement::getTH1(), MonitorElement::getTH2F(), hlt_dqm_clientPB-live_cfg::me, DQMStore::IBooker::setCurrentFolder(), MonitorElement::setEfficiencyFlag(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ElectronMcSignalPostValidator::finalize().

298  {
299  if ((!num)||(!denom)) return 0 ;
301  std::string name2 = newName(name) ;
302  TH2F * h_temp = (TH2F *)num->getTH2F()->Clone(name2.c_str()) ;
303  h_temp->Reset() ;
304  h_temp->Divide(num->getTH1(),denom->getTH1(),1,1,"b") ;
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() ; }
309  MonitorElement * me = iBooker.book2D(name2,h_temp) ;
310  if (bookEfficiencyFlag_) { me->setEfficiencyFlag(); }
311  delete h_temp ;
312  return me ;
313  }
TH1 * getTH1(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void setEfficiencyFlag(void)
TH2F * getTH2F(void) const
std::string newName(const std::string &name)
MonitorElement * ElectronDqmHarvesterBase::bookH2andDivide ( DQMStore::IBooker iBooker,
DQMStore::IGetter 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 = "" 
)
protected

Definition at line 165 of file ElectronDqmHarvesterBase.cc.

169  { return bookH2andDivide(iBooker, iGetter, name,get(iGetter, num),get(iGetter, denom),titleX,titleY,title) ; }
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 * ElectronDqmHarvesterBase::bookH2withSumw2 ( DQMStore::IBooker 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" 
)
protected

Definition at line 239 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::book2D(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), hlt_dqm_clientPB-live_cfg::me, and DQMStore::IBooker::setCurrentFolder().

244  {
246  MonitorElement * me = iBooker.book2D(newName(name),title,nchX,lowX,highX,nchY,lowY,highY) ;
247  me->getTH2F()->Sumw2() ;
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) ; }
252  return me ;
253  }
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
TH1F * getTH1F(void) const
TH2F * getTH2F(void) const
std::string newName(const std::string &name)
MonitorElement * ElectronDqmHarvesterBase::bookP1 ( DQMStore::IBooker 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" 
)
protected

Definition at line 256 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::bookProfile(), MonitorElement::getTH1F(), MonitorElement::getTProfile(), hlt_dqm_clientPB-live_cfg::me, and DQMStore::IBooker::setCurrentFolder().

261  {
263  MonitorElement * me = iBooker.bookProfile(newName(name),title,nchX,lowX,highX,lowY,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) ; }
268  return me ;
269  }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH1F * getTH1F(void) const
TProfile * getTProfile(void) const
std::string newName(const std::string &name)
MonitorElement * ElectronDqmHarvesterBase::cloneH1 ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  name,
MonitorElement original,
const std::string &  title = "" 
)
protected

Definition at line 316 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::book1D(), MonitorElement::getTH1F(), hlt_dqm_clientPB-live_cfg::me, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

319  {
320  if (!original) return 0 ;
322  std::string name2 = newName(name) ;
323  TH1F * h_temp = (TH1F *)original->getTH1F()->Clone(name2.c_str()) ;
324  h_temp->Reset() ;
325  if (title!="") { h_temp->SetTitle(title.c_str()) ; }
326  MonitorElement * me = iBooker.book1D(name2,h_temp) ;
327  delete h_temp ;
328  return me ;
329  }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH1F * getTH1F(void) const
std::string newName(const std::string &name)
MonitorElement * ElectronDqmHarvesterBase::cloneH1 ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  name,
const std::string &  original,
const std::string &  title = "" 
)
protected

Definition at line 172 of file ElectronDqmHarvesterBase.cc.

175  { return cloneH1(iBooker, iGetter, clone,get(iGetter, original),title) ; }
list original
Definition: definitions.py:57
MonitorElement * cloneH1(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *original, const std::string &title="")
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
void ElectronDqmHarvesterBase::dqmEndJob ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 121 of file ElectronDqmHarvesterBase.cc.

References finalDone_, finalize(), finalStep_, outputInternalPath_, DQMStore::IBooker::setCurrentFolder(), and funct::true.

122  {
123 
124  if (finalStep_=="AtJobEnd")
125  {
126  if (finalDone_)
127  { edm::LogWarning("ElectronDqmHarvesterBase::dqmEndJob")<<"finalize() already called" ; }
129  finalDone_ = true ;
130  }
132  finalize( iBooker, iGetter ) ;
133 
134  }
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
virtual void finalize(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void ElectronDqmHarvesterBase::dqmEndLuminosityBlock ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
protectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 107 of file ElectronDqmHarvesterBase.cc.

References finalDone_, finalStep_, outputInternalPath_, DQMStore::IBooker::setCurrentFolder(), and funct::true.

108  {
109  if (finalStep_=="AtLumiEnd")
110  {
111  if (finalDone_)
112  {
113  edm::LogWarning("ElectronDqmHarvesterBase::endLuminosityBlock")<<"finalize() already called" ;
114  }
116  finalDone_ = true ;
117  }
118 
119  }
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
virtual void ElectronDqmHarvesterBase::finalize ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
inlineprotectedvirtual

Reimplemented in ElectronOfflineClient, ElectronMcFakePostValidator, ElectronMcSignalPostValidator, and ElectronMcSignalPostValidatorMiniAOD.

Definition at line 33 of file ElectronDqmHarvesterBase.h.

Referenced by dqmEndJob().

33 {} ; // override ;, const edm::Event& e, const edm::EventSetup & c
bool ElectronDqmHarvesterBase::finalStepDone ( )
inlineprotected

Definition at line 36 of file ElectronDqmHarvesterBase.h.

References finalDone_.

const std::string * ElectronDqmHarvesterBase::find ( DQMStore::IGetter iGetter,
const std::string &  name 
)
private

Definition at line 58 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IGetter::getMEs(), histoNames_, histoNamesReady, outputInternalPath_, cmsHarvester::sep, and funct::true.

Referenced by get(), and remove().

59  {
60  typedef std::vector<std::string> HistoNames ;
61  typedef HistoNames::iterator HistoNamesItr ;
62  if (!histoNamesReady)
63  { histoNamesReady = true ; histoNames_ = iGetter.getMEs() ; }
64  HistoNamesItr histoName ;
65  std::vector<HistoNamesItr> res ;
66 
67  for ( histoName = histoNames_.begin() ; histoName != histoNames_.end() ; ++histoName )
68  {
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) ; }
73  }
74  if (res.size()==0)
75  {
76  std::ostringstream oss ;
77  oss<<"Histogram "<<name<<" not found in "<<outputInternalPath_ ;
78  char sep = ':' ;
79  for ( histoName = histoNames_.begin() ; histoName != histoNames_.end() ; ++histoName )
80  { oss<<sep<<' '<<*histoName ; sep = ',' ; }
81  oss<<'.' ;
82  edm::LogWarning("ElectronDqmHarvesterBase::find")<<oss.str() ;
83  return 0 ;
84  }
85  else if (res.size()>1)
86  {
87  std::ostringstream oss ;
88  oss<<"Ambiguous histograms for "<<name<<" in "<<outputInternalPath_ ;
89  char sep = ':' ;
90  std::vector<HistoNamesItr>::iterator resItr ;
91  for ( resItr = res.begin() ; resItr != res.end() ; ++resItr )
92  { oss<<sep<<' '<<(**resItr) ; sep = ',' ; }
93  oss<<'.' ;
94  edm::LogWarning("ElectronDqmHarvesterBase::find")<<oss.str() ;
95  return 0 ;
96  }
97  else
98  {
99  return &*res[0] ;
100  }
101  }
std::vector< std::string > getMEs(void)
Definition: DQMStore.cc:326
std::vector< std::string > histoNames_
MonitorElement * ElectronDqmHarvesterBase::get ( DQMStore::IGetter iGetter,
const std::string &  name 
)
protected

Definition at line 136 of file ElectronDqmHarvesterBase.cc.

References find(), newFWLiteAna::fullName, DQMStore::IGetter::get(), inputInternalPath_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

137  {
138  const std::string * fullName = find(iGetter, name) ;
139  if (fullName)
140  { return iGetter.get(inputInternalPath_+"/"+*fullName) ; }
141  else
142  { return 0 ; }
143  }
const std::string * find(DQMStore::IGetter &iGetter, const std::string &name)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:304
string fullName
std::string ElectronDqmHarvesterBase::newName ( const std::string &  name)
private

Definition at line 46 of file ElectronDqmHarvesterBase.cc.

References bookIndex_, bookPrefix_, and mergeVDriftHistosByStation::name.

47  {
48  if (bookPrefix_.empty())
49  { return name ; }
50  std::ostringstream oss ;
51  oss<<bookPrefix_ ;
52  if (bookIndex_>=0)
53  { oss<<bookIndex_++ ; }
54  oss<<"_"<<name ;
55  return oss.str() ;
56  }
MonitorElement * ElectronDqmHarvesterBase::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 
)
protected

Definition at line 332 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::bookProfile(), MonitorElement::getName(), MonitorElement::getTH2F(), hlt_dqm_clientPB-live_cfg::me, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ElectronMcSignalPostValidatorMiniAOD::finalize(), ElectronMcSignalPostValidator::finalize(), and ElectronMcFakePostValidator::finalize().

335  {
337  std::string name2 = me2d->getName()+"_pfx" ;
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) ; }
344  MonitorElement * me = iBooker.bookProfile(name2,p1_temp) ;
345  delete p1_temp ;
346  return me ;
347  }
const std::string & getName(void) const
get name of ME
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH2F * getTH2F(void) const
MonitorElement * ElectronDqmHarvesterBase::profileX ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  me2d,
const std::string &  title = "",
const std::string &  titleX = "",
const std::string &  titleY = "",
Double_t  minimum = -1111,
Double_t  maximum = -1111 
)
protected

Definition at line 178 of file ElectronDqmHarvesterBase.cc.

182  { return profileX(iBooker, iGetter, get(iGetter, me2d),title,titleX,titleY,minimum,maximum) ; }
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)
MonitorElement * ElectronDqmHarvesterBase::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 
)
protected

Definition at line 350 of file ElectronDqmHarvesterBase.cc.

References DQMStore::IBooker::bookProfile(), MonitorElement::getName(), MonitorElement::getTH2F(), hlt_dqm_clientPB-live_cfg::me, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ElectronMcSignalPostValidator::finalize().

353  {
355  std::string name2 = me2d->getName()+"_pfy" ;
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) ; }
362  MonitorElement * me = iBooker.bookProfile(name2,p1_temp) ;
363  delete p1_temp ;
364  return me ;
365  }
const std::string & getName(void) const
get name of ME
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH2F * getTH2F(void) const
MonitorElement * ElectronDqmHarvesterBase::profileY ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  me2d,
const std::string &  title = "",
const std::string &  titleX = "",
const std::string &  titleY = "",
Double_t  minimum = -1111,
Double_t  maximum = -1111 
)
protected

Definition at line 185 of file ElectronDqmHarvesterBase.cc.

189  { return profileY(iBooker, iGetter, get(iGetter, me2d),title,titleX,titleY,minimum,maximum) ; }
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)
void ElectronDqmHarvesterBase::remove ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  name 
)
protected

Definition at line 145 of file ElectronDqmHarvesterBase.cc.

References find(), newFWLiteAna::fullName, inputInternalPath_, DQMStore::IGetter::removeElement(), DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

146  {
147  const std::string * fullName = find(iGetter, name) ;
148  if (fullName)
149  {
151  iGetter.removeElement(*fullName) ;
152  }
153  }
const std::string * find(DQMStore::IGetter &iGetter, const std::string &name)
string fullName
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
void removeElement(Args &&...args)
Definition: DQMStore.h:202
void ElectronDqmHarvesterBase::setBookEfficiencyFlag ( const bool &  eff_flag)
protected
void ElectronDqmHarvesterBase::setBookIndex ( short  index)
protected
void ElectronDqmHarvesterBase::setBookPrefix ( const std::string &  prefix)
protected
void ElectronDqmHarvesterBase::setBookStatOverflowFlag ( const bool &  statOverflow_flag)
protected
int ElectronDqmHarvesterBase::verbosity ( )
inlineprotected

Definition at line 37 of file ElectronDqmHarvesterBase.h.

References verbosity_.

Member Data Documentation

bool ElectronDqmHarvesterBase::bookEfficiencyFlag_ = false
private

Definition at line 138 of file ElectronDqmHarvesterBase.h.

Referenced by setBookEfficiencyFlag().

short ElectronDqmHarvesterBase::bookIndex_
private

Definition at line 137 of file ElectronDqmHarvesterBase.h.

Referenced by newName(), and setBookIndex().

std::string ElectronDqmHarvesterBase::bookPrefix_
private

Definition at line 136 of file ElectronDqmHarvesterBase.h.

Referenced by newName(), and setBookPrefix().

bool ElectronDqmHarvesterBase::bookStatOverflowFlag_ = false
private

Definition at line 139 of file ElectronDqmHarvesterBase.h.

Referenced by setBookStatOverflowFlag().

bool ElectronDqmHarvesterBase::finalDone_
private

Definition at line 147 of file ElectronDqmHarvesterBase.h.

Referenced by dqmEndJob(), dqmEndLuminosityBlock(), and finalStepDone().

std::string ElectronDqmHarvesterBase::finalStep_
private
std::vector<std::string> ElectronDqmHarvesterBase::histoNames_
private

Definition at line 141 of file ElectronDqmHarvesterBase.h.

Referenced by find().

bool ElectronDqmHarvesterBase::histoNamesReady
private

Definition at line 140 of file ElectronDqmHarvesterBase.h.

Referenced by find().

std::string ElectronDqmHarvesterBase::inputFile_
private

Definition at line 143 of file ElectronDqmHarvesterBase.h.

Referenced by ElectronDqmHarvesterBase().

std::string ElectronDqmHarvesterBase::inputInternalPath_
private

Definition at line 145 of file ElectronDqmHarvesterBase.h.

Referenced by ElectronDqmHarvesterBase(), get(), and remove().

std::string ElectronDqmHarvesterBase::outputFile_
private

Definition at line 144 of file ElectronDqmHarvesterBase.h.

Referenced by ElectronDqmHarvesterBase().

std::string ElectronDqmHarvesterBase::outputInternalPath_
private
int ElectronDqmHarvesterBase::verbosity_
private

Definition at line 135 of file ElectronDqmHarvesterBase.h.

Referenced by ElectronDqmHarvesterBase(), and verbosity().