CMS 3D CMS Logo

HLTHiggsValidator.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HLTHiggsValidator
4 // Class: HLTHiggsValidator
5 //
6 
7 //
8 // Jordi Duarte Campderros (based on the Jason Slaunwhite
9 // and Jeff Klukas coded from the HLTriggerOffline/Muon package
10 //
11 //
12 //
13 
14 // system include files
15 //#include<memory>
16 
17 //#include "FWCore/Framework/interface/MakerMacros.h"
18 
21 
23 // Constructor
25  : _pset(pset), _analysisnames(pset.getParameter<std::vector<std::string> >("analyses")), _collections(nullptr) {
27 
28  //pass consumes list to the helper classes
29  for (size_t i = 0; i < _analysisnames.size(); ++i) {
31  _analyzers.push_back(analyzer);
32  }
33 }
34 
36  if (_collections != nullptr) {
37  delete _collections;
38  _collections = nullptr;
39  }
40 }
41 
42 void HLTHiggsValidator::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
43  // Call the Plotter beginRun (which stores the triggers paths..:)
44  for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
45  iter->beginRun(iRun, iSetup);
46  }
47 }
48 
50  const edm::Run& iRun,
51  const edm::EventSetup& iSetup) {
52  // Call the Plotter bookHistograms (which stores the triggers paths..:)
53  for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
54  iter->bookHistograms(ibooker);
55  }
56 }
57 
59  // Initialize the event collections
60  this->_collections->reset();
61 
62  for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
63  iter->analyze(iEvent, iSetup, this->_collections);
64  }
65 }
66 
67 void HLTHiggsValidator::dqmEndRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
68  // vector<HLTMuonPlotter>::iterator iter;
69  // for(std::vector<HLTHiggsPlotter>::iterator iter = _analyzers.begin();
70  // iter != analyzers_.end(); ++iter)
71  // {
72  // iter->endRun(iRun, iSetup);
73  // }
74 }
75 
76 //define this as a plug-in
77 //DEFINE_FWK_MODULE(HLTHiggsValidator);
std::vector< HLTHiggsSubAnalysis > _analyzers
The instances of the class which do the real work.
edm::ParameterSet _pset
Input from configuration file.
void bookHistograms(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
#define nullptr
container with all the objects needed
void dqmEndRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
int iEvent
Definition: GenABIO.cc:224
EVTColContainer * _collections
The container with all the collections needed.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
void reset()
Reset: clear all collections.
std::vector< std::string > _analysisnames
the names of the subanalysis
~HLTHiggsValidator() override
HLTHiggsValidator(const edm::ParameterSet &)
Constructor.
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: Run.h:45