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 }
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
edm
HLT enums.
Definition: AlignableModifier.h:19
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
HLTTauCertifier::~HLTTauCertifier
~HLTTauCertifier() override
dqm::impl::MonitorElement::getQErrors
std::vector< MonitorElementData::QReport * > getQErrors() const
get errors from last set of quality tests
Definition: MonitorElement.cc:502
errors
Definition: errors.py:1
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
HLTTauCertifier::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition: HLTTauCertifier.cc:20
edm::ParameterSet
Definition: ParameterSet.h:47
dqm::impl::MonitorElement::getQWarnings
std::vector< MonitorElementData::QReport * > getQWarnings() const
get warnings from last set of quality tests
Definition: MonitorElement.cc:497
HLTTauCertifier.h
debug_messages_cfi.warnings
warnings
Definition: debug_messages_cfi.py:48
std
Definition: JetResolutionObject.h:76
dqm::implementation::IGetter
Definition: DQMStore.h:484
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
HLTTauCertifier::HLTTauCertifier
HLTTauCertifier(const edm::ParameterSet &)
Definition: HLTTauCertifier.cc:9