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),
26  _analysisnames(pset.getParameter<std::vector<std::string> >("analysis")),
27  _collections(0)
28 {
30 
31  //pass consumes list to the helper classes
32  for(size_t i = 0; i < _analysisnames.size() ; ++i)
33  {
35  _analyzers.push_back(analyzer);
36  }
37 
38 }
39 
41 {
42  if( _collections != 0 )
43  {
44  delete _collections;
45  _collections = 0;
46  }
47 }
48 
49 void HLTHiggsValidator::dqmBeginRun(const edm::Run & iRun, const edm::EventSetup & iSetup)
50 {
51  // Call the Plotter beginRun (which stores the triggers paths..:)
52  for(std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin();
53  iter != _analyzers.end(); ++iter)
54  {
55  iter->beginRun(iRun, iSetup);
56  }
57 }
58 
60  // Call the Plotter bookHistograms (which stores the triggers paths..:)
61  for(std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin();
62  iter != _analyzers.end(); ++iter)
63  {
64  iter->bookHistograms(ibooker);
65  }
66 
67 }
68 
70 {
71  // Initialize the event collections
72  this->_collections->reset();
73 
74  for(std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin();
75  iter != _analyzers.end(); ++iter)
76  {
77  iter->analyze(iEvent, iSetup, this->_collections);
78  }
79 }
80 
81 
82 
83 
84 void HLTHiggsValidator::endRun(const edm::Run & iRun, const edm::EventSetup& iSetup)
85 {
86  // vector<HLTMuonPlotter>::iterator iter;
87  // for(std::vector<HLTHiggsPlotter>::iterator iter = _analyzers.begin();
88  // iter != analyzers_.end(); ++iter)
89  // {
90  // iter->endRun(iRun, iSetup);
91  // }
92 }
93 
94 
95 
96 
97 
98 //define this as a plug-in
99 //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.
int i
Definition: DBlmapReader.cc:9
virtual void bookHistograms(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
container with all the objects needed
int iEvent
Definition: GenABIO.cc:230
EVTColContainer * _collections
The container with all the collections needed.
virtual void endRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
virtual 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(const edm::ParameterSet &)
Constructor.
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: Run.h:42