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 
19 #include "HLTHiggsValidator.h"
20 #include "EVTColContainer.h"
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) {
30  HLTHiggsSubAnalysis analyzer(_pset, _analysisnames.at(i), consumesCollector());
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 //define this as a plug-in
68 //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
container with all the objects needed
int iEvent
Definition: GenABIO.cc:224
EVTColContainer * _collections
The container with all the collections needed.
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