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...
 
virtual ~DQMOfflineHLTEventInfoClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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
 
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)
 Fake Analyze. More...
 
void beginJob ()
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void endJob ()
 Endjob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 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 &)
 

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

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

Fake Analyze.

Definition at line 210 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

210  {
211 
212  counterEvt_++;
213  if (prescaleEvt_<1) return;
214  if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return;
215 
216  if(verbose_) cout << "DQMOfflineHLTEventInfoClient::analyze" << endl;
217 
218 
219 }
int prescaleEvt_
units of lumi sections
void DQMOfflineHLTEventInfoClient::beginJob ( void  )
protectedvirtual

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 }
const std::string & getName(void) const
get name of ME
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)
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::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protected

Definition at line 201 of file DQMOfflineHLTEventInfoClient.cc.

201  {
202  // optionally reset histograms here
203 }
void DQMOfflineHLTEventInfoClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protected

BeginRun.

Definition at line 197 of file DQMOfflineHLTEventInfoClient.cc.

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

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 286 of file DQMOfflineHLTEventInfoClient.cc.

286  {
287 }
void DQMOfflineHLTEventInfoClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protected

DQM Client Diagnostic.

Definition at line 205 of file DQMOfflineHLTEventInfoClient.cc.

206  {
207 }
void DQMOfflineHLTEventInfoClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protected

EndRun.

Definition at line 222 of file DQMOfflineHLTEventInfoClient.cc.

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

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

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

Definition at line 73 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummaryMap_
private

Definition at line 74 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::counterEvt_
private

counter

Definition at line 63 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::counterLS_
private

Definition at line 62 of file DQMOfflineHLTEventInfoClient.h.

DQMStore* DQMOfflineHLTEventInfoClient::dbe_
private

Definition at line 60 of file DQMOfflineHLTEventInfoClient.h.

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

units of lumi sections

Definition at line 65 of file DQMOfflineHLTEventInfoClient.h.

int DQMOfflineHLTEventInfoClient::prescaleLS_
private

counter

Definition at line 64 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummary_
private

prescale on number of events

Definition at line 68 of file DQMOfflineHLTEventInfoClient.h.

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

Definition at line 69 of file DQMOfflineHLTEventInfoClient.h.

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummaryMap_
private

Definition at line 70 of file DQMOfflineHLTEventInfoClient.h.

bool DQMOfflineHLTEventInfoClient::verbose_
private

Definition at line 61 of file DQMOfflineHLTEventInfoClient.h.