CMS 3D CMS Logo

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

#include <ElectronDqmAnalyzerBase.h>

Inheritance diagram for ElectronDqmAnalyzerBase:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator > ElectronAnalyzer ElectronGeneralAnalyzer ElectronMcFakeValidator ElectronMcSignalValidator ElectronMcSignalValidatorMiniAOD ElectronTagProbeAnalyzer

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) 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")
 
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")
 
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")
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
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, const std::string &name, MonitorElement *original, const std::string &title="")
 
MonitorElementcloneH1 (DQMStore::IBooker &iBooker, const std::string &name, const std::string &original, const std::string &title="")
 
 ElectronDqmAnalyzerBase (const edm::ParameterSet &conf)
 
void setBookEfficiencyFlag (const bool &)
 
void setBookIndex (short)
 
void setBookPrefix (const std::string &)
 
void setBookStatOverflowFlag (const bool &)
 
int verbosity ()
 
 ~ElectronDqmAnalyzerBase () override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

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

Private Attributes

bool bookEfficiencyFlag_ = false
 
short bookIndex_
 
std::string bookPrefix_
 
bool bookStatOverflowFlag_ = false
 
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 DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 19 of file ElectronDqmAnalyzerBase.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file ElectronDqmAnalyzerBase.cc.

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

19  : bookPrefix_("ele"), bookIndex_(0), histoNamesReady(false) {
20  verbosity_ = conf.getUntrackedParameter<int>("Verbosity");
21  finalStep_ = conf.getParameter<std::string>("FinalStep");
22  inputFile_ = conf.getParameter<std::string>("InputFile");
23  outputFile_ = conf.getParameter<std::string>("OutputFile");
24  inputInternalPath_ = conf.getParameter<std::string>("InputFolderName");
25  outputInternalPath_ = conf.getParameter<std::string>("OutputFolderName");
26 }
T getUntrackedParameter(std::string const &, T const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ElectronDqmAnalyzerBase::~ElectronDqmAnalyzerBase ( )
overrideprotected

Definition at line 28 of file ElectronDqmAnalyzerBase.cc.

28 {}

Member Function Documentation

void ElectronDqmAnalyzerBase::analyze ( const edm::Event e,
const edm::EventSetup c 
)
inlineoverrideprotectedvirtual
ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::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 57 of file ElectronDqmAnalyzerBase.cc.

References dqm::implementation::IBooker::book1D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, newName(), outputInternalPath_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setOption(), and dqm::impl::MonitorElement::setStatOverflows().

Referenced by ElectronMcSignalValidatorMiniAOD::bookHistograms(), ElectronGeneralAnalyzer::bookHistograms(), ElectronTagProbeAnalyzer::bookHistograms(), ElectronMcSignalValidator::bookHistograms(), ElectronMcFakeValidator::bookHistograms(), and ElectronAnalyzer::bookHistograms().

65  {
67  MonitorElement *me = iBooker.book1D(newName(name), title, nchX, lowX, highX);
68  if (!titleX.empty()) {
69  me->setAxisTitle(titleX);
70  }
71  if (!titleY.empty()) {
72  me->setAxisTitle(titleY, 2);
73  }
74  if (TString(option) != "") {
75  me->setOption(option);
76  }
78  me->setStatOverflows(kTRUE);
79  }
80  return me;
81 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual void setOption(const char *option)
virtual DQM_DEPRECATED void setStatOverflows(bool value)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::string newName(const std::string &name)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::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 83 of file ElectronDqmAnalyzerBase.cc.

References dqm::implementation::IBooker::book1D(), bookStatOverflowFlag_, dqm::impl::MonitorElement::enableSumw2(), dqm::impl::MonitorElement::getTH1F(), hlt_dqm_clientPB-live_cfg::me, newName(), outputInternalPath_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setOption(), and dqm::impl::MonitorElement::setStatOverflows().

Referenced by ElectronMcSignalValidatorMiniAOD::bookHistograms(), ElectronTagProbeAnalyzer::bookHistograms(), ElectronMcSignalValidator::bookHistograms(), ElectronMcFakeValidator::bookHistograms(), and ElectronAnalyzer::bookHistograms().

91  {
93  MonitorElement *me = iBooker.book1D(newName(name), title, nchX, lowX, highX);
94  if (me->getTH1F()->GetSumw2N() == 0)
95  me->enableSumw2();
96  if (!titleX.empty()) {
97  me->setAxisTitle(titleX);
98  }
99  if (!titleY.empty()) {
100  me->setAxisTitle(titleY, 2);
101  }
102  if (TString(option) != "") {
103  me->setOption(option);
104  }
105  if (bookStatOverflowFlag_) {
106  me->setStatOverflows(kTRUE);
107  }
108  return me;
109 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual void setOption(const char *option)
virtual TH1F * getTH1F() const
virtual DQM_DEPRECATED void setStatOverflows(bool value)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::string newName(const std::string &name)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::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 111 of file ElectronDqmAnalyzerBase.cc.

References dqm::implementation::IBooker::book2D(), bookStatOverflowFlag_, hlt_dqm_clientPB-live_cfg::me, newName(), outputInternalPath_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setOption(), and dqm::impl::MonitorElement::setStatOverflows().

Referenced by ElectronMcSignalValidatorMiniAOD::bookHistograms(), ElectronGeneralAnalyzer::bookHistograms(), ElectronTagProbeAnalyzer::bookHistograms(), ElectronMcSignalValidator::bookHistograms(), ElectronMcFakeValidator::bookHistograms(), and ElectronAnalyzer::bookHistograms().

122  {
124  MonitorElement *me = iBooker.book2D(newName(name), title, nchX, lowX, highX, nchY, lowY, highY);
125  if (!titleX.empty()) {
126  me->setAxisTitle(titleX);
127  }
128  if (!titleY.empty()) {
129  me->setAxisTitle(titleY, 2);
130  }
131  if (TString(option) != "") {
132  me->setOption(option);
133  }
134  if (bookStatOverflowFlag_) {
135  me->setStatOverflows(kTRUE);
136  }
137  return me;
138 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual void setOption(const char *option)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
virtual DQM_DEPRECATED void setStatOverflows(bool value)
std::string newName(const std::string &name)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::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 140 of file ElectronDqmAnalyzerBase.cc.

References dqm::implementation::IBooker::book2D(), bookStatOverflowFlag_, dqm::impl::MonitorElement::enableSumw2(), dqm::impl::MonitorElement::getTH2F(), hlt_dqm_clientPB-live_cfg::me, newName(), outputInternalPath_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setOption(), and dqm::impl::MonitorElement::setStatOverflows().

Referenced by ElectronMcSignalValidatorMiniAOD::bookHistograms(), and ElectronMcSignalValidator::bookHistograms().

151  {
153  MonitorElement *me = iBooker.book2D(newName(name), title, nchX, lowX, highX, nchY, lowY, highY);
154  if (me->getTH2F()->GetSumw2N() == 0)
155  me->enableSumw2();
156  if (!titleX.empty()) {
157  me->setAxisTitle(titleX);
158  }
159  if (!titleY.empty()) {
160  me->setAxisTitle(titleY, 2);
161  }
162  if (TString(option) != "") {
163  me->setOption(option);
164  }
165  if (bookStatOverflowFlag_) {
166  me->setStatOverflows(kTRUE);
167  }
168  return me;
169 }
virtual TH2F * getTH2F() const
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual void setOption(const char *option)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
virtual DQM_DEPRECATED void setStatOverflows(bool value)
std::string newName(const std::string &name)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void ElectronDqmAnalyzerBase::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Reimplemented in ElectronAnalyzer, ElectronMcFakeValidator, ElectronMcSignalValidator, ElectronTagProbeAnalyzer, ElectronGeneralAnalyzer, and ElectronMcSignalValidatorMiniAOD.

Definition at line 53 of file ElectronDqmAnalyzerBase.cc.

53  {
54  edm::LogInfo("DQMAnalyzeBase::bookHistograms") << std::endl;
55 }
Log< level::Info, false > LogInfo
ElectronDqmAnalyzerBase::MonitorElement * ElectronDqmAnalyzerBase::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 171 of file ElectronDqmAnalyzerBase.cc.

References dqm::implementation::IBooker::bookProfile(), bookStatOverflowFlag_, dqm::impl::MonitorElement::getTProfile(), hlt_dqm_clientPB-live_cfg::me, newName(), outputInternalPath_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), and dqm::impl::MonitorElement::setStatOverflows().

Referenced by ElectronGeneralAnalyzer::bookHistograms(), ElectronMcSignalValidator::bookHistograms(), ElectronMcFakeValidator::bookHistograms(), and ElectronAnalyzer::bookHistograms().

181  {
183  MonitorElement *me = iBooker.bookProfile(newName(name), title, nchX, lowX, highX, lowY, highY, " ");
184  if (!titleX.empty()) {
185  me->getTProfile()->GetXaxis()->SetTitle(titleX.c_str());
186  }
187  if (!titleY.empty()) {
188  me->setAxisTitle(titleY, 2);
189  }
190  if (TString(option) != "") {
191  me->getTProfile()->SetOption(option);
192  }
193  if (bookStatOverflowFlag_) {
194  me->setStatOverflows(kTRUE);
195  }
196  return me;
197 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
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())
Definition: DQMStore.h:322
virtual TProfile * getTProfile() const
virtual DQM_DEPRECATED void setStatOverflows(bool value)
std::string newName(const std::string &name)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement* ElectronDqmAnalyzerBase::cloneH1 ( DQMStore::IBooker iBooker,
const std::string &  name,
MonitorElement original,
const std::string &  title = "" 
)
protected
MonitorElement* ElectronDqmAnalyzerBase::cloneH1 ( DQMStore::IBooker iBooker,
const std::string &  name,
const std::string &  original,
const std::string &  title = "" 
)
protected
std::string ElectronDqmAnalyzerBase::newName ( const std::string &  name)
private

Definition at line 40 of file ElectronDqmAnalyzerBase.cc.

References bookIndex_, bookPrefix_, and mergeVDriftHistosByStation::name.

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

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 }
void ElectronDqmAnalyzerBase::setBookEfficiencyFlag ( const bool &  eff_flag)
protected
void ElectronDqmAnalyzerBase::setBookIndex ( short  index)
protected
void ElectronDqmAnalyzerBase::setBookPrefix ( const std::string &  prefix)
protected
void ElectronDqmAnalyzerBase::setBookStatOverflowFlag ( const bool &  statOverflow_flag)
protected
int ElectronDqmAnalyzerBase::verbosity ( )
inlineprotected

Definition at line 31 of file ElectronDqmAnalyzerBase.h.

References verbosity_.

Member Data Documentation

bool ElectronDqmAnalyzerBase::bookEfficiencyFlag_ = false
private

Definition at line 110 of file ElectronDqmAnalyzerBase.h.

Referenced by setBookEfficiencyFlag().

short ElectronDqmAnalyzerBase::bookIndex_
private

Definition at line 109 of file ElectronDqmAnalyzerBase.h.

Referenced by newName(), and setBookIndex().

std::string ElectronDqmAnalyzerBase::bookPrefix_
private

Definition at line 108 of file ElectronDqmAnalyzerBase.h.

Referenced by newName(), and setBookPrefix().

bool ElectronDqmAnalyzerBase::bookStatOverflowFlag_ = false
private
std::string ElectronDqmAnalyzerBase::finalStep_
private

Definition at line 114 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase().

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

Definition at line 113 of file ElectronDqmAnalyzerBase.h.

bool ElectronDqmAnalyzerBase::histoNamesReady
private

Definition at line 112 of file ElectronDqmAnalyzerBase.h.

std::string ElectronDqmAnalyzerBase::inputFile_
private

Definition at line 115 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase().

std::string ElectronDqmAnalyzerBase::inputInternalPath_
private

Definition at line 117 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase().

std::string ElectronDqmAnalyzerBase::outputFile_
private

Definition at line 116 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase().

std::string ElectronDqmAnalyzerBase::outputInternalPath_
private
int ElectronDqmAnalyzerBase::verbosity_
private

Definition at line 107 of file ElectronDqmAnalyzerBase.h.

Referenced by ElectronDqmAnalyzerBase(), and verbosity().