00001 // -*- C++ -*- 00002 // 00003 // Package: L1TriggerKeyDummyProd 00004 // Class: L1TriggerKeyDummyProd 00005 // 00013 // 00014 // Original Author: Werner Man-Li Sun 00015 // Created: Sat Mar 1 01:08:46 CET 2008 00016 // $Id: L1TriggerKeyDummyProd.cc,v 1.1 2008/03/03 21:52:18 wsun Exp $ 00017 // 00018 // 00019 00020 00021 // system include files 00022 00023 // user include files 00024 #include "CondTools/L1Trigger/plugins/L1TriggerKeyDummyProd.h" 00025 00026 // 00027 // class declaration 00028 // 00029 00030 // 00031 // constants, enums and typedefs 00032 // 00033 00034 // 00035 // static data member definitions 00036 // 00037 00038 // 00039 // constructors and destructor 00040 // 00041 L1TriggerKeyDummyProd::L1TriggerKeyDummyProd(const edm::ParameterSet& iConfig) 00042 { 00043 //the following line is needed to tell the framework what 00044 // data is being produced 00045 setWhatProduced(this); 00046 00047 //now do what ever other initialization is needed 00048 m_key.setTSCKey( iConfig.getParameter< std::string >( "tscKey" ) ) ; 00049 00050 typedef std::vector< edm::ParameterSet > SubsystemKeys; 00051 SubsystemKeys keys = 00052 iConfig.getParameter< SubsystemKeys >( "subsystemKeys" ) ; 00053 00054 for( SubsystemKeys::const_iterator it = keys.begin (); 00055 it != keys.end() ; 00056 ++it ) 00057 { 00058 m_key.add( it->getParameter< std::string >( "record" ), 00059 it->getParameter< std::string >( "type" ), 00060 it->getParameter< std::string >( "key" ) ) ; 00061 } 00062 } 00063 00064 00065 L1TriggerKeyDummyProd::~L1TriggerKeyDummyProd() 00066 { 00067 00068 // do anything here that needs to be done at desctruction time 00069 // (e.g. close files, deallocate resources etc.) 00070 00071 } 00072 00073 00074 // 00075 // member functions 00076 // 00077 00078 // ------------ method called to produce the data ------------ 00079 L1TriggerKeyDummyProd::ReturnType 00080 L1TriggerKeyDummyProd::produce(const L1TriggerKeyRcd& iRecord) 00081 { 00082 using namespace edm::es; 00083 boost::shared_ptr<L1TriggerKey> pL1TriggerKey ; 00084 00085 pL1TriggerKey = boost::shared_ptr< L1TriggerKey >( 00086 new L1TriggerKey( m_key ) ) ; 00087 00088 return pL1TriggerKey ; 00089 } 00090 00091 //define this as a plug-in 00092 //DEFINE_FWK_EVENTSETUP_MODULE(L1TriggerKeyDummyProd);