CMS 3D CMS Logo

List of all members | 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 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
 
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)
 
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 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

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 21 of file DQMOfflineHLTEventInfoClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 88 of file DQMOfflineHLTEventInfoClient.cc.

References initialize().

DQMOfflineHLTEventInfoClient::~DQMOfflineHLTEventInfoClient ( )
override

Destructor.

Definition at line 94 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

94  {
95  if(verbose_) cout <<"[TriggerDQM]: ending... " << endl;
96 }

Member Function Documentation

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

Fake Analyze.

Definition at line 204 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

204  {
205 
206  counterEvt_++;
207  if (prescaleEvt_<1) return;
208  if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return;
209 
210  if(verbose_) cout << "DQMOfflineHLTEventInfoClient::analyze" << endl;
211 
212 
213 }
int prescaleEvt_
units of lumi sections
void DQMOfflineHLTEventInfoClient::beginJob ( void  )
overrideprotectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 121 of file DQMOfflineHLTEventInfoClient.cc.

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

121  {
122 
123  if(verbose_) cout <<"[TriggerDQM]: Begin Job" << endl;
124  // get backendinterface
126 
127  dbe_->setCurrentFolder("HLT/EventInfo");
128 
129  // reportSummary
130  reportSummary_ = dbe_->get("HLT/EventInfo/reportSummary");
131 
132  if ( reportSummary_ ) {
133  dbe_->removeElement(reportSummary_->getName());
134  }
135 
136  reportSummary_ = dbe_->bookFloat("reportSummary");
137  //initialize reportSummary to 1
139 
140  // CertificationSummary
141  CertificationSummary_ = dbe_->get("HLT/EventInfo/CertificationSummary");
142 
143  if ( CertificationSummary_ ) {
144  dbe_->removeElement(CertificationSummary_->getName());
145  }
146 
147  CertificationSummary_ = dbe_->bookFloat("CertificationSummary");
148  //initialize CertificationSummary to 1
150 
151  //initialize reportSummary to 1
153 
154  // OK HERE
155 
156  // reportSummaryMap
157  dbe_->setCurrentFolder("HLT/EventInfo");
158 
159  reportSummaryMap_ = dbe_->get("HLT/EventInfo/reportSummaryMap");
160  if ( reportSummaryMap_ ) {
161  dbe_->removeElement(reportSummaryMap_->getName());
162  }
163 
164 
165  reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 6, 1, 7);
168  reportSummaryMap_->setBinLabel(1,"Muon",2);
169  reportSummaryMap_->setBinLabel(2,"Electron",2);
170  reportSummaryMap_->setBinLabel(3,"Photon",2);
171  reportSummaryMap_->setBinLabel(4,"JetMET",2);
172  reportSummaryMap_->setBinLabel(5,"BJet",2);
173  reportSummaryMap_->setBinLabel(6,"Tau",2);
174  reportSummaryMap_->setBinLabel(1," ",1);
175 
176 
177  CertificationSummaryMap_ = dbe_->get("HLT/EventInfo/CertificationSummaryMap");
178  if ( CertificationSummaryMap_ ) {
179  dbe_->removeElement(CertificationSummaryMap_->getName());
180  }
181 
182 
183  CertificationSummaryMap_ = dbe_->book2D("CertificationSummaryMap", "CertificationSummaryMap", 1, 1, 2, 6, 1, 7);
187  CertificationSummaryMap_->setBinLabel(2,"Electron",2);
188  CertificationSummaryMap_->setBinLabel(3,"Photon",2);
189  CertificationSummaryMap_->setBinLabel(4,"JetMET",2);
193 
194 }
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)
const std::string & getName() const
get name of ME
void Fill(long long x)
MonitorElement * reportSummary_
prescale on number of events
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 197 of file DQMOfflineHLTEventInfoClient.cc.

197  {
198 }
void DQMOfflineHLTEventInfoClient::endJob ( void  )
overrideprotectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 280 of file DQMOfflineHLTEventInfoClient.cc.

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

EndRun.

Definition at line 216 of file DQMOfflineHLTEventInfoClient.cc.

References dbe_, MonitorElement::getFloatValue(), and funct::m.

216  {
217 
218  float summarySum = 0;
219  float reportSummary = 0;
220 
221  dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents");
222  MonitorElement* HLT_Muon = dbe_->get("HLT_Muon");
223  if(HLT_Muon) reportSummaryContent_.push_back(HLT_Muon);
224 
225  MonitorElement * HLT_Electron = dbe_->get("HLT_Electron");
226  if(HLT_Electron) reportSummaryContent_.push_back(HLT_Electron);
227 
228  MonitorElement * HLT_Photon = dbe_->get("HLT_Photon");
229  if(HLT_Photon) reportSummaryContent_.push_back(HLT_Photon);
230 
231  MonitorElement * HLT_Tau = dbe_->get("HLT_Tau");
232  if(HLT_Tau) reportSummaryContent_.push_back(HLT_Tau);
233 
234 
235  int nSubsystems = reportSummaryContent_.size();
236 
237  for (int m = 0; m < nSubsystems; m++) {
238  summarySum += (reportSummaryContent_[m])->getFloatValue();
239  }
240 
241 
242  if(nSubsystems > 0) {
243  reportSummary = summarySum / nSubsystems;;
244  }
245  else {
246  reportSummary = 1;
247  }
248 
249  reportSummary_->Fill(reportSummary);
250  CertificationSummary_->Fill(reportSummary);
251 
252  float muonValue = 1;
253  if(HLT_Muon) muonValue = HLT_Muon->getFloatValue();
254 
255  float electronValue = 1;
256  if(HLT_Electron) electronValue = HLT_Electron->getFloatValue();
257 
258  float photonValue = 1;
259  if(HLT_Photon) photonValue = HLT_Photon->getFloatValue();
260 
261  float tauValue = 1;
262  if(HLT_Tau) tauValue = HLT_Tau->getFloatValue();
263 
264  reportSummaryMap_->setBinContent(1,1,muonValue);//Muon
265  reportSummaryMap_->setBinContent(1,2,electronValue);//Electron
266  reportSummaryMap_->setBinContent(1,3,photonValue);//Photon
267  reportSummaryMap_->setBinContent(1,4,1);//JetMET
268  reportSummaryMap_->setBinContent(1,5,1);//BJet
269  reportSummaryMap_->setBinContent(1,6,tauValue);//Tau
270 
271  CertificationSummaryMap_->setBinContent(1,1,muonValue);//Muon
272  CertificationSummaryMap_->setBinContent(1,2,electronValue);//Electron
273  CertificationSummaryMap_->setBinContent(1,3,photonValue);//Photon
274  CertificationSummaryMap_->setBinContent(1,4,1);//JetMET
276  CertificationSummaryMap_->setBinContent(1,6,tauValue);//Tau
277 }
void setBinContent(int binx, double content)
set content of bin (1-D)
double getFloatValue() const
void Fill(long long x)
std::vector< MonitorElement * > reportSummaryContent_
MonitorElement * reportSummary_
prescale on number of events
void DQMOfflineHLTEventInfoClient::initialize ( )
private

Definition at line 99 of file DQMOfflineHLTEventInfoClient.cc.

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

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

Member Data Documentation

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummary_
private

Definition at line 65 of file DQMOfflineHLTEventInfoClient.h.

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

Definition at line 66 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummaryMap_
private

Definition at line 67 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::counterEvt_
private

counter

Definition at line 56 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::counterLS_
private

Definition at line 55 of file DQMOfflineHLTEventInfoClient.h.

DQMStore* DQMOfflineHLTEventInfoClient::dbe_
private

Definition at line 53 of file DQMOfflineHLTEventInfoClient.h.

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

units of lumi sections

Definition at line 58 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::prescaleLS_
private

counter

Definition at line 57 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummary_
private

prescale on number of events

Definition at line 61 of file DQMOfflineHLTEventInfoClient.h.

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

Definition at line 62 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummaryMap_
private

Definition at line 63 of file DQMOfflineHLTEventInfoClient.h.

bool DQMOfflineHLTEventInfoClient::verbose_
private

Definition at line 54 of file DQMOfflineHLTEventInfoClient.h.