CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
std::unique_ptr< L1GtPrescaleFactors > producePrescaleFactors(const L1GtPrescaleFactorsAlgoTrigRcd &)
public methods
L1GtPrescaleFactorsAlgoTrigTrivialProducer(const edm::ParameterSet &)
constructor
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< std::vector< int > > m_prescaleFactors
prescale factors