CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
void Fill(long long x)
std::vector< MonitorElementData::QReport * > getQErrors() const
get errors from last set of quality tests
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
HLTTauCertifier(const edm::ParameterSet &)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
std::vector< MonitorElementData::QReport * > getQWarnings() const
get warnings from last set of quality tests
~HLTTauCertifier() override