1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// -*- C++ -*-
//
// Package: HLTHiggsValidator
// Class: HLTHiggsValidator
//
//
// Jordi Duarte Campderros (based on the Jason Slaunwhite
// and Jeff Klukas coded from the HLTriggerOffline/Muon package
//
//
//
// system include files
//#include<memory>
//#include "FWCore/Framework/interface/MakerMacros.h"
#include "HLTHiggsValidator.h"
#include "EVTColContainer.h"
//////// Class Methods ///////////////////////////////////////////////////////
// Constructor
HLTHiggsValidator::HLTHiggsValidator(const edm::ParameterSet& pset)
: _pset(pset), _analysisnames(pset.getParameter<std::vector<std::string> >("analyses")), _collections(nullptr) {
_collections = new EVTColContainer;
//pass consumes list to the helper classes
for (size_t i = 0; i < _analysisnames.size(); ++i) {
HLTHiggsSubAnalysis analyzer(_pset, _analysisnames.at(i), consumesCollector());
_analyzers.push_back(analyzer);
}
}
HLTHiggsValidator::~HLTHiggsValidator() {
if (_collections != nullptr) {
delete _collections;
_collections = nullptr;
}
}
void HLTHiggsValidator::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
// Call the Plotter beginRun (which stores the triggers paths..:)
for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
iter->beginRun(iRun, iSetup);
}
}
void HLTHiggsValidator::bookHistograms(DQMStore::IBooker& ibooker,
const edm::Run& iRun,
const edm::EventSetup& iSetup) {
// Call the Plotter bookHistograms (which stores the triggers paths..:)
for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
iter->bookHistograms(ibooker);
}
}
void HLTHiggsValidator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
// Initialize the event collections
this->_collections->reset();
for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
iter->analyze(iEvent, iSetup, this->_collections);
}
}
//define this as a plug-in
//DEFINE_FWK_MODULE(HLTHiggsValidator);
|