00001 00017 // this class header 00018 #include "L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigTrivialProducer.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/L1GtPrescaleFactorsAlgoTrigRcd.h" 00034 00035 // forward declarations 00036 00037 // constructor(s) 00038 L1GtPrescaleFactorsAlgoTrigTrivialProducer::L1GtPrescaleFactorsAlgoTrigTrivialProducer( 00039 const edm::ParameterSet& parSet) { 00040 00041 // tell the framework what data is being produced 00042 setWhatProduced(this, 00043 &L1GtPrescaleFactorsAlgoTrigTrivialProducer::producePrescaleFactors); 00044 00045 // now do what ever other initialization is needed 00046 00047 // prescale factors 00048 00049 std::vector<edm::ParameterSet> prescaleFactorsSet = 00050 parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet"); 00051 00052 for (std::vector<edm::ParameterSet>::const_iterator itPfSet = 00053 prescaleFactorsSet.begin(); itPfSet != prescaleFactorsSet.end(); ++itPfSet) { 00054 00055 // prescale factors 00056 m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors")); 00057 00058 } 00059 00060 } 00061 00062 // destructor 00063 L1GtPrescaleFactorsAlgoTrigTrivialProducer::~L1GtPrescaleFactorsAlgoTrigTrivialProducer() { 00064 00065 // empty 00066 00067 } 00068 00069 // member functions 00070 00071 // method called to produce the data 00072 boost::shared_ptr<L1GtPrescaleFactors> L1GtPrescaleFactorsAlgoTrigTrivialProducer::producePrescaleFactors( 00073 const L1GtPrescaleFactorsAlgoTrigRcd& iRecord) { 00074 00075 boost::shared_ptr<L1GtPrescaleFactors> pL1GtPrescaleFactors = 00076 boost::shared_ptr<L1GtPrescaleFactors>( 00077 new L1GtPrescaleFactors(m_prescaleFactors) ); 00078 00079 return pL1GtPrescaleFactors; 00080 }