CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  _dbe(0)
29 {
31 
32  //pass consumes list to the helper classes
33  for(size_t i = 0; i < _analysisnames.size() ; ++i)
34  {
36  _analyzers.push_back(analyzer);
37  }
38 
39 }
40 
42 {
43  if( _collections != 0 )
44  {
45  delete _collections;
46  _collections = 0;
47  }
48 }
49 
50 void HLTHiggsValidator::beginRun(const edm::Run & iRun, const edm::EventSetup & iSetup)
51 {
52  // Call the Plotter beginRun (which stores the triggers paths..:)
53  for(std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin();
54  iter != _analyzers.end(); ++iter)
55  {
56  iter->beginRun(iRun, iSetup);
57  }
58 }
59 
60 
62 {
63  static int eventNumber = 0;
64  eventNumber++;
65  LogTrace("HiggsValidation") << "In HLTHiggsSubAnalysis::analyze, "
66  << "Event: " << eventNumber;
67 
68  // Initialize the event collections
69  this->_collections->reset();
70 
71  for(std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin();
72  iter != _analyzers.end(); ++iter)
73  {
74  iter->analyze(iEvent, iSetup, this->_collections);
75  }
76 }
77 
78 
79 
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 
96 {
97 }
98 
99 
100 
101 //define this as a plug-in
102 //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 analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
virtual void beginJob()
container with all the objects needed
virtual void endRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
int iEvent
Definition: GenABIO.cc:243
EVTColContainer * _collections
The container with all the collections needed.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< std::string > _analysisnames
the names of the subanalysis
#define LogTrace(id)
virtual void endJob()
virtual void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
HLTHiggsValidator(const edm::ParameterSet &)
Constructor.
Definition: Run.h:41