File indexing completed on 2024-04-06 12:18:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "HLTriggerOffline/Exotica/interface/HLTExoticaValidator.h"
0017 #include "HLTriggerOffline/Exotica/src/EVTColContainer.cc"
0018
0019
0020
0021
0022 HLTExoticaValidator::HLTExoticaValidator(const edm::ParameterSet &pset)
0023 : _pset(pset), _analysisnames(pset.getParameter<std::vector<std::string>>("analyses")), _collections(nullptr) {
0024 LogDebug("ExoticaValidation") << "In HLTExoticaValidator::constructor()";
0025
0026
0027 _collections = new EVTColContainer;
0028
0029
0030
0031
0032 for (size_t i = 0; i < _analysisnames.size(); ++i) {
0033 HLTExoticaSubAnalysis analyzer(_pset, _analysisnames.at(i), consumesCollector());
0034 _analyzers.push_back(analyzer);
0035 }
0036 }
0037
0038 HLTExoticaValidator::~HLTExoticaValidator() {
0039 if (_collections != nullptr) {
0040 delete _collections;
0041 _collections = nullptr;
0042 }
0043 }
0044
0045
0046
0047
0048
0049
0050
0051 void HLTExoticaValidator::dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) {
0052 LogDebug("ExoticaValidation") << "In HLTExoticaValidator::dqmBeginRun()";
0053
0054
0055 for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
0056 iter->beginRun(iRun, iSetup);
0057 }
0058 }
0059
0060 void HLTExoticaValidator::bookHistograms(DQMStore::IBooker &iBooker,
0061 const edm::Run &iRun,
0062 const edm::EventSetup &iSetup) {
0063 LogDebug("ExoticaValidation") << "In HLTExoticaValidator::bookHistograms()";
0064
0065
0066
0067
0068
0069 for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
0070 iter->subAnalysisBookHistos(iBooker, iRun, iSetup);
0071 }
0072 }
0073
0074 void HLTExoticaValidator::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) {
0075 LogDebug("ExoticaValidation") << "In HLTExoticaValidator::analyze()";
0076
0077
0078
0079
0080
0081
0082
0083 this->_collections->reset();
0084
0085 for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
0086 iter->analyze(iEvent, iSetup, this->_collections);
0087 }
0088 }
0089
0090 void HLTExoticaValidator::beginJob() { LogDebug("ExoticaValidation") << "In HLTExoticaValidator::beginJob()"; }
0091
0092 void HLTExoticaValidator::dqmEndRun(const edm::Run &iRun, const edm::EventSetup &iSetup) {
0093 for (std::vector<HLTExoticaSubAnalysis>::iterator iter = _analyzers.begin(); iter != _analyzers.end(); ++iter) {
0094 iter->endRun();
0095 }
0096 }
0097
0098 void HLTExoticaValidator::endJob() {}
0099
0100
0101