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:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 HLTExoticaValidator (const edm::ParameterSet &)
 Constructor and destructor. More...
 
 ~HLTExoticaValidator () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

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...
 

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 endJob () override
 
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...
 

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 ( const edm::ParameterSet pset)

Constructor and destructor.

Definition at line 22 of file HLTExoticaValidator.cc.

References _analysisnames, _analyzers, _collections, _pset, mps_fire::i, and LogDebug.

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) {
33  HLTExoticaSubAnalysis analyzer(_pset, _analysisnames.at(i), consumesCollector());
34  _analyzers.push_back(analyzer);
35  }
36 }
#define LogDebug(id)
T getParameter(std::string const &) const
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.
std::vector< std::string > _analysisnames
The names of the subanalyses.
EVTColContainer * _collections
Centralized point of access to all collections used.
HLTExoticaValidator::~HLTExoticaValidator ( )
override

Definition at line 38 of file HLTExoticaValidator.cc.

References _collections.

38  {
39  if (_collections != nullptr) {
40  delete _collections;
41  _collections = nullptr;
42  }
43 }
EVTColContainer * _collections
Centralized point of access to all collections used.

Member Function Documentation

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

Method called for each event.

Definition at line 74 of file HLTExoticaValidator.cc.

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

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 }
#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  )
overrideprivate

Definition at line 90 of file HLTExoticaValidator.cc.

References LogDebug.

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

Method called by the framework to book histograms.

Definition at line 60 of file HLTExoticaValidator.cc.

References _analyzers, and LogDebug.

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 }
#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 
)
overrideprivate

Method called by the framework just before dqmBeginRun()

Definition at line 51 of file HLTExoticaValidator.cc.

References _analyzers, and LogDebug.

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 }
#define LogDebug(id)
std::vector< HLTExoticaSubAnalysis > _analyzers
The instances of the class which do the real work.
void HLTExoticaValidator::endJob ( void  )
overrideprivate

Definition at line 98 of file HLTExoticaValidator.cc.

98 {}
void HLTExoticaValidator::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 92 of file HLTExoticaValidator.cc.

References _analyzers.

92  {
93  for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
94  iter->endRun();
95  }
96 }
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 59 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 62 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 65 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 57 of file HLTExoticaValidator.h.

Referenced by HLTExoticaValidator().