CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DQMOfflineHLTEventInfoClient Class Reference

#include <DQMOfflineHLTEventInfoClient.h>

Inheritance diagram for DQMOfflineHLTEventInfoClient:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 DQMOfflineHLTEventInfoClient (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DQMOfflineHLTEventInfoClient () override
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Fake Analyze. More...
 
void beginJob () override
 BeginJob. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c) override
 BeginRun. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c) override
 EndRun. More...
 
- 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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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

void initialize ()
 

Private Attributes

MonitorElementCertificationSummary_
 
std::vector< MonitorElement * > CertificationSummaryContent_
 
MonitorElementCertificationSummaryMap_
 
int counterEvt_
 counter More...
 
int counterLS_
 
DQMStoredbe_
 
edm::ParameterSet parameters_
 
int prescaleEvt_
 units of lumi sections More...
 
int prescaleLS_
 counter More...
 
MonitorElementreportSummary_
 prescale on number of events More...
 
std::vector< MonitorElement * > reportSummaryContent_
 
MonitorElementreportSummaryMap_
 
bool verbose_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Detailed Description

Definition at line 20 of file DQMOfflineHLTEventInfoClient.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 23 of file DQMOfflineHLTEventInfoClient.h.

◆ MonitorElement

Definition at line 22 of file DQMOfflineHLTEventInfoClient.h.

Constructor & Destructor Documentation

◆ DQMOfflineHLTEventInfoClient()

DQMOfflineHLTEventInfoClient::DQMOfflineHLTEventInfoClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 82 of file DQMOfflineHLTEventInfoClient.cc.

82  {
83  parameters_ = ps;
84  initialize();
85 }

References initialize().

◆ ~DQMOfflineHLTEventInfoClient()

DQMOfflineHLTEventInfoClient::~DQMOfflineHLTEventInfoClient ( )
override

Destructor.

Definition at line 87 of file DQMOfflineHLTEventInfoClient.cc.

87  {
88  if (verbose_)
89  cout << "[TriggerDQM]: ending... " << endl;
90 }

References gather_cfg::cout.

Member Function Documentation

◆ analyze()

void DQMOfflineHLTEventInfoClient::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 172 of file DQMOfflineHLTEventInfoClient.cc.

172  {
173  counterEvt_++;
174  if (prescaleEvt_ < 1)
175  return;
176  if (prescaleEvt_ > 0 && counterEvt_ % prescaleEvt_ != 0)
177  return;
178 
179  if (verbose_)
180  cout << "DQMOfflineHLTEventInfoClient::analyze" << endl;
181 }

References gather_cfg::cout.

◆ beginJob()

void DQMOfflineHLTEventInfoClient::beginJob ( void  )
overrideprotectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 115 of file DQMOfflineHLTEventInfoClient.cc.

115  {
116  if (verbose_)
117  cout << "[TriggerDQM]: Begin Job" << endl;
118  // get backendinterface
119  dbe_ = Service<DQMStore>().operator->();
120 
121  dbe_->setCurrentFolder("HLT/EventInfo");
122 
123  reportSummary_ = dbe_->bookFloat("reportSummary");
124  //initialize reportSummary to 1
125  if (reportSummary_)
126  reportSummary_->Fill(1);
127 
128  // CertificationSummary
129  CertificationSummary_ = dbe_->bookFloat("CertificationSummary");
130  //initialize CertificationSummary to 1
133 
134  //initialize reportSummary to 1
135  if (reportSummary_)
136  reportSummary_->Fill(1);
137 
138  // OK HERE
139 
140  // reportSummaryMap
141  dbe_->setCurrentFolder("HLT/EventInfo");
142 
143  reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 6, 1, 7);
146  reportSummaryMap_->setBinLabel(1, "Muon", 2);
147  reportSummaryMap_->setBinLabel(2, "Electron", 2);
148  reportSummaryMap_->setBinLabel(3, "Photon", 2);
149  reportSummaryMap_->setBinLabel(4, "JetMET", 2);
150  reportSummaryMap_->setBinLabel(5, "BJet", 2);
151  reportSummaryMap_->setBinLabel(6, "Tau", 2);
152  reportSummaryMap_->setBinLabel(1, " ", 1);
153 
154  CertificationSummaryMap_ = dbe_->book2D("CertificationSummaryMap", "CertificationSummaryMap", 1, 1, 2, 6, 1, 7);
157  CertificationSummaryMap_->setBinLabel(1, "Muon", 2);
158  CertificationSummaryMap_->setBinLabel(2, "Electron", 2);
159  CertificationSummaryMap_->setBinLabel(3, "Photon", 2);
160  CertificationSummaryMap_->setBinLabel(4, "JetMET", 2);
161  CertificationSummaryMap_->setBinLabel(5, "BJet", 2);
164 }

References dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), gather_cfg::cout, dbe_, dqm::impl::MonitorElement::Fill(), dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::DQMStore::setCurrentFolder().

◆ beginRun()

void DQMOfflineHLTEventInfoClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 167 of file DQMOfflineHLTEventInfoClient.cc.

167 {}

◆ endRun()

void DQMOfflineHLTEventInfoClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 184 of file DQMOfflineHLTEventInfoClient.cc.

184  {
185  float summarySum = 0;
186  float reportSummary = 0;
187 
188  dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents");
189  MonitorElement* HLT_Muon = dbe_->get("HLT_Muon");
190  if (HLT_Muon)
191  reportSummaryContent_.push_back(HLT_Muon);
192 
193  MonitorElement* HLT_Electron = dbe_->get("HLT_Electron");
194  if (HLT_Electron)
195  reportSummaryContent_.push_back(HLT_Electron);
196 
197  MonitorElement* HLT_Photon = dbe_->get("HLT_Photon");
198  if (HLT_Photon)
199  reportSummaryContent_.push_back(HLT_Photon);
200 
201  MonitorElement* HLT_Tau = dbe_->get("HLT_Tau");
202  if (HLT_Tau)
203  reportSummaryContent_.push_back(HLT_Tau);
204 
205  int nSubsystems = reportSummaryContent_.size();
206 
207  for (int m = 0; m < nSubsystems; m++) {
208  summarySum += (reportSummaryContent_[m])->getFloatValue();
209  }
210 
211  if (nSubsystems > 0) {
212  reportSummary = summarySum / nSubsystems;
213  ;
214  } else {
215  reportSummary = 1;
216  }
217 
218  reportSummary_->Fill(reportSummary);
219  CertificationSummary_->Fill(reportSummary);
220 
221  float muonValue = 1;
222  if (HLT_Muon)
223  muonValue = HLT_Muon->getFloatValue();
224 
225  float electronValue = 1;
226  if (HLT_Electron)
227  electronValue = HLT_Electron->getFloatValue();
228 
229  float photonValue = 1;
230  if (HLT_Photon)
231  photonValue = HLT_Photon->getFloatValue();
232 
233  float tauValue = 1;
234  if (HLT_Tau)
235  tauValue = HLT_Tau->getFloatValue();
236 
237  reportSummaryMap_->setBinContent(1, 1, muonValue); //Muon
238  reportSummaryMap_->setBinContent(1, 2, electronValue); //Electron
239  reportSummaryMap_->setBinContent(1, 3, photonValue); //Photon
240  reportSummaryMap_->setBinContent(1, 4, 1); //JetMET
241  reportSummaryMap_->setBinContent(1, 5, 1); //BJet
242  reportSummaryMap_->setBinContent(1, 6, tauValue); //Tau
243 
244  CertificationSummaryMap_->setBinContent(1, 1, muonValue); //Muon
245  CertificationSummaryMap_->setBinContent(1, 2, electronValue); //Electron
246  CertificationSummaryMap_->setBinContent(1, 3, photonValue); //Photon
247  CertificationSummaryMap_->setBinContent(1, 4, 1); //JetMET
248  CertificationSummaryMap_->setBinContent(1, 5, 1); //BJet
249  CertificationSummaryMap_->setBinContent(1, 6, tauValue); //Tau
250 }

References dbe_, dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getFloatValue(), visualization-live-secondInstance_cfg::m, and dqm::implementation::DQMStore::setCurrentFolder().

◆ initialize()

void DQMOfflineHLTEventInfoClient::initialize ( )
private

Definition at line 93 of file DQMOfflineHLTEventInfoClient.cc.

93  {
94  counterLS_ = 0;
95  counterEvt_ = 0;
96 
97  // get back-end interface
98  dbe_ = Service<DQMStore>().operator->();
99 
100  // base folder for the contents of this job
101  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
102 
103  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
104  if (verbose_)
105  cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)" << endl;
106 
107  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
108  if (verbose_)
109  cout << "DQM event prescale = " << prescaleEvt_ << " events(s)" << endl;
110  /*
111  */
112 }

References gather_cfg::cout, and dbe_.

Member Data Documentation

◆ CertificationSummary_

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummary_
private

Definition at line 60 of file DQMOfflineHLTEventInfoClient.h.

◆ CertificationSummaryContent_

std::vector<MonitorElement*> DQMOfflineHLTEventInfoClient::CertificationSummaryContent_
private

Definition at line 61 of file DQMOfflineHLTEventInfoClient.h.

◆ CertificationSummaryMap_

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummaryMap_
private

Definition at line 62 of file DQMOfflineHLTEventInfoClient.h.

◆ counterEvt_

int DQMOfflineHLTEventInfoClient::counterEvt_
private

counter

Definition at line 51 of file DQMOfflineHLTEventInfoClient.h.

◆ counterLS_

int DQMOfflineHLTEventInfoClient::counterLS_
private

Definition at line 50 of file DQMOfflineHLTEventInfoClient.h.

◆ dbe_

DQMStore* DQMOfflineHLTEventInfoClient::dbe_
private

Definition at line 48 of file DQMOfflineHLTEventInfoClient.h.

◆ parameters_

edm::ParameterSet DQMOfflineHLTEventInfoClient::parameters_
private

◆ prescaleEvt_

int DQMOfflineHLTEventInfoClient::prescaleEvt_
private

units of lumi sections

Definition at line 53 of file DQMOfflineHLTEventInfoClient.h.

◆ prescaleLS_

int DQMOfflineHLTEventInfoClient::prescaleLS_
private

counter

Definition at line 52 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummary_

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummary_
private

prescale on number of events

Definition at line 56 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummaryContent_

std::vector<MonitorElement*> DQMOfflineHLTEventInfoClient::reportSummaryContent_
private

Definition at line 57 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummaryMap_

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummaryMap_
private

Definition at line 58 of file DQMOfflineHLTEventInfoClient.h.

◆ verbose_

bool DQMOfflineHLTEventInfoClient::verbose_
private

Definition at line 49 of file DQMOfflineHLTEventInfoClient.h.

dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
DQMOfflineHLTEventInfoClient::counterLS_
int counterLS_
Definition: DQMOfflineHLTEventInfoClient.h:50
DQMOfflineHLTEventInfoClient::CertificationSummaryMap_
MonitorElement * CertificationSummaryMap_
Definition: DQMOfflineHLTEventInfoClient.h:62
gather_cfg.cout
cout
Definition: gather_cfg.py:144
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
DQMOfflineHLTEventInfoClient::reportSummary_
MonitorElement * reportSummary_
prescale on number of events
Definition: DQMOfflineHLTEventInfoClient.h:56
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DQMOfflineHLTEventInfoClient::prescaleLS_
int prescaleLS_
counter
Definition: DQMOfflineHLTEventInfoClient.h:52
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:78
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
DQMOfflineHLTEventInfoClient::verbose_
bool verbose_
Definition: DQMOfflineHLTEventInfoClient.h:49
dqm::impl::MonitorElement::getFloatValue
virtual double getFloatValue() const
Definition: MonitorElement.cc:920
DQMOfflineHLTEventInfoClient::parameters_
edm::ParameterSet parameters_
Definition: DQMOfflineHLTEventInfoClient.h:46
edm::Service
Definition: Service.h:30
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:762
DQMOfflineHLTEventInfoClient::initialize
void initialize()
Definition: DQMOfflineHLTEventInfoClient.cc:93
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:682
DQMOfflineHLTEventInfoClient::reportSummaryMap_
MonitorElement * reportSummaryMap_
Definition: DQMOfflineHLTEventInfoClient.h:58
DQMOfflineHLTEventInfoClient::dbe_
DQMStore * dbe_
Definition: DQMOfflineHLTEventInfoClient.h:48
DQMOfflineHLTEventInfoClient::counterEvt_
int counterEvt_
counter
Definition: DQMOfflineHLTEventInfoClient.h:51
dqm::implementation::IBooker::book2D
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
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
DQMOfflineHLTEventInfoClient::prescaleEvt_
int prescaleEvt_
units of lumi sections
Definition: DQMOfflineHLTEventInfoClient.h:53
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:791
DQMOfflineHLTEventInfoClient::reportSummaryContent_
std::vector< MonitorElement * > reportSummaryContent_
Definition: DQMOfflineHLTEventInfoClient.h:57
DQMOfflineHLTEventInfoClient::CertificationSummary_
MonitorElement * CertificationSummary_
Definition: DQMOfflineHLTEventInfoClient.h:60