File indexing completed on 2024-04-06 12:22:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigTrivialProducer.h"
0017
0018
0019 #include <memory>
0020
0021 #include <vector>
0022
0023
0024
0025 #include "FWCore/Framework/interface/ESProducer.h"
0026
0027 #include "FWCore/Framework/interface/ModuleFactory.h"
0028 #include "FWCore/Framework/interface/ESHandle.h"
0029
0030 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsAlgoTrigRcd.h"
0031
0032
0033
0034
0035 L1GtPrescaleFactorsAlgoTrigTrivialProducer::L1GtPrescaleFactorsAlgoTrigTrivialProducer(const edm::ParameterSet& parSet) {
0036
0037 setWhatProduced(this, &L1GtPrescaleFactorsAlgoTrigTrivialProducer::producePrescaleFactors);
0038
0039
0040
0041
0042
0043 std::vector<edm::ParameterSet> prescaleFactorsSet =
0044 parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet");
0045
0046 for (std::vector<edm::ParameterSet>::const_iterator itPfSet = prescaleFactorsSet.begin();
0047 itPfSet != prescaleFactorsSet.end();
0048 ++itPfSet) {
0049
0050 m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors"));
0051 }
0052 }
0053
0054
0055 L1GtPrescaleFactorsAlgoTrigTrivialProducer::~L1GtPrescaleFactorsAlgoTrigTrivialProducer() {
0056
0057 }
0058
0059
0060
0061
0062 std::unique_ptr<L1GtPrescaleFactors> L1GtPrescaleFactorsAlgoTrigTrivialProducer::producePrescaleFactors(
0063 const L1GtPrescaleFactorsAlgoTrigRcd& iRecord) {
0064 return std::make_unique<L1GtPrescaleFactors>(m_prescaleFactors);
0065 }