Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:55

0001 #include <FWCore/Framework/interface/ESProducer.h>
0002 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0003 
0004 #include "PhysicsTools/PatAlgos/interface/StringResolutionProvider.h"
0005 #include "PhysicsTools/PatAlgos/interface/KinematicResolutionRcd.h"
0006 
0007 class StringResolutionProviderESProducer : public edm::ESProducer {
0008 public:
0009   StringResolutionProviderESProducer() {}
0010   StringResolutionProviderESProducer(const edm::ParameterSet &iConfig);
0011 
0012   std::unique_ptr<KinematicResolutionProvider> produce(const KinematicResolutionRcd &rcd);
0013 
0014 private:
0015   edm::ParameterSet cfg_;
0016 };
0017 
0018 StringResolutionProviderESProducer::StringResolutionProviderESProducer(const edm::ParameterSet &iConfig)
0019     : cfg_(iConfig) {
0020   std::string myName = iConfig.getParameter<std::string>("@module_label");
0021   setWhatProduced(this, myName);
0022 }
0023 
0024 std::unique_ptr<KinematicResolutionProvider> StringResolutionProviderESProducer::produce(
0025     const KinematicResolutionRcd &rcd) {
0026   return std::make_unique<StringResolutionProvider>(cfg_);
0027 }
0028 
0029 #include "FWCore/PluginManager/interface/ModuleDef.h"
0030 #include "FWCore/Framework/interface/MakerMacros.h"
0031 #include "FWCore/Framework/interface/ModuleFactory.h"
0032 DEFINE_FWK_EVENTSETUP_MODULE(StringResolutionProviderESProducer);