CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
HLTTauCertifier Class Reference

#include <HLTTauCertifier.h>

Inheritance diagram for HLTTauCertifier:
edm::EDAnalyzer

Public Member Functions

 HLTTauCertifier (const edm::ParameterSet &)
 
 ~HLTTauCertifier ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze. More...
 
void beginJob ()
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 Luminosity Block. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void endJob ()
 Endjob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

DQMStoredbe_
 
std::vector< std::string > inputMEs_
 
bool setBadRunOnErrors_
 
bool setBadRunOnWarnings_
 
std::string targetFolder_
 
std::string targetME_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 21 of file HLTTauCertifier.h.

Constructor & Destructor Documentation

HLTTauCertifier::HLTTauCertifier ( const edm::ParameterSet ps)

Definition at line 9 of file HLTTauCertifier.cc.

References dbe_, and edm::ParameterSet::getParameter().

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 }
T getParameter(std::string const &) const
std::string targetME_
std::string targetFolder_
std::vector< std::string > inputMEs_
HLTTauCertifier::~HLTTauCertifier ( )

Definition at line 21 of file HLTTauCertifier.cc.

22 {
23 
24  // do anything here that needs to be done at desctruction time
25  // (e.g. close files, deallocate resources etc.)
26 
27 }

Member Function Documentation

void HLTTauCertifier::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 49 of file HLTTauCertifier.cc.

50 {
51 
52 }
void HLTTauCertifier::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 32 of file HLTTauCertifier.cc.

32  {
33 
34 }
void HLTTauCertifier::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Luminosity Block.

Reimplemented from edm::EDAnalyzer.

Definition at line 42 of file HLTTauCertifier.cc.

43  {
44 
45 }
void HLTTauCertifier::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file HLTTauCertifier.cc.

37  {
38 
39 }
void HLTTauCertifier::endJob ( void  )
protectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 91 of file HLTTauCertifier.cc.

91  {
92  return;
93 }
void HLTTauCertifier::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 58 of file HLTTauCertifier.cc.

59  {
60 }
void HLTTauCertifier::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 62 of file HLTTauCertifier.cc.

References DQMStore::bookFloat(), dbe_, ExpressReco_HICollisions_FallBack::errors, MonitorElement::Fill(), DQMStore::get(), MonitorElement::getQErrors(), MonitorElement::getQWarnings(), i, DQMStore::setCurrentFolder(), and ExpressReco_HICollisions_FallBack::warnings.

62  {
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
86  certME->Fill(response);
87  }
88 
89 }
int i
Definition: DBlmapReader.cc:9
std::string targetME_
std::pair< double, double > response
Definition: HCALResponse.h:20
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:456
void Fill(long long x)
std::vector< QReport * > getQErrors(void) const
get errors from last set of quality tests
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
std::vector< QReport * > getQWarnings(void) const
get warnings from last set of quality tests
std::string targetFolder_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
std::vector< std::string > inputMEs_

Member Data Documentation

DQMStore* HLTTauCertifier::dbe_
private

Definition at line 50 of file HLTTauCertifier.h.

std::vector<std::string> HLTTauCertifier::inputMEs_
private

Definition at line 53 of file HLTTauCertifier.h.

bool HLTTauCertifier::setBadRunOnErrors_
private

Definition at line 55 of file HLTTauCertifier.h.

bool HLTTauCertifier::setBadRunOnWarnings_
private

Definition at line 54 of file HLTTauCertifier.h.

std::string HLTTauCertifier::targetFolder_
private

Definition at line 52 of file HLTTauCertifier.h.

std::string HLTTauCertifier::targetME_
private

Definition at line 51 of file HLTTauCertifier.h.