test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 {
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 }
21 
22 //--------------------------------------------------------
24  int warnings=0;
25  int errors=0;
26  double response=1.0;
27 
28  for(unsigned int i=0;i<inputMEs_.size();++i)
29  {
30  MonitorElement *monElement = iGetter.get(inputMEs_.at(i));
31  if(monElement)
32  {
33  warnings+=monElement->getQWarnings().size();
34  errors+=monElement->getQErrors().size();
35  }
36  }
37  if(setBadRunOnWarnings_ && warnings>0)
38  response=0.0;
39 
40  if(setBadRunOnErrors_ && errors>0)
41  response=0.0;
42 
43  //OK SAVE THE FINAL RESULT
44  iBooker.setCurrentFolder(targetFolder_);
45  MonitorElement *certME = iBooker.bookFloat(targetME_);
46  certME->Fill(response);
47 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:304
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:276
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
std::vector< QReport * > getQWarnings(void) const
get warnings from last set of quality tests
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109