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
 
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)
 

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 endJob () override
 Endjob. 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>
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

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 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 85 of file DQMOfflineHLTEventInfoClient.cc.

85  {
86  parameters_ = ps;
87  initialize();
88 }

References initialize().

◆ ~DQMOfflineHLTEventInfoClient()

DQMOfflineHLTEventInfoClient::~DQMOfflineHLTEventInfoClient ( )
override

Destructor.

Definition at line 90 of file DQMOfflineHLTEventInfoClient.cc.

90  {
91  if (verbose_)
92  cout << "[TriggerDQM]: ending... " << endl;
93 }

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

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

References gather_cfg::cout.

◆ beginJob()

void DQMOfflineHLTEventInfoClient::beginJob ( void  )
overrideprotectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 118 of file DQMOfflineHLTEventInfoClient.cc.

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

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 170 of file DQMOfflineHLTEventInfoClient.cc.

170 {}

◆ endJob()

void DQMOfflineHLTEventInfoClient::endJob ( void  )
overrideprotectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 256 of file DQMOfflineHLTEventInfoClient.cc.

256 {}

◆ endRun()

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 187 of file DQMOfflineHLTEventInfoClient.cc.

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

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 96 of file DQMOfflineHLTEventInfoClient.cc.

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

References gather_cfg::cout, and dbe_.

Member Data Documentation

◆ CertificationSummary_

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummary_
private

Definition at line 63 of file DQMOfflineHLTEventInfoClient.h.

◆ CertificationSummaryContent_

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

Definition at line 64 of file DQMOfflineHLTEventInfoClient.h.

◆ CertificationSummaryMap_

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummaryMap_
private

Definition at line 65 of file DQMOfflineHLTEventInfoClient.h.

◆ counterEvt_

int DQMOfflineHLTEventInfoClient::counterEvt_
private

counter

Definition at line 54 of file DQMOfflineHLTEventInfoClient.h.

◆ counterLS_

int DQMOfflineHLTEventInfoClient::counterLS_
private

Definition at line 53 of file DQMOfflineHLTEventInfoClient.h.

◆ dbe_

DQMStore* DQMOfflineHLTEventInfoClient::dbe_
private

Definition at line 51 of file DQMOfflineHLTEventInfoClient.h.

◆ parameters_

edm::ParameterSet DQMOfflineHLTEventInfoClient::parameters_
private

◆ prescaleEvt_

int DQMOfflineHLTEventInfoClient::prescaleEvt_
private

units of lumi sections

Definition at line 56 of file DQMOfflineHLTEventInfoClient.h.

◆ prescaleLS_

int DQMOfflineHLTEventInfoClient::prescaleLS_
private

counter

Definition at line 55 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummary_

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummary_
private

prescale on number of events

Definition at line 59 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummaryContent_

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

Definition at line 60 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummaryMap_

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummaryMap_
private

Definition at line 61 of file DQMOfflineHLTEventInfoClient.h.

◆ verbose_

bool DQMOfflineHLTEventInfoClient::verbose_
private

Definition at line 52 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:53
DQMOfflineHLTEventInfoClient::CertificationSummaryMap_
MonitorElement * CertificationSummaryMap_
Definition: DQMOfflineHLTEventInfoClient.h:65
gather_cfg.cout
cout
Definition: gather_cfg.py:144
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
DQMOfflineHLTEventInfoClient::reportSummary_
MonitorElement * reportSummary_
prescale on number of events
Definition: DQMOfflineHLTEventInfoClient.h:59
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DQMOfflineHLTEventInfoClient::prescaleLS_
int prescaleLS_
counter
Definition: DQMOfflineHLTEventInfoClient.h:55
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
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:52
dqm::impl::MonitorElement::getFloatValue
virtual double getFloatValue() const
Definition: MonitorElement.cc:917
DQMOfflineHLTEventInfoClient::parameters_
edm::ParameterSet parameters_
Definition: DQMOfflineHLTEventInfoClient.h:49
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:771
DQMOfflineHLTEventInfoClient::initialize
void initialize()
Definition: DQMOfflineHLTEventInfoClient.cc:96
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
DQMOfflineHLTEventInfoClient::reportSummaryMap_
MonitorElement * reportSummaryMap_
Definition: DQMOfflineHLTEventInfoClient.h:61
DQMOfflineHLTEventInfoClient::dbe_
DQMStore * dbe_
Definition: DQMOfflineHLTEventInfoClient.h:51
DQMOfflineHLTEventInfoClient::counterEvt_
int counterEvt_
counter
Definition: DQMOfflineHLTEventInfoClient.h:54
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:651
DQMOfflineHLTEventInfoClient::prescaleEvt_
int prescaleEvt_
units of lumi sections
Definition: DQMOfflineHLTEventInfoClient.h:56
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:800
DQMOfflineHLTEventInfoClient::reportSummaryContent_
std::vector< MonitorElement * > reportSummaryContent_
Definition: DQMOfflineHLTEventInfoClient.h:60
DQMOfflineHLTEventInfoClient::CertificationSummary_
MonitorElement * CertificationSummary_
Definition: DQMOfflineHLTEventInfoClient.h:63