CMS 3D CMS Logo

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

#include <HLTExoticaValidator.h>

Inheritance diagram for HLTExoticaValidator:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HLTExoticaValidator (const edm::ParameterSet &)
 Constructor and destructor. More...
 
 ~HLTExoticaValidator () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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)
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup) override
 Method called by the framework to book histograms. More...
 
- 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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 

Private Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 Method called for each event. More...
 
void beginJob () override
 
void dqmBeginRun (const edm::Run &iRun, const edm::EventSetup &iSetup) override
 Method called by the framework just before dqmBeginRun() More...
 
void dqmEndRun (const edm::Run &iRun, const edm::EventSetup &iSetup) override
 
void endJob () override
 

Private Attributes

std::vector< std::string > _analysisnames
 The names of the subanalyses. More...
 
std::vector< HLTExoticaSubAnalysis_analyzers
 The instances of the class which do the real work. More...
 
EVTColContainer_collections
 Centralized point of access to all collections used. More...
 
edm::ParameterSet _pset
 Copy (to be modified) of the input ParameterSet from configuration file. More...
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer<>
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::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 Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

The HLTExoticaValidator module is the main module of the package. It books a vector of auxiliary classes (HLTExoticaSubAnalysis), where each of those takes care of one single analysis. Each of those, in turn, books a vector if HLTExoticaPlotters to make plots for each HLT path

Generate histograms for trigger efficiencies Exotica related Documentation available on the CMS TWiki: https://twiki.cern.ch/twiki/bin/view/CMS/EXOTICATriggerValidation

Author
Thiago R. Fernandez Perez Tomei Based and adapted from: J. Duarte Campderros code from HLTriggerOffline/Higgs and J. Klukas, M. Vander Donckt and J. Alcaraz code from the HLTriggerOffline/Muon package.

Definition at line 37 of file HLTExoticaValidator.h.

Constructor & Destructor Documentation

◆ HLTExoticaValidator()

HLTExoticaValidator::HLTExoticaValidator ( const edm::ParameterSet pset)

Constructor and destructor.

Definition at line 22 of file HLTExoticaValidator.cc.

23  : _pset(pset), _analysisnames(pset.getParameter<std::vector<std::string>>("analyses")), _collections(nullptr) {
24  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::constructor()";
25 
26  // Prepare the event collections to be used.
28 
29  // Create a new subanalysis for each of the analysis names.
30  // Notice that the constructor takes the full parameter set,
31  // the analysis name and the consumesCollector() separately.
32  for (size_t i = 0; i < _analysisnames.size(); ++i) {
34  _analyzers.push_back(analyzer);
35  }
36 }

References _analysisnames, _analyzers, _collections, _pset, ramdisk_dqm_sourceclient-live_cfg::analyzer, edm::EDConsumerBase::consumesCollector(), mps_fire::i, and LogDebug.

◆ ~HLTExoticaValidator()

HLTExoticaValidator::~HLTExoticaValidator ( )
override

Definition at line 38 of file HLTExoticaValidator.cc.

38  {
39  if (_collections != nullptr) {
40  delete _collections;
41  _collections = nullptr;
42  }
43 }

References _collections.

Member Function Documentation

◆ analyze()

void HLTExoticaValidator::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Method called for each event.

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 74 of file HLTExoticaValidator.cc.

74  {
75  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::analyze()";
76 
77  // static int eventNumber = 0;
78  // eventNumber++;
79  // LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::analyze, "
80  // << "Event: " << eventNumber;
81 
82  // Initialize the event collections
83  this->_collections->reset();
84 
85  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
86  iter->analyze(iEvent, iSetup, this->_collections);
87  }
88 }

References _analyzers, _collections, iEvent, LogDebug, and EVTColContainer::reset().

◆ beginJob()

void HLTExoticaValidator::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 90 of file HLTExoticaValidator.cc.

90 { LogDebug("ExoticaValidation") << "In HLTExoticaValidator::beginJob()"; }

References LogDebug.

◆ bookHistograms()

void HLTExoticaValidator::bookHistograms ( DQMStore::IBooker iBooker,
const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Method called by the framework to book histograms.

Implements DQMOneEDAnalyzer<>.

Definition at line 60 of file HLTExoticaValidator.cc.

62  {
63  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::bookHistograms()";
64 
65  // Loop over all sub-analyses and book histograms for all of them.
66  // For this to work, I think we have to pass the iBooker to each of them.
67  // I don't think we have any guarantee that this loop is executed
68  // sequentially, but the booking with iBooker itself has such a guarantee.
69  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
70  iter->subAnalysisBookHistos(iBooker, iRun, iSetup);
71  }
72 }

References _analyzers, and LogDebug.

◆ dqmBeginRun()

void HLTExoticaValidator::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Method called by the framework just before dqmBeginRun()

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 51 of file HLTExoticaValidator.cc.

51  {
52  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::dqmBeginRun()";
53 
54  // Call the Plotter beginRun (which stores the triggers paths..:)
55  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
56  iter->beginRun(iRun, iSetup);
57  }
58 }

References _analyzers, and LogDebug.

◆ dqmEndRun()

void HLTExoticaValidator::dqmEndRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 92 of file HLTExoticaValidator.cc.

92  {
93  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
94  iter->endRun();
95  }
96 }

References _analyzers.

◆ endJob()

void HLTExoticaValidator::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 98 of file HLTExoticaValidator.cc.

98 {}

Member Data Documentation

◆ _analysisnames

std::vector<std::string> HLTExoticaValidator::_analysisnames
private

The names of the subanalyses.

Definition at line 59 of file HLTExoticaValidator.h.

Referenced by HLTExoticaValidator().

◆ _analyzers

std::vector<HLTExoticaSubAnalysis> HLTExoticaValidator::_analyzers
private

The instances of the class which do the real work.

Definition at line 62 of file HLTExoticaValidator.h.

Referenced by analyze(), bookHistograms(), dqmBeginRun(), dqmEndRun(), and HLTExoticaValidator().

◆ _collections

EVTColContainer* HLTExoticaValidator::_collections
private

Centralized point of access to all collections used.

Definition at line 65 of file HLTExoticaValidator.h.

Referenced by analyze(), HLTExoticaValidator(), and ~HLTExoticaValidator().

◆ _pset

edm::ParameterSet HLTExoticaValidator::_pset
private

Copy (to be modified) of the input ParameterSet from configuration file.

Definition at line 57 of file HLTExoticaValidator.h.

Referenced by HLTExoticaValidator().

mps_fire.i
i
Definition: mps_fire.py:428
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:46
ramdisk_dqm_sourceclient-live_cfg.analyzer
analyzer
Definition: ramdisk_dqm_sourceclient-live_cfg.py:22
HLTExoticaValidator::_collections
EVTColContainer * _collections
Centralized point of access to all collections used.
Definition: HLTExoticaValidator.h:65
HLTExoticaValidator::_analysisnames
std::vector< std::string > _analysisnames
The names of the subanalyses.
Definition: HLTExoticaValidator.h:59
HLTExoticaSubAnalysis
Definition: HLTExoticaSubAnalysis.h:65
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
HLTExoticaValidator::_pset
edm::ParameterSet _pset
Copy (to be modified) of the input ParameterSet from configuration file.
Definition: HLTExoticaValidator.h:57
iEvent
int iEvent
Definition: GenABIO.cc:224
HLTExoticaValidator::_analyzers
std::vector< HLTExoticaSubAnalysis > _analyzers
The instances of the class which do the real work.
Definition: HLTExoticaValidator.h:62
analyzer
Definition: SiPixelLorentzAngle.h:82
EVTColContainer::reset
void reset()
Reset: clear all collections.
Definition: EVTColContainer.cc:113
EVTColContainer
container with all the objects needed
Definition: EVTColContainer.cc:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27