File indexing completed on 2024-04-06 12:18:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include "HLTHiggsValidator.h"
0020 #include "EVTColContainer.h"
0021
0022
0023
0024 HLTHiggsValidator::HLTHiggsValidator(const edm::ParameterSet& pset)
0025 : _pset(pset), _analysisnames(pset.getParameter<std::vector<std::string> >("analyses")), _collections(nullptr) {
0026 _collections = new EVTColContainer;
0027
0028
0029 for (size_t i = 0; i < _analysisnames.size(); ++i) {
0030 HLTHiggsSubAnalysis analyzer(_pset, _analysisnames.at(i), consumesCollector());
0031 _analyzers.push_back(analyzer);
0032 }
0033 }
0034
0035 HLTHiggsValidator::~HLTHiggsValidator() {
0036 if (_collections != nullptr) {
0037 delete _collections;
0038 _collections = nullptr;
0039 }
0040 }
0041
0042 void HLTHiggsValidator::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
0043
0044 for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
0045 iter->beginRun(iRun, iSetup);
0046 }
0047 }
0048
0049 void HLTHiggsValidator::bookHistograms(DQMStore::IBooker& ibooker,
0050 const edm::Run& iRun,
0051 const edm::EventSetup& iSetup) {
0052
0053 for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
0054 iter->bookHistograms(ibooker);
0055 }
0056 }
0057
0058 void HLTHiggsValidator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0059
0060 this->_collections->reset();
0061
0062 for (std::vector<HLTHiggsSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
0063 iter->analyze(iEvent, iSetup, this->_collections);
0064 }
0065 }
0066
0067
0068