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 Member Functions | Private Attributes
HLTExoticaValidator Class Reference

#include <HLTExoticaValidator.h>

Inheritance diagram for HLTExoticaValidator:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HLTExoticaValidator (const edm::ParameterSet &)
 Constructor and destructor. More...
 
 ~HLTExoticaValidator ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::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 ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 & 
itemsToGetFromEvent () 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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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::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 Member Functions

virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 Method called for each event. More...
 
virtual void beginJob ()
 
virtual void dqmBeginRun (const edm::Run &iRun, const edm::EventSetup &iSetup) override
 Method called by the framework just before dqmBeginRun() More...
 
virtual void endJob ()
 
virtual void endRun (const edm::Run &iRun, const edm::EventSetup &iSetup) 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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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 38 of file HLTExoticaValidator.h.

Constructor & Destructor Documentation

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

Constructor and destructor.

Definition at line 22 of file HLTExoticaValidator.cc.

References _analysisnames, _analyzers, _collections, _pset, edm::EDConsumerBase::consumesCollector(), i, and LogDebug.

22  :
23  _pset(pset),
24  _analysisnames(pset.getParameter<std::vector<std::string> >("analysis")),
25  _collections(0)
26 {
27 
28  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::constructor()";
29 
30  // Prepare the event collections to be used.
32 
33  // Create a new subanalysis for each of the analysis names.
34  // Notice that the constructor takes the full parameter set,
35  // the analysis name and the consumesCollector() separately.
36  for (size_t i = 0; i < _analysisnames.size() ; ++i) {
38  _analyzers.push_back(analyzer);
39  }
40 
41 }
#define LogDebug(id)
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< HLTExoticaSubAnalysis > _analyzers
The instances of the class which do the real work.
container with all the objects needed
edm::ParameterSet _pset
Copy (to be modified) of the input ParameterSet from configuration file.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< std::string > _analysisnames
The names of the subanalyses.
EVTColContainer * _collections
Centralized point of access to all collections used.
HLTExoticaValidator::~HLTExoticaValidator ( )

Definition at line 43 of file HLTExoticaValidator.cc.

References _collections.

44 {
45  if (_collections != 0) {
46  delete _collections;
47  _collections = 0;
48  }
49 }
EVTColContainer * _collections
Centralized point of access to all collections used.

Member Function Documentation

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

Method called for each event.

Implements edm::stream::EDAnalyzerBase.

Definition at line 85 of file HLTExoticaValidator.cc.

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

86 {
87  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::analyze()";
88 
89  //static int eventNumber = 0;
90  //eventNumber++;
91  //LogDebug("ExoticaValidation") << "In HLTExoticaSubAnalysis::analyze, "
92  // << "Event: " << eventNumber;
93 
94  // Initialize the event collections
95  this->_collections->reset();
96 
97  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin();
98  iter != _analyzers.end(); ++iter) {
99  iter->analyze(iEvent, iSetup, this->_collections);
100  }
101 }
#define LogDebug(id)
std::vector< HLTExoticaSubAnalysis > _analyzers
The instances of the class which do the real work.
void reset()
Reset: clear all collections.
EVTColContainer * _collections
Centralized point of access to all collections used.
void HLTExoticaValidator::beginJob ( void  )
privatevirtual

Definition at line 105 of file HLTExoticaValidator.cc.

References LogDebug.

106 {
107  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::beginJob()";
108 }
#define LogDebug(id)
void HLTExoticaValidator::bookHistograms ( DQMStore::IBooker iBooker,
const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Method called by the framework to book histograms.

Implements DQMEDAnalyzer.

Definition at line 69 of file HLTExoticaValidator.cc.

References _analyzers, and LogDebug.

70 {
71 
72  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::bookHistograms()";
73 
74  // Loop over all sub-analyses and book histograms for all of them.
75  // For this to work, I think we have to pass the iBooker to each of them.
76  // I don't think we have any guarantee that this loop is executed sequentially,
77  // but the booking with iBooker itself has such a guarantee.
78  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin();
79  iter != _analyzers.end(); ++iter) {
80  iter->subAnalysisBookHistos(iBooker, iRun, iSetup);
81  }
82 }
#define LogDebug(id)
std::vector< HLTExoticaSubAnalysis > _analyzers
The instances of the class which do the real work.
void HLTExoticaValidator::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Method called by the framework just before dqmBeginRun()

Reimplemented from DQMEDAnalyzer.

Definition at line 58 of file HLTExoticaValidator.cc.

References _analyzers, and LogDebug.

59 {
60  LogDebug("ExoticaValidation") << "In HLTExoticaValidator::dqmBeginRun()";
61 
62  // Call the Plotter beginRun (which stores the triggers paths..:)
63  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin();
64  iter != _analyzers.end(); ++iter) {
65  iter->beginRun(iRun, iSetup);
66  }
67 }
#define LogDebug(id)
std::vector< HLTExoticaSubAnalysis > _analyzers
The instances of the class which do the real work.
void HLTExoticaValidator::endJob ( void  )
privatevirtual

Definition at line 119 of file HLTExoticaValidator.cc.

120 {
121 }
void HLTExoticaValidator::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 110 of file HLTExoticaValidator.cc.

References _analyzers.

111 {
112  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin();
113  iter != _analyzers.end(); ++iter) {
114  iter->endRun();
115  }
116 }
std::vector< HLTExoticaSubAnalysis > _analyzers
The instances of the class which do the real work.

Member Data Documentation

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

The names of the subanalyses.

Definition at line 60 of file HLTExoticaValidator.h.

Referenced by HLTExoticaValidator().

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

The instances of the class which do the real work.

Definition at line 63 of file HLTExoticaValidator.h.

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

EVTColContainer* HLTExoticaValidator::_collections
private

Centralized point of access to all collections used.

Definition at line 66 of file HLTExoticaValidator.h.

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

edm::ParameterSet HLTExoticaValidator::_pset
private

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

Definition at line 58 of file HLTExoticaValidator.h.

Referenced by HLTExoticaValidator().