CMS 3D CMS Logo

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

#include <HLTTauCertifier.h>

Inheritance diagram for HLTTauCertifier:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 HLTTauCertifier (const edm::ParameterSet &)
 
 ~HLTTauCertifier ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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)
 

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

Definition at line 18 of file HLTTauCertifier.cc.

19 {
20 }

Member Function Documentation

void HLTTauCertifier::dqmEndJob ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 23 of file HLTTauCertifier.cc.

References DQMStore::IBooker::bookFloat(), benchmark_cfg::errors, MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::getQErrors(), MonitorElement::getQWarnings(), i, DQMStore::IBooker::setCurrentFolder(), and benchmark_cfg::warnings.

23  {
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
45  MonitorElement *certME = iBooker.bookFloat(targetME_);
46  certME->Fill(response);
47 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
std::string targetME_
void Fill(long long x)
std::vector< QReport * > getQErrors(void) const
get errors from last set of quality tests
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::vector< QReport * > getQWarnings(void) const
get warnings from last set of quality tests
std::string targetFolder_
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
std::vector< std::string > inputMEs_

Member Data Documentation

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

Definition at line 31 of file HLTTauCertifier.h.

bool HLTTauCertifier::setBadRunOnErrors_
private

Definition at line 33 of file HLTTauCertifier.h.

bool HLTTauCertifier::setBadRunOnWarnings_
private

Definition at line 32 of file HLTTauCertifier.h.

std::string HLTTauCertifier::targetFolder_
private

Definition at line 30 of file HLTTauCertifier.h.

std::string HLTTauCertifier::targetME_
private

Definition at line 29 of file HLTTauCertifier.h.