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 
18 
19 }
20 
22 {
23 
24  // do anything here that needs to be done at desctruction time
25  // (e.g. close files, deallocate resources etc.)
26 
27 }
28 
29 
30 //--------------------------------------------------------
31 void
33 
34 }
35 
36 //--------------------------------------------------------
37 void HLTTauCertifier::beginRun(const edm::Run& r, const EventSetup& context) {
38 
39 }
40 
41 //--------------------------------------------------------
43  const EventSetup& context) {
44 
45 }
46 
47 // ----------------------------------------------------------
48 void
50 {
51 
52 }
53 
54 
55 
56 
57 //--------------------------------------------------------
59  const EventSetup& context) {
60 }
61 //--------------------------------------------------------
62 void HLTTauCertifier::endRun(const Run& r, const EventSetup& context){
63  if(dbe_) {
64  int warnings=0;
65  int errors=0;
66  double response=1.0;
67 
68  for(unsigned int i=0;i<inputMEs_.size();++i)
69  {
70  MonitorElement *monElement = dbe_->get(inputMEs_.at(i));
71  if(monElement)
72  {
73  warnings+=monElement->getQWarnings().size();
74  errors+=monElement->getQErrors().size();
75  }
76  }
77  if(setBadRunOnWarnings_ && warnings>0)
78  response=0.0;
79 
80  if(setBadRunOnErrors_ && errors>0)
81  response=0.0;
82 
83  //OK SAVE THE FINAL RESULT
84  dbe_->setCurrentFolder(targetFolder_);
85  MonitorElement *certME = dbe_->bookFloat(targetME_);
86  certME->Fill(response);
87  }
88 
89 }
90 //--------------------------------------------------------
92  return;
93 }
94 
95 
96 
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
DQM Client Diagnostic.
void beginJob()
BeginJob.
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:659
void Fill(long long x)
std::vector< QReport * > getQErrors(void) const
get errors from last set of quality tests
int iEvent
Definition: GenABIO.cc:243
HLTTauCertifier(const edm::ParameterSet &)
void endJob()
Endjob.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
DQMStore * dbe_
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
Luminosity Block.
std::vector< QReport * > getQWarnings(void) const
get warnings from last set of quality tests
void analyze(const edm::Event &e, const edm::EventSetup &c)
Fake Analyze.
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
Definition: Run.h:36