CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/PhysicsTools/PatAlgos/plugins/StringResolutionProviderESProducer.cc

Go to the documentation of this file.
00001 #include <FWCore/Framework/interface/ESProducer.h>
00002 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00003 
00004 #include "PhysicsTools/PatAlgos/interface/StringResolutionProvider.h"
00005 #include "PhysicsTools/PatAlgos/interface/KinematicResolutionRcd.h"
00006 
00007 class StringResolutionProviderESProducer : public edm::ESProducer 
00008                                          {
00009         public:
00010                 StringResolutionProviderESProducer() { }
00011                 StringResolutionProviderESProducer(const edm::ParameterSet &iConfig) ;
00012 
00013                 std::auto_ptr<KinematicResolutionProvider>  produce(const KinematicResolutionRcd &rcd) ;
00014 
00015         private:
00016                 edm::ParameterSet cfg_;
00017 };
00018 
00019 StringResolutionProviderESProducer::StringResolutionProviderESProducer(const edm::ParameterSet &iConfig) :
00020            cfg_(iConfig) {
00021    std::string myName = iConfig.getParameter<std::string>("@module_label");
00022    setWhatProduced(this,myName);
00023 }
00024 
00025 std::auto_ptr<KinematicResolutionProvider> 
00026 StringResolutionProviderESProducer::produce(const KinematicResolutionRcd &rcd) {
00027         return std::auto_ptr<KinematicResolutionProvider>(new StringResolutionProvider(cfg_));
00028 }
00029 
00030 #include "FWCore/PluginManager/interface/ModuleDef.h"
00031 #include "FWCore/Framework/interface/MakerMacros.h"
00032 #include "FWCore/Framework/interface/ModuleFactory.h"
00033 DEFINE_FWK_EVENTSETUP_MODULE( StringResolutionProviderESProducer );