CMS 3D CMS Logo

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