CMS 3D CMS Logo

L1GtPrescaleFactorsTechTrigTrivialProducer.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 
45  // prescale factors
46 
47  std::vector<edm::ParameterSet> prescaleFactorsSet =
48  parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet");
49 
50  for (std::vector<edm::ParameterSet>::const_iterator itPfSet =
51  prescaleFactorsSet.begin(); itPfSet != prescaleFactorsSet.end(); ++itPfSet) {
52 
53  // prescale factors
54  m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors"));
55 
56  }
57 
58 }
59 
60 // destructor
62 {
63 
64  // empty
65 
66 }
67 
68 // member functions
69 
70 // method called to produce the data
71 std::unique_ptr<L1GtPrescaleFactors>
73  const L1GtPrescaleFactorsTechTrigRcd& iRecord)
74 {
75  return std::make_unique<L1GtPrescaleFactors>(m_prescaleFactors);
76 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
L1GtPrescaleFactorsTechTrigTrivialProducer(const edm::ParameterSet &)
constructor
std::vector< std::vector< int > > m_prescaleFactors
prescale factors
std::unique_ptr< L1GtPrescaleFactors > producePrescaleFactors(const L1GtPrescaleFactorsTechTrigRcd &)
public methods