Go to the documentation of this file.00001 #ifndef FWCore_Framework_ModuleFactory_h
00002 #define FWCore_Framework_ModuleFactory_h
00003
00004
00005
00006
00007
00016
00017
00018
00019
00020
00021
00022 #include <string>
00023 #include "boost/shared_ptr.hpp"
00024
00025
00026 #include "FWCore/Framework/interface/ComponentFactory.h"
00027 #include "FWCore/ParameterSet/interface/ParameterSetDescriptionFillerPluginFactory.h"
00028
00029
00030 namespace edm {
00031 namespace eventsetup {
00032 class DataProxyProvider;
00033
00034 struct ModuleMakerTraits {
00035 typedef DataProxyProvider base_type;
00036
00037 static std::string name();
00038 static void addTo(EventSetupProvider& iProvider, boost::shared_ptr<DataProxyProvider> iComponent) ;
00039 };
00040 template< class TType>
00041 struct ModuleMaker : public ComponentMaker<edm::eventsetup::ModuleMakerTraits,TType> {};
00042
00043 typedef ComponentFactory<ModuleMakerTraits> ModuleFactory ;
00044 typedef edmplugin::PluginFactory<edm::eventsetup::ComponentMakerBase<ModuleMakerTraits>* ()> ModulePluginFactory;
00045 }
00046 }
00047
00048 #define DEFINE_FWK_EVENTSETUP_MODULE(type) \
00049 DEFINE_EDM_PLUGIN (edm::eventsetup::ModulePluginFactory,edm::eventsetup::ModuleMaker<type>,#type); \
00050 DEFINE_DESC_FILLER_FOR_ESPRODUCERS(type)
00051
00052 #endif
00053