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 
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 
48  // prescale factors
49 
50  std::vector<edm::ParameterSet> prescaleFactorsSet =
51  parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet");
52 
53  for (std::vector<edm::ParameterSet>::const_iterator itPfSet =
54  prescaleFactorsSet.begin(); itPfSet != prescaleFactorsSet.end(); ++itPfSet) {
55 
56  // prescale factors
57  m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors"));
58 
59  }
60 
61 }
62 
63 // destructor
65 {
66 
67  // empty
68 
69 }
70 
71 // member functions
72 
73 // method called to produce the data
74 boost::shared_ptr<L1GtPrescaleFactors>
76  const L1GtPrescaleFactorsTechTrigRcd& iRecord)
77 {
78 
79  boost::shared_ptr<L1GtPrescaleFactors> pL1GtPrescaleFactors =
80  boost::shared_ptr<L1GtPrescaleFactors>(
82 
83  return pL1GtPrescaleFactors;
84 }
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