CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HLTTauCertifier Class Reference

#include <HLTTauCertifier.h>

Inheritance diagram for HLTTauCertifier:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 HLTTauCertifier (const edm::ParameterSet &)
 
 ~HLTTauCertifier () override
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 20 of file HLTTauCertifier.h.

Constructor & Destructor Documentation

◆ HLTTauCertifier()

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

Definition at line 9 of file HLTTauCertifier.cc.

9  {
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 }

References edm::ParameterSet::getParameter().

◆ ~HLTTauCertifier()

HLTTauCertifier::~HLTTauCertifier ( )
overridedefault

Member Function Documentation

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 20 of file HLTTauCertifier.cc.

20  {
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 }

References dqm::implementation::IBooker::bookFloat(), dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getQErrors(), dqm::impl::MonitorElement::getQWarnings(), dqm::implementation::NavigatorBase::setCurrentFolder(), and MessageLogger_cfi::warnings.

Member Data Documentation

◆ inputMEs_

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

Definition at line 30 of file HLTTauCertifier.h.

◆ setBadRunOnErrors_

bool HLTTauCertifier::setBadRunOnErrors_
private

Definition at line 32 of file HLTTauCertifier.h.

◆ setBadRunOnWarnings_

bool HLTTauCertifier::setBadRunOnWarnings_
private

Definition at line 31 of file HLTTauCertifier.h.

◆ targetFolder_

std::string HLTTauCertifier::targetFolder_
private

Definition at line 29 of file HLTTauCertifier.h.

◆ targetME_

std::string HLTTauCertifier::targetME_
private

Definition at line 28 of file HLTTauCertifier.h.

dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
dqm::impl::MonitorElement::getQErrors
std::vector< MonitorElementData::QReport * > getQErrors() const
get errors from last set of quality tests
Definition: MonitorElement.cc:511
errors
Definition: errors.py:1
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
MessageLogger_cfi.warnings
warnings
Definition: MessageLogger_cfi.py:12
dqm::impl::MonitorElement::getQWarnings
std::vector< MonitorElementData::QReport * > getQWarnings() const
get warnings from last set of quality tests
Definition: MonitorElement.cc:506
HLTTauCertifier::setBadRunOnWarnings_
bool setBadRunOnWarnings_
Definition: HLTTauCertifier.h:31
HLTTauCertifier::setBadRunOnErrors_
bool setBadRunOnErrors_
Definition: HLTTauCertifier.h:32
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HLTTauCertifier::targetFolder_
std::string targetFolder_
Definition: HLTTauCertifier.h:29
HLTTauCertifier::inputMEs_
std::vector< std::string > inputMEs_
Definition: HLTTauCertifier.h:30
HLTTauCertifier::targetME_
std::string targetME_
Definition: HLTTauCertifier.h:28