CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/L1TriggerConfig/L1GtConfigProducers/src/L1GtPrescaleFactorsTechTrigTrivialProducer.cc

Go to the documentation of this file.
00001 
00017 // this class header
00018 #include "L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigTrivialProducer.h"
00019 
00020 // system include files
00021 #include <memory>
00022 #include "boost/shared_ptr.hpp"
00023 
00024 #include <vector>
00025 
00026 // user include files
00027 //   base class
00028 #include "FWCore/Framework/interface/ESProducer.h"
00029 
00030 #include "FWCore/Framework/interface/ModuleFactory.h"
00031 #include "FWCore/Framework/interface/ESHandle.h"
00032 
00033 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsTechTrigRcd.h"
00034 
00035 // forward declarations
00036 
00037 // constructor(s)
00038 L1GtPrescaleFactorsTechTrigTrivialProducer::L1GtPrescaleFactorsTechTrigTrivialProducer(
00039         const edm::ParameterSet& parSet)
00040 {
00041     // tell the framework what data is being produced
00042     setWhatProduced(this,
00043             &L1GtPrescaleFactorsTechTrigTrivialProducer::producePrescaleFactors);
00044 
00045     // now do what ever other initialization is needed
00046 
00047 
00048     // prescale factors
00049 
00050     std::vector<edm::ParameterSet> prescaleFactorsSet =
00051         parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet");
00052 
00053     for (std::vector<edm::ParameterSet>::const_iterator itPfSet =
00054             prescaleFactorsSet.begin(); itPfSet != prescaleFactorsSet.end(); ++itPfSet) {
00055 
00056         // prescale factors
00057         m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors"));
00058 
00059     }
00060 
00061 }
00062 
00063 // destructor
00064 L1GtPrescaleFactorsTechTrigTrivialProducer::~L1GtPrescaleFactorsTechTrigTrivialProducer()
00065 {
00066 
00067     // empty
00068 
00069 }
00070 
00071 // member functions
00072 
00073 // method called to produce the data
00074 boost::shared_ptr<L1GtPrescaleFactors> 
00075     L1GtPrescaleFactorsTechTrigTrivialProducer::producePrescaleFactors(
00076         const L1GtPrescaleFactorsTechTrigRcd& iRecord)
00077 {
00078 
00079     boost::shared_ptr<L1GtPrescaleFactors> pL1GtPrescaleFactors =
00080             boost::shared_ptr<L1GtPrescaleFactors>(
00081                     new L1GtPrescaleFactors(m_prescaleFactors) );
00082 
00083     return pL1GtPrescaleFactors;
00084 }