CMS 3D CMS Logo

HLTTauCertifier.cc
Go to the documentation of this file.
2 
3 using namespace std;
4 using namespace edm;
5 
6 //
7 // constructors and destructor
8 //
10  targetFolder_ = ps.getParameter<string>("targetDir");
11  targetME_ = ps.getParameter<string>("targetME");
12  inputMEs_ = ps.getParameter<vector<string> >("inputMEs");
13  setBadRunOnWarnings_ = ps.getParameter<bool>("setBadRunOnWarnings");
14  setBadRunOnErrors_ = ps.getParameter<bool>("setBadRunOnErrors");
15 }
16 
18 
19 //--------------------------------------------------------
21  int warnings = 0;
22  int errors = 0;
23  double response = 1.0;
24 
25  for (auto const &inputME : inputMEs_) {
26  MonitorElement *monElement = iGetter.get(inputME);
27  if (monElement) {
28  warnings += monElement->getQWarnings().size();
29  errors += monElement->getQErrors().size();
30  }
31  }
32  if (setBadRunOnWarnings_ && warnings > 0)
33  response = 0.0;
34 
35  if (setBadRunOnErrors_ && errors > 0)
36  response = 0.0;
37 
38  //OK SAVE THE FINAL RESULT
39  iBooker.setCurrentFolder(targetFolder_);
40  MonitorElement *certME = iBooker.bookFloat(targetME_);
41  certME->Fill(response);
42 }
43 
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::vector< MonitorElementData::QReport * > getQErrors() const
get errors from last set of quality tests
void Fill(long long x)
HLTTauCertifier(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< MonitorElementData::QReport * > getQWarnings() const
get warnings from last set of quality tests
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
HLT enums.
Definition: errors.py:1
~HLTTauCertifier() override