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 {
11  targetFolder_ = ps.getParameter<string>("targetDir");
12  targetME_ = ps.getParameter<string>("targetME");
13  inputMEs_ = ps.getParameter<vector<string> >("inputMEs");
14  setBadRunOnWarnings_ = ps.getParameter<bool>("setBadRunOnWarnings");
15  setBadRunOnErrors_ = ps.getParameter<bool>("setBadRunOnErrors");
16 }
17 
19 
20 //--------------------------------------------------------
22  int warnings=0;
23  int errors=0;
24  double response=1.0;
25 
26  for(auto const & inputME : inputMEs_)
27  {
28  MonitorElement *monElement = iGetter.get(inputME);
29  if(monElement)
30  {
31  warnings+=monElement->getQWarnings().size();
32  errors+=monElement->getQErrors().size();
33  }
34  }
35  if(setBadRunOnWarnings_ && warnings>0)
36  response=0.0;
37 
38  if(setBadRunOnErrors_ && errors>0)
39  response=0.0;
40 
41  //OK SAVE THE FINAL RESULT
42  iBooker.setCurrentFolder(targetFolder_);
43  MonitorElement *certME = iBooker.bookFloat(targetME_);
44  certME->Fill(response);
45 }
T getParameter(std::string const &) const
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
void Fill(long long x)
std::vector< QReport * > getQErrors(void) const
get errors from last set of quality tests
HLTTauCertifier(const edm::ParameterSet &)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
HLT enums.
std::vector< QReport * > getQWarnings(void) const
get warnings from last set of quality tests
Definition: errors.py:1
~HLTTauCertifier() override
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109