00001 #include "L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTrivialProducer.h" 00002 00003 00004 // 00005 // constants, enums and typedefs 00006 // 00007 00008 // 00009 // static data member definitions 00010 // 00011 00012 // 00013 // constructors and destructor 00014 // 00015 L1ScalesTrivialProducer::L1ScalesTrivialProducer(const edm::ParameterSet& ps) 00016 { 00017 00018 //the following line is needed to tell the framework what 00019 // data is being produced 00020 setWhatProduced(this, &L1ScalesTrivialProducer::produceEmScale); 00021 setWhatProduced(this, &L1ScalesTrivialProducer::produceJetScale); 00022 00023 //now do what ever other initialization is needed 00024 00025 // get numbers from the config file - all units are GeV 00026 m_emEtScaleInputLsb = ps.getParameter<double>("L1CaloEmEtScaleLSB"); 00027 m_emEtThresholds = ps.getParameter< std::vector<double> >("L1CaloEmThresholds"); 00028 00029 m_jetEtScaleInputLsb = ps.getParameter<double>("L1CaloRegionEtScaleLSB"); 00030 m_jetEtThresholds = ps.getParameter< std::vector<double> >("L1CaloJetThresholds"); 00031 00032 } 00033 00034 00035 L1ScalesTrivialProducer::~L1ScalesTrivialProducer() 00036 { 00037 00038 // do anything here that needs to be done at destruction time 00039 // (e.g. close files, deallocate resources etc.) 00040 00041 } 00042 00043 00044 // 00045 // member functions 00046 // 00047 00048 // ------------ method called to produce the data ------------ 00049 std::auto_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceEmScale(const L1EmEtScaleRcd& iRecord) 00050 { 00051 using namespace edm::es; 00052 00053 std::auto_ptr<L1CaloEtScale> emScale = std::auto_ptr<L1CaloEtScale>( new L1CaloEtScale(m_emEtScaleInputLsb, m_emEtThresholds) ); 00054 00055 return emScale ; 00056 } 00057 00058 std::auto_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceJetScale(const L1JetEtScaleRcd& iRecord) 00059 { 00060 using namespace edm::es; 00061 00062 std::auto_ptr<L1CaloEtScale> jetEtScale = std::auto_ptr<L1CaloEtScale>( new L1CaloEtScale(m_jetEtScaleInputLsb, m_jetEtThresholds) ); 00063 00064 return jetEtScale ; 00065 } 00066