CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 #include <memory>
22 #include "boost/shared_ptr.hpp"
23 
24 #include <vector>
25 
26 // user include files
27 // base class
29 
32 
34 
35 // forward declarations
36 
37 // constructor(s)
39  const edm::ParameterSet& parSet) {
40 
41  // tell the framework what data is being produced
42  setWhatProduced(this,
44 
45  // now do what ever other initialization is needed
46 
47  // prescale factors
48 
49  std::vector<edm::ParameterSet> prescaleFactorsSet =
50  parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet");
51 
52  for (std::vector<edm::ParameterSet>::const_iterator itPfSet =
53  prescaleFactorsSet.begin(); itPfSet != prescaleFactorsSet.end(); ++itPfSet) {
54 
55  // prescale factors
56  m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors"));
57 
58  }
59 
60 }
61 
62 // destructor
64 
65  // empty
66 
67 }
68 
69 // member functions
70 
71 // method called to produce the data
73  const L1GtPrescaleFactorsAlgoTrigRcd& iRecord) {
74 
75  boost::shared_ptr<L1GtPrescaleFactors> pL1GtPrescaleFactors =
76  boost::shared_ptr<L1GtPrescaleFactors>(
78 
79  return pL1GtPrescaleFactors;
80 }
T getParameter(std::string const &) const
boost::shared_ptr< L1GtPrescaleFactors > producePrescaleFactors(const L1GtPrescaleFactorsAlgoTrigRcd &)
public methods
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
L1GtPrescaleFactorsAlgoTrigTrivialProducer(const edm::ParameterSet &)
constructor
std::vector< std::vector< int > > m_prescaleFactors
prescale factors