CMS 3D CMS Logo

L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 #include <memory>
20 
21 #include <vector>
22 
23 // user include files
24 // base class
26 
29 
31 
32 // forward declarations
33 
34 // constructor(s)
36  // tell the framework what data is being produced
38 
39  // now do what ever other initialization is needed
40 
41  // prescale factors
42 
43  std::vector<edm::ParameterSet> prescaleFactorsSet =
44  parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet");
45 
46  for (std::vector<edm::ParameterSet>::const_iterator itPfSet = prescaleFactorsSet.begin();
47  itPfSet != prescaleFactorsSet.end();
48  ++itPfSet) {
49  // prescale factors
50  m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors"));
51  }
52 }
53 
54 // destructor
56  // empty
57 }
58 
59 // member functions
60 
61 // method called to produce the data
63  const L1GtPrescaleFactorsAlgoTrigRcd& iRecord) {
64  return std::make_unique<L1GtPrescaleFactors>(m_prescaleFactors);
65 }
ESHandle.h
L1GtPrescaleFactorsAlgoTrigTrivialProducer::L1GtPrescaleFactorsAlgoTrigTrivialProducer
L1GtPrescaleFactorsAlgoTrigTrivialProducer(const edm::ParameterSet &)
constructor
Definition: L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc:35
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ESProducer.h
L1GtPrescaleFactorsAlgoTrigTrivialProducer::m_prescaleFactors
std::vector< std::vector< int > > m_prescaleFactors
prescale factors
Definition: L1GtPrescaleFactorsAlgoTrigTrivialProducer.h:50
L1GtPrescaleFactorsAlgoTrigTrivialProducer::producePrescaleFactors
std::unique_ptr< L1GtPrescaleFactors > producePrescaleFactors(const L1GtPrescaleFactorsAlgoTrigRcd &)
public methods
Definition: L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc:62
edm::ParameterSet
Definition: ParameterSet.h:47
L1GtPrescaleFactorsAlgoTrigRcd.h
ModuleFactory.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1GtPrescaleFactorsAlgoTrigTrivialProducer.h
L1GtPrescaleFactorsAlgoTrigTrivialProducer::~L1GtPrescaleFactorsAlgoTrigTrivialProducer
~L1GtPrescaleFactorsAlgoTrigTrivialProducer() override
destructor
Definition: L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc:55
L1GtPrescaleFactorsAlgoTrigRcd
Definition: L1GtPrescaleFactorsAlgoTrigRcd.h:38