CMS 3D CMS Logo

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::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper ElectronMcFakePostValidator ElectronMcSignalPostValidator ElectronMcSignalPostValidatorMiniAOD ElectronOfflineClient

Protected Member Functions

void beginJob () override
 
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, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
 
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="")
 
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, const std::string &original, const std::string &title="")
 
MonitorElementcloneH1 (DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *original, const std::string &title="")
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 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, const std::string &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, 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)
 
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)
 
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 ()
 
 ~ElectronDqmHarvesterBase () override
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (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 DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 16 of file ElectronDqmHarvesterBase.h.

Constructor & Destructor Documentation

◆ ElectronDqmHarvesterBase()

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

◆ ~ElectronDqmHarvesterBase()

ElectronDqmHarvesterBase::~ElectronDqmHarvesterBase ( )
overrideprotected

Definition at line 28 of file ElectronDqmHarvesterBase.cc.

28 {}

Member Function Documentation

◆ beginJob()

void ElectronDqmHarvesterBase::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 93 of file ElectronDqmHarvesterBase.cc.

93 {}

◆ bookH1()

ElectronDqmHarvesterBase::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 186 of file ElectronDqmHarvesterBase.cc.

194  {
195  iBooker.setCurrentFolder(outputInternalPath_);
196  MonitorElement *me = iBooker.book1D(newName(name), title, nchX, lowX, highX);
197  if (!titleX.empty()) {
198  me->setAxisTitle(titleX);
199  }
200  if (!titleY.empty()) {
201  me->getTH1F()->GetYaxis()->SetTitle(titleY.c_str());
202  }
203  if (TString(option) != "") {
204  me->setOption(option);
205  }
206  if (bookStatOverflowFlag_) {
207  me->getTH1F()->StatOverflows(kTRUE);
208  }
209  return me;
210 }

References dqm::implementation::IBooker::book1D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and overlapproblemtsosanalyzer_cfi::title.

◆ bookH1andDivide() [1/2]

ElectronDqmHarvesterBase::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 326 of file ElectronDqmHarvesterBase.cc.

333  {
334  if ((!num) || (!denom))
335  return nullptr;
336  iBooker.setCurrentFolder(outputInternalPath_);
338  TH1F *h_temp = (TH1F *)num->getTH1F()->Clone(name2.c_str());
339  h_temp->Reset();
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());
345  }
346  if (verbosity_ > 0) {
347  h_temp->Print();
348  }
349  MonitorElement *me = iBooker.book1D(name2, h_temp);
350  if (bookEfficiencyFlag_) {
351  me->setEfficiencyFlag();
352  }
353  delete h_temp;
354  return me;
355 }

References dqm::implementation::IBooker::book1D(), bookEfficiencyFlag_, makePileupJSON::denom, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, hfnoseParametersInitialization_cfi::name2, newName(), EgammaValidation_cff::num, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, overlapproblemtsosanalyzer_cfi::title, and verbosity_.

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

◆ bookH1andDivide() [2/2]

ElectronDqmHarvesterBase::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 134 of file ElectronDqmHarvesterBase.cc.

141  {
142  return bookH1andDivide(iBooker, iGetter, name, get(iGetter, num), get(iGetter, denom), titleX, titleY, title);
143 }

References bookH1andDivide(), makePileupJSON::denom, get(), Skims_PA_cff::name, EgammaValidation_cff::num, and overlapproblemtsosanalyzer_cfi::title.

◆ bookH1withSumw2()

ElectronDqmHarvesterBase::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 212 of file ElectronDqmHarvesterBase.cc.

220  {
221  iBooker.setCurrentFolder(outputInternalPath_);
222  MonitorElement *me = iBooker.book1D(newName(name), title, nchX, lowX, highX);
223  me->enableSumw2();
224  if (!titleX.empty()) {
225  me->setAxisTitle(titleX);
226  }
227  if (!titleY.empty()) {
228  me->getTH1F()->GetYaxis()->SetTitle(titleY.c_str());
229  }
230  if (TString(option) != "") {
231  me->setOption(option);
232  }
233  if (bookStatOverflowFlag_) {
234  me->getTH1F()->StatOverflows(kTRUE);
235  }
236  return me;
237 }

References dqm::implementation::IBooker::book1D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and overlapproblemtsosanalyzer_cfi::title.

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

◆ bookH2()

ElectronDqmHarvesterBase::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 239 of file ElectronDqmHarvesterBase.cc.

250  {
251  iBooker.setCurrentFolder(outputInternalPath_);
252  MonitorElement *me = iBooker.book2D(newName(name), title, nchX, lowX, highX, nchY, lowY, highY);
253  if (!titleX.empty()) {
254  me->setAxisTitle(titleX);
255  }
256  if (!titleY.empty()) {
257  me->getTH2F()->GetYaxis()->SetTitle(titleY.c_str());
258  }
259  if (TString(option) != "") {
260  me->setOption(option);
261  }
262  if (bookStatOverflowFlag_) {
263  me->getTH1F()->StatOverflows(kTRUE);
264  }
265  return me;
266 }

References dqm::implementation::IBooker::book2D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and overlapproblemtsosanalyzer_cfi::title.

◆ bookH2andDivide() [1/2]

ElectronDqmHarvesterBase::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 145 of file ElectronDqmHarvesterBase.cc.

152  {
153  return bookH2andDivide(iBooker, iGetter, name, get(iGetter, num), get(iGetter, denom), titleX, titleY, title);
154 }

References bookH2andDivide(), makePileupJSON::denom, get(), Skims_PA_cff::name, EgammaValidation_cff::num, and overlapproblemtsosanalyzer_cfi::title.

Referenced by bookH2andDivide().

◆ bookH2andDivide() [2/2]

ElectronDqmHarvesterBase::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 357 of file ElectronDqmHarvesterBase.cc.

364  {
365  if ((!num) || (!denom))
366  return nullptr;
367  iBooker.setCurrentFolder(outputInternalPath_);
369  TH2F *h_temp = (TH2F *)num->getTH2F()->Clone(name2.c_str());
370  h_temp->Reset();
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());
376  }
377  if (verbosity_ > 0) {
378  h_temp->Print();
379  }
380  MonitorElement *me = iBooker.book2D(name2, h_temp);
381  if (bookEfficiencyFlag_) {
382  me->setEfficiencyFlag();
383  }
384  delete h_temp;
385  return me;
386 }

References dqm::implementation::IBooker::book2D(), bookEfficiencyFlag_, makePileupJSON::denom, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, hfnoseParametersInitialization_cfi::name2, newName(), EgammaValidation_cff::num, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, overlapproblemtsosanalyzer_cfi::title, and verbosity_.

Referenced by ElectronMcSignalPostValidator::finalize().

◆ bookH2withSumw2()

ElectronDqmHarvesterBase::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 268 of file ElectronDqmHarvesterBase.cc.

279  {
280  iBooker.setCurrentFolder(outputInternalPath_);
281  MonitorElement *me = iBooker.book2D(newName(name), title, nchX, lowX, highX, nchY, lowY, highY);
282  me->enableSumw2();
283  if (!titleX.empty()) {
284  me->setAxisTitle(titleX);
285  }
286  if (!titleY.empty()) {
287  me->getTH2F()->GetYaxis()->SetTitle(titleY.c_str());
288  }
289  if (TString(option) != "") {
290  me->setOption(option);
291  }
292  if (bookStatOverflowFlag_) {
293  me->getTH1F()->StatOverflows(kTRUE);
294  }
295  return me;
296 }

References dqm::implementation::IBooker::book2D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and overlapproblemtsosanalyzer_cfi::title.

◆ bookP1()

ElectronDqmHarvesterBase::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 298 of file ElectronDqmHarvesterBase.cc.

308  {
309  iBooker.setCurrentFolder(outputInternalPath_);
310  MonitorElement *me = iBooker.bookProfile(newName(name), title, nchX, lowX, highX, lowY, highY, " ");
311  if (!titleX.empty()) {
312  me->getTProfile()->GetXaxis()->SetTitle(titleX.c_str());
313  }
314  if (!titleY.empty()) {
315  me->getTProfile()->GetYaxis()->SetTitle(titleY.c_str());
316  }
317  if (TString(option) != "") {
318  me->getTProfile()->SetOption(option);
319  }
320  if (bookStatOverflowFlag_) {
321  me->getTH1F()->StatOverflows(kTRUE);
322  }
323  return me;
324 }

References dqm::implementation::IBooker::bookProfile(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, newName(), fileinputsource_cfi::option, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), and overlapproblemtsosanalyzer_cfi::title.

◆ cloneH1() [1/2]

ElectronDqmHarvesterBase::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 156 of file ElectronDqmHarvesterBase.cc.

160  {
161  return cloneH1(iBooker, iGetter, clone, get(iGetter, original), title);
162 }

References clone(), cloneH1(), get(), definitions::original, and overlapproblemtsosanalyzer_cfi::title.

◆ cloneH1() [2/2]

ElectronDqmHarvesterBase::MonitorElement * ElectronDqmHarvesterBase::cloneH1 ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  name,
MonitorElement original,
const std::string &  title = "" 
)
protected

Definition at line 388 of file ElectronDqmHarvesterBase.cc.

392  {
393  if (!original)
394  return nullptr;
395  iBooker.setCurrentFolder(outputInternalPath_);
397  TH1F *h_temp = (TH1F *)original->getTH1F()->Clone(name2.c_str());
398  h_temp->Reset();
399  if (!title.empty()) {
400  h_temp->SetTitle(title.c_str());
401  }
402  MonitorElement *me = iBooker.book1D(name2, h_temp);
403  delete h_temp;
404  return me;
405 }

References dqm::implementation::IBooker::book1D(), hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, hfnoseParametersInitialization_cfi::name2, newName(), definitions::original, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and overlapproblemtsosanalyzer_cfi::title.

Referenced by cloneH1().

◆ dqmEndJob()

void ElectronDqmHarvesterBase::dqmEndJob ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 108 of file ElectronDqmHarvesterBase.cc.

108  {
109  if (finalStep_ == "AtJobEnd") {
110  if (finalDone_) {
111  edm::LogWarning("ElectronDqmHarvesterBase::dqmEndJob") << "finalize() already called";
112  }
113  iBooker.setCurrentFolder(outputInternalPath_);
114  finalDone_ = true;
115  }
116  iBooker.setCurrentFolder(outputInternalPath_);
117  finalize(iBooker, iGetter);
118 }

References finalDone_, finalize(), finalStep_, outputInternalPath_, and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ dqmEndLuminosityBlock()

void ElectronDqmHarvesterBase::dqmEndLuminosityBlock ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 95 of file ElectronDqmHarvesterBase.cc.

98  {
99  if (finalStep_ == "AtLumiEnd") {
100  if (finalDone_) {
101  edm::LogWarning("ElectronDqmHarvesterBase::endLuminosityBlock") << "finalize() already called";
102  }
103  iBooker.setCurrentFolder(outputInternalPath_);
104  finalDone_ = true;
105  }
106 }

References finalDone_, finalStep_, outputInternalPath_, and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ finalize()

virtual void ElectronDqmHarvesterBase::finalize ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
inlineprotectedvirtual

Reimplemented in ElectronMcFakePostValidator, ElectronMcSignalPostValidator, ElectronOfflineClient, and ElectronMcSignalPostValidatorMiniAOD.

Definition at line 30 of file ElectronDqmHarvesterBase.h.

31  {}; // override ;, const edm::Event& e, const edm::EventSetup & c

Referenced by dqmEndJob().

◆ finalStepDone()

bool ElectronDqmHarvesterBase::finalStepDone ( )
inlineprotected

Definition at line 34 of file ElectronDqmHarvesterBase.h.

34 { return finalDone_; }

References finalDone_.

◆ find()

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

Definition at line 53 of file ElectronDqmHarvesterBase.cc.

53  {
54  if (!histoNamesReady) {
55  histoNamesReady = true;
56  histoNames_ = iGetter.getMEs();
57  }
58  std::vector<const std::string *> res;
59  std::size_t nsize = name.size();
60 
61  for (const auto &histoName : histoNames_) {
62  std::size_t lsize = histoName.size();
63  if ((lsize >= nsize) && (histoName.find(name) == (lsize - nsize))) {
64  res.push_back(&histoName);
65  }
66  }
67  if (res.empty()) {
68  std::ostringstream oss;
69  oss << "Histogram " << name << " not found in " << outputInternalPath_;
70  char sep = ':';
71  for (auto const &histoName : histoNames_) {
72  oss << sep << ' ' << histoName;
73  sep = ',';
74  }
75  oss << '.';
76  edm::LogWarning("ElectronDqmHarvesterBase::find") << oss.str();
77  return nullptr;
78  } else if (res.size() > 1) {
79  std::ostringstream oss;
80  oss << "Ambiguous histograms for " << name << " in " << outputInternalPath_;
81  char sep = ':';
82  for (auto const resItr : res) {
83  oss << sep << ' ' << *resItr;
84  sep = ',';
85  }
86  oss << '.';
87  edm::LogWarning("ElectronDqmHarvesterBase::find") << oss.str();
88  return nullptr;
89  }
90  return res[0];
91 }

References dqm::implementation::IGetter::getMEs(), HltBtagPostValidation_cff::histoName, histoNames_, histoNamesReady, Skims_PA_cff::name, and outputInternalPath_.

Referenced by get().

◆ get()

ElectronDqmHarvesterBase::MonitorElement * ElectronDqmHarvesterBase::get ( DQMStore::IGetter iGetter,
const std::string &  name 
)
protected

◆ newName()

std::string ElectronDqmHarvesterBase::newName ( const std::string &  name)
private

Definition at line 40 of file ElectronDqmHarvesterBase.cc.

40  {
41  if (bookPrefix_.empty()) {
42  return name;
43  }
44  std::ostringstream oss;
45  oss << bookPrefix_;
46  if (bookIndex_ >= 0) {
47  oss << bookIndex_++;
48  }
49  oss << "_" << name;
50  return oss.str();
51 }

References bookIndex_, bookPrefix_, and Skims_PA_cff::name.

Referenced by bookH1(), bookH1andDivide(), bookH1withSumw2(), bookH2(), bookH2andDivide(), bookH2withSumw2(), bookP1(), and cloneH1().

◆ profileX() [1/2]

ElectronDqmHarvesterBase::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 164 of file ElectronDqmHarvesterBase.cc.

171  {
172  return profileX(iBooker, iGetter, get(iGetter, me2d), title, titleX, titleY, minimum, maximum);
173 }

References get(), profileX(), and overlapproblemtsosanalyzer_cfi::title.

◆ profileX() [2/2]

ElectronDqmHarvesterBase::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 407 of file ElectronDqmHarvesterBase.cc.

414  {
415  iBooker.setCurrentFolder(outputInternalPath_);
416  std::string name2 = me2d->getName() + "_pfx";
417  TProfile *p1_temp = me2d->getTH2F()->ProfileX();
418  if (!title.empty()) {
419  p1_temp->SetTitle(title.c_str());
420  }
421  if (!titleX.empty()) {
422  p1_temp->GetXaxis()->SetTitle(titleX.c_str());
423  }
424  if (!titleY.empty()) {
425  p1_temp->GetYaxis()->SetTitle(titleY.c_str());
426  }
427  if (minimum != -1111) {
428  p1_temp->SetMinimum(minimum);
429  }
430  if (maximum != -1111) {
431  p1_temp->SetMaximum(maximum);
432  }
433  MonitorElement *me = iBooker.bookProfile(name2, p1_temp);
434  delete p1_temp;
435  return me;
436 }

References dqm::implementation::IBooker::bookProfile(), dqm::impl::MonitorElement::getName(), dqm::legacy::MonitorElement::getTH2F(), hlt_dqm_clientPB-live_cfg::me, hfnoseParametersInitialization_cfi::name2, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and overlapproblemtsosanalyzer_cfi::title.

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

◆ profileY() [1/2]

ElectronDqmHarvesterBase::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 175 of file ElectronDqmHarvesterBase.cc.

182  {
183  return profileY(iBooker, iGetter, get(iGetter, me2d), title, titleX, titleY, minimum, maximum);
184 }

References get(), profileY(), and overlapproblemtsosanalyzer_cfi::title.

◆ profileY() [2/2]

ElectronDqmHarvesterBase::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 438 of file ElectronDqmHarvesterBase.cc.

445  {
446  iBooker.setCurrentFolder(outputInternalPath_);
447  std::string name2 = me2d->getName() + "_pfy";
448  TProfile *p1_temp = me2d->getTH2F()->ProfileY();
449  if (!title.empty()) {
450  p1_temp->SetTitle(title.c_str());
451  }
452  if (!titleX.empty()) {
453  p1_temp->GetXaxis()->SetTitle(titleX.c_str());
454  }
455  if (!titleY.empty()) {
456  p1_temp->GetYaxis()->SetTitle(titleY.c_str());
457  }
458  if (minimum != -1111) {
459  p1_temp->SetMinimum(minimum);
460  }
461  if (maximum != -1111) {
462  p1_temp->SetMaximum(maximum);
463  }
464  MonitorElement *me = iBooker.bookProfile(name2, p1_temp);
465  delete p1_temp;
466  return me;
467 }

References dqm::implementation::IBooker::bookProfile(), dqm::impl::MonitorElement::getName(), dqm::legacy::MonitorElement::getTH2F(), hlt_dqm_clientPB-live_cfg::me, hfnoseParametersInitialization_cfi::name2, outputInternalPath_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and overlapproblemtsosanalyzer_cfi::title.

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

◆ remove()

void ElectronDqmHarvesterBase::remove ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::string &  name 
)
protected

Definition at line 130 of file ElectronDqmHarvesterBase.cc.

130  {
131  // TODO: remove no longer supported in DQMStore.
132 }

Referenced by ElectronOfflineClient::finalize().

◆ setBookEfficiencyFlag()

void ElectronDqmHarvesterBase::setBookEfficiencyFlag ( const bool &  eff_flag)
protected

◆ setBookIndex()

void ElectronDqmHarvesterBase::setBookIndex ( short  index)
protected

◆ setBookPrefix()

void ElectronDqmHarvesterBase::setBookPrefix ( const std::string &  prefix)
protected

◆ setBookStatOverflowFlag()

void ElectronDqmHarvesterBase::setBookStatOverflowFlag ( const bool &  statOverflow_flag)
protected

◆ verbosity()

int ElectronDqmHarvesterBase::verbosity ( )
inlineprotected

Definition at line 35 of file ElectronDqmHarvesterBase.h.

35 { return verbosity_; }

References verbosity_.

Member Data Documentation

◆ bookEfficiencyFlag_

bool ElectronDqmHarvesterBase::bookEfficiencyFlag_ = false
private

◆ bookIndex_

short ElectronDqmHarvesterBase::bookIndex_
private

Definition at line 189 of file ElectronDqmHarvesterBase.h.

Referenced by newName(), and setBookIndex().

◆ bookPrefix_

std::string ElectronDqmHarvesterBase::bookPrefix_
private

Definition at line 188 of file ElectronDqmHarvesterBase.h.

Referenced by newName(), and setBookPrefix().

◆ bookStatOverflowFlag_

bool ElectronDqmHarvesterBase::bookStatOverflowFlag_ = false
private

◆ finalDone_

bool ElectronDqmHarvesterBase::finalDone_
private

Definition at line 199 of file ElectronDqmHarvesterBase.h.

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

◆ finalStep_

std::string ElectronDqmHarvesterBase::finalStep_
private

◆ histoNames_

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

Definition at line 193 of file ElectronDqmHarvesterBase.h.

Referenced by find().

◆ histoNamesReady

bool ElectronDqmHarvesterBase::histoNamesReady
private

Definition at line 192 of file ElectronDqmHarvesterBase.h.

Referenced by find().

◆ inputFile_

std::string ElectronDqmHarvesterBase::inputFile_
private

Definition at line 195 of file ElectronDqmHarvesterBase.h.

Referenced by ElectronDqmHarvesterBase().

◆ inputInternalPath_

std::string ElectronDqmHarvesterBase::inputInternalPath_
private

Definition at line 197 of file ElectronDqmHarvesterBase.h.

Referenced by ElectronDqmHarvesterBase(), and get().

◆ outputFile_

std::string ElectronDqmHarvesterBase::outputFile_
private

Definition at line 196 of file ElectronDqmHarvesterBase.h.

Referenced by ElectronDqmHarvesterBase().

◆ outputInternalPath_

std::string ElectronDqmHarvesterBase::outputInternalPath_
private

◆ verbosity_

int ElectronDqmHarvesterBase::verbosity_
private
ElectronDqmHarvesterBase::find
const std::string * find(DQMStore::IGetter &iGetter, const std::string &name)
Definition: ElectronDqmHarvesterBase.cc:53
ElectronDqmHarvesterBase::newName
std::string newName(const std::string &name)
Definition: ElectronDqmHarvesterBase.cc:40
ElectronDqmHarvesterBase::bookH1andDivide
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="")
Definition: ElectronDqmHarvesterBase.cc:326
ElectronDqmHarvesterBase::inputFile_
std::string inputFile_
Definition: ElectronDqmHarvesterBase.h:195
ElectronDqmHarvesterBase::bookH2andDivide
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="")
Definition: ElectronDqmHarvesterBase.cc:357
makePileupJSON.denom
denom
Definition: makePileupJSON.py:147
ElectronDqmHarvesterBase::bookIndex_
short bookIndex_
Definition: ElectronDqmHarvesterBase.h:189
ElectronDqmHarvesterBase::inputInternalPath_
std::string inputInternalPath_
Definition: ElectronDqmHarvesterBase.h:197
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
ElectronDqmHarvesterBase::bookEfficiencyFlag_
bool bookEfficiencyFlag_
Definition: ElectronDqmHarvesterBase.h:190
ElectronDqmHarvesterBase::profileY
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)
Definition: ElectronDqmHarvesterBase.cc:438
ElectronDqmHarvesterBase::finalDone_
bool finalDone_
Definition: ElectronDqmHarvesterBase.h:199
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
ElectronDqmHarvesterBase::outputInternalPath_
std::string outputInternalPath_
Definition: ElectronDqmHarvesterBase.h:198
ElectronDqmHarvesterBase::cloneH1
MonitorElement * cloneH1(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *original, const std::string &title="")
Definition: ElectronDqmHarvesterBase.cc:388
ElectronDqmHarvesterBase::profileX
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)
Definition: ElectronDqmHarvesterBase.cc:407
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
newFWLiteAna.fullName
fullName
Definition: newFWLiteAna.py:122
edm::LogWarning
Definition: MessageLogger.h:141
ElectronDqmHarvesterBase::bookStatOverflowFlag_
bool bookStatOverflowFlag_
Definition: ElectronDqmHarvesterBase.h:191
definitions.original
original
Definition: definitions.py:57
ElectronDqmHarvesterBase::histoNamesReady
bool histoNamesReady
Definition: ElectronDqmHarvesterBase.h:192
ElectronDqmHarvesterBase::histoNames_
std::vector< std::string > histoNames_
Definition: ElectronDqmHarvesterBase.h:193
res
Definition: Electron.h:6
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ElectronDqmHarvesterBase::get
MonitorElement * get(DQMStore::IGetter &iGetter, const std::string &name)
Definition: ElectronDqmHarvesterBase.cc:120
ElectronDqmHarvesterBase::finalStep_
std::string finalStep_
Definition: ElectronDqmHarvesterBase.h:194
ElectronDqmHarvesterBase::finalize
virtual void finalize(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
Definition: ElectronDqmHarvesterBase.h:30
dqm::impl::MonitorElement::getName
const std::string & getName() const
get name of ME
Definition: MonitorElement.h:250
ElectronDqmHarvesterBase::outputFile_
std::string outputFile_
Definition: ElectronDqmHarvesterBase.h:196
ElectronDqmHarvesterBase::verbosity_
int verbosity_
Definition: ElectronDqmHarvesterBase.h:187
HltBtagPostValidation_cff.histoName
histoName
Definition: HltBtagPostValidation_cff.py:17
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ElectronDqmHarvesterBase::bookPrefix_
std::string bookPrefix_
Definition: ElectronDqmHarvesterBase.h:188
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
hfnoseParametersInitialization_cfi.name2
name2
Definition: hfnoseParametersInitialization_cfi.py:8
ZMuMuAnalysisNtupler_cff.prefix
prefix
Definition: ZMuMuAnalysisNtupler_cff.py:14
dqm::legacy::MonitorElement::getTH2F
virtual TH2F * getTH2F() const
Definition: MonitorElement.h:490