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 // $Id: HLTHiggsValidator.cc,v 1.7 2012/03/23 11:50:56 duarte Exp $
12 //
13 //
14 
15 // system include files
16 //#include<memory>
17 
18 //#include "FWCore/Framework/interface/MakerMacros.h"
19 
22 
24 // Constructor
26  _pset(pset),
27  _analysisnames(pset.getParameter<std::vector<std::string> >("analysis")),
28  _collections(0),
29  _dbe(0)
30 {
32 }
33 
35 {
36  if( _collections != 0 )
37  {
38  delete _collections;
39  _collections = 0;
40  }
41 }
42 
43 
44 void HLTHiggsValidator::beginRun(const edm::Run & iRun, const edm::EventSetup & iSetup)
45 {
46  for(size_t i = 0; i < _analysisnames.size() ; ++i)
47  {
49  _analyzers.push_back(analyzer);
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 
59 
61 {
62  static int eventNumber = 0;
63  eventNumber++;
64  LogTrace("HiggsValidation") << "In HLTHiggsSubAnalysis::analyze, "
65  << "Event: " << eventNumber;
66 
67  // Initialize the event collections
68  this->_collections->reset();
69 
70  for(std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin();
71  iter != _analyzers.end(); ++iter)
72  {
73  iter->analyze(iEvent, iSetup, this->_collections);
74  }
75 }
76 
77 
78 
80 {
81 }
82 
83 void HLTHiggsValidator::endRun(const edm::Run & iRun, const edm::EventSetup& iSetup)
84 {
85  // vector<HLTMuonPlotter>::iterator iter;
86  // for(std::vector<HLTHiggsPlotter>::iterator iter = _analyzers.begin();
87  // iter != analyzers_.end(); ++iter)
88  // {
89  // iter->endRun(iRun, iSetup);
90  // }
91 }
92 
93 
95 {
96 }
97 
98 
99 
100 //define this as a plug-in
101 //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.
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:36