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  const edm::ParameterSet& parSet) {
37 
38  // tell the framework what data is being produced
39  setWhatProduced(this,
41 
42  // now do what ever other initialization is needed
43 
44  // prescale factors
45 
46  std::vector<edm::ParameterSet> prescaleFactorsSet =
47  parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet");
48 
49  for (std::vector<edm::ParameterSet>::const_iterator itPfSet =
50  prescaleFactorsSet.begin(); itPfSet != prescaleFactorsSet.end(); ++itPfSet) {
51 
52  // prescale factors
53  m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors"));
54 
55  }
56 
57 }
58 
59 // destructor
61 
62  // empty
63 
64 }
65 
66 // member functions
67 
68 // method called to produce the data
70  const L1GtPrescaleFactorsAlgoTrigRcd& iRecord) {
71 
72  return std::make_unique<L1GtPrescaleFactors>(m_prescaleFactors);
73 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::unique_ptr< L1GtPrescaleFactors > producePrescaleFactors(const L1GtPrescaleFactorsAlgoTrigRcd &)
public methods
L1GtPrescaleFactorsAlgoTrigTrivialProducer(const edm::ParameterSet &)
constructor
std::vector< std::vector< int > > m_prescaleFactors
prescale factors