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 edm::EDConsumerBase

Public Member Functions

 HLTTauCertifier (const edm::ParameterSet &)
 
 ~HLTTauCertifier ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

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_, benchmark_cfg::errors, MonitorElement::Fill(), DQMStore::get(), MonitorElement::getQErrors(), MonitorElement::getQWarnings(), i, DQMStore::setCurrentFolder(), and benchmark_cfg::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_
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:891
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:1708
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:667
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.