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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

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

Definition at line 23 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 22 of file DQMOfflineHLTEventInfoClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 86 of file DQMOfflineHLTEventInfoClient.cc.

References initialize().

DQMOfflineHLTEventInfoClient::~DQMOfflineHLTEventInfoClient ( )
override

Destructor.

Definition at line 91 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

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

Member Function Documentation

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

Fake Analyze.

Definition at line 176 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

176  {
177  counterEvt_++;
178  if (prescaleEvt_ < 1)
179  return;
180  if (prescaleEvt_ > 0 && counterEvt_ % prescaleEvt_ != 0)
181  return;
182 
183  if (verbose_)
184  cout << "DQMOfflineHLTEventInfoClient::analyze" << endl;
185 }
int prescaleEvt_
units of lumi sections
void DQMOfflineHLTEventInfoClient::beginJob ( void  )
overrideprotectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 119 of file DQMOfflineHLTEventInfoClient.cc.

References dqm::dqmstoreimpl::DQMStore::book2D(), dqm::dqmstoreimpl::DQMStore::bookFloat(), gather_cfg::cout, dbe_, dqm::impl::MonitorElement::Fill(), Utilities::operator, dqm::impl::MonitorElement::setAxisTitle(), and dqm::dqmstoreimpl::DQMStore::setCurrentFolder().

119  {
120  if (verbose_)
121  cout << "[TriggerDQM]: Begin Job" << endl;
122  // get backendinterface
124 
125  dbe_->setCurrentFolder("HLT/EventInfo");
126 
127  reportSummary_ = dbe_->bookFloat("reportSummary");
128  //initialize reportSummary to 1
129  if (reportSummary_)
130  reportSummary_->Fill(1);
131 
132  // CertificationSummary
133  CertificationSummary_ = dbe_->bookFloat("CertificationSummary");
134  //initialize CertificationSummary to 1
137 
138  //initialize reportSummary to 1
139  if (reportSummary_)
140  reportSummary_->Fill(1);
141 
142  // OK HERE
143 
144  // reportSummaryMap
145  dbe_->setCurrentFolder("HLT/EventInfo");
146 
147  reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 6, 1, 7);
150  reportSummaryMap_->setBinLabel(1, "Muon", 2);
151  reportSummaryMap_->setBinLabel(2, "Electron", 2);
152  reportSummaryMap_->setBinLabel(3, "Photon", 2);
153  reportSummaryMap_->setBinLabel(4, "JetMET", 2);
154  reportSummaryMap_->setBinLabel(5, "BJet", 2);
155  reportSummaryMap_->setBinLabel(6, "Tau", 2);
156  reportSummaryMap_->setBinLabel(1, " ", 1);
157 
158  CertificationSummaryMap_ = dbe_->book2D("CertificationSummaryMap", "CertificationSummaryMap", 1, 1, 2, 6, 1, 7);
161  CertificationSummaryMap_->setBinLabel(1, "Muon", 2);
162  CertificationSummaryMap_->setBinLabel(2, "Electron", 2);
163  CertificationSummaryMap_->setBinLabel(3, "Photon", 2);
164  CertificationSummaryMap_->setBinLabel(4, "JetMET", 2);
165  CertificationSummaryMap_->setBinLabel(5, "BJet", 2);
168 }
MonitorElement * book2D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1178
void Fill(long long x)
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)
MonitorElement * reportSummary_
prescale on number of events
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:639
MonitorElement * bookFloat(char_string const &name)
Book float.
Definition: DQMStore.cc:1087
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void DQMOfflineHLTEventInfoClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

BeginRun.

Definition at line 171 of file DQMOfflineHLTEventInfoClient.cc.

171 {}
void DQMOfflineHLTEventInfoClient::endJob ( void  )
overrideprotectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 257 of file DQMOfflineHLTEventInfoClient.cc.

257 {}
void DQMOfflineHLTEventInfoClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

EndRun.

Definition at line 188 of file DQMOfflineHLTEventInfoClient.cc.

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

188  {
189  float summarySum = 0;
190  float reportSummary = 0;
191 
192  dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents");
193  MonitorElement* HLT_Muon = dbe_->get("HLT_Muon");
194  if (HLT_Muon)
195  reportSummaryContent_.push_back(HLT_Muon);
196 
197  MonitorElement* HLT_Electron = dbe_->get("HLT_Electron");
198  if (HLT_Electron)
199  reportSummaryContent_.push_back(HLT_Electron);
200 
201  MonitorElement* HLT_Photon = dbe_->get("HLT_Photon");
202  if (HLT_Photon)
203  reportSummaryContent_.push_back(HLT_Photon);
204 
205  MonitorElement* HLT_Tau = dbe_->get("HLT_Tau");
206  if (HLT_Tau)
207  reportSummaryContent_.push_back(HLT_Tau);
208 
209  int nSubsystems = reportSummaryContent_.size();
210 
211  for (int m = 0; m < nSubsystems; m++) {
212  summarySum += (reportSummaryContent_[m])->getFloatValue();
213  }
214 
215  if (nSubsystems > 0) {
216  reportSummary = summarySum / nSubsystems;
217  ;
218  } else {
219  reportSummary = 1;
220  }
221 
222  reportSummary_->Fill(reportSummary);
223  CertificationSummary_->Fill(reportSummary);
224 
225  float muonValue = 1;
226  if (HLT_Muon)
227  muonValue = HLT_Muon->getFloatValue();
228 
229  float electronValue = 1;
230  if (HLT_Electron)
231  electronValue = HLT_Electron->getFloatValue();
232 
233  float photonValue = 1;
234  if (HLT_Photon)
235  photonValue = HLT_Photon->getFloatValue();
236 
237  float tauValue = 1;
238  if (HLT_Tau)
239  tauValue = HLT_Tau->getFloatValue();
240 
241  reportSummaryMap_->setBinContent(1, 1, muonValue); //Muon
242  reportSummaryMap_->setBinContent(1, 2, electronValue); //Electron
243  reportSummaryMap_->setBinContent(1, 3, photonValue); //Photon
244  reportSummaryMap_->setBinContent(1, 4, 1); //JetMET
245  reportSummaryMap_->setBinContent(1, 5, 1); //BJet
246  reportSummaryMap_->setBinContent(1, 6, tauValue); //Tau
247 
248  CertificationSummaryMap_->setBinContent(1, 1, muonValue); //Muon
249  CertificationSummaryMap_->setBinContent(1, 2, electronValue); //Electron
250  CertificationSummaryMap_->setBinContent(1, 3, photonValue); //Photon
251  CertificationSummaryMap_->setBinContent(1, 4, 1); //JetMET
252  CertificationSummaryMap_->setBinContent(1, 5, 1); //BJet
253  CertificationSummaryMap_->setBinContent(1, 6, tauValue); //Tau
254 }
void Fill(long long x)
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1509
std::vector< MonitorElement * > reportSummaryContent_
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * reportSummary_
prescale on number of events
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:639
virtual double getFloatValue() const
void DQMOfflineHLTEventInfoClient::initialize ( )
private

Definition at line 97 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout, dbe_, and Utilities::operator.

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

Member Data Documentation

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummary_
private

Definition at line 63 of file DQMOfflineHLTEventInfoClient.h.

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

Definition at line 64 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummaryMap_
private

Definition at line 65 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::counterEvt_
private

counter

Definition at line 54 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::counterLS_
private

Definition at line 53 of file DQMOfflineHLTEventInfoClient.h.

DQMStore* DQMOfflineHLTEventInfoClient::dbe_
private

Definition at line 51 of file DQMOfflineHLTEventInfoClient.h.

edm::ParameterSet DQMOfflineHLTEventInfoClient::parameters_
private
int DQMOfflineHLTEventInfoClient::prescaleEvt_
private

units of lumi sections

Definition at line 56 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::prescaleLS_
private

counter

Definition at line 55 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummary_
private

prescale on number of events

Definition at line 59 of file DQMOfflineHLTEventInfoClient.h.

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

Definition at line 60 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummaryMap_
private

Definition at line 61 of file DQMOfflineHLTEventInfoClient.h.

bool DQMOfflineHLTEventInfoClient::verbose_
private

Definition at line 52 of file DQMOfflineHLTEventInfoClient.h.