CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ModuleFactory.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_ModuleFactory_h
2 #define FWCore_Framework_ModuleFactory_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Class : ModuleFactory
7 //
16 //
17 // Author: Chris Jones
18 // Created: Wed May 25 18:01:31 EDT 2005
19 //
20 
21 // system include files
22 #include <string>
23 #include "boost/shared_ptr.hpp"
24 
25 // user include files
28 
29 // forward declarations
30 namespace edm {
31  class ParameterSet;
32 
33  namespace eventsetup {
34  class DataProxyProvider;
35  class EventSetupsController;
36 
39 
40  static std::string name();
41  static void addTo(EventSetupProvider& iProvider,
42  boost::shared_ptr<DataProxyProvider> iComponent,
43  ParameterSet const&,
44  bool);
45  static void replaceExisting(EventSetupProvider& iProvider, boost::shared_ptr<DataProxyProvider> iComponent);
46  static boost::shared_ptr<base_type> getComponentAndRegisterProcess(EventSetupsController& esController,
47  ParameterSet const& iConfiguration);
48  static void putComponent(EventSetupsController& esController,
49  ParameterSet const& iConfiguration,
50  boost::shared_ptr<base_type> const& component);
51  };
52  template< class TType>
53  struct ModuleMaker : public ComponentMaker<edm::eventsetup::ModuleMakerTraits,TType> {};
54 
57  }
58 }
59 
60 #define DEFINE_FWK_EVENTSETUP_MODULE(type) \
61 DEFINE_EDM_PLUGIN (edm::eventsetup::ModulePluginFactory,edm::eventsetup::ModuleMaker<type>,#type); \
62 DEFINE_DESC_FILLER_FOR_ESPRODUCERS(type)
63 
64 #endif
65 
static void addTo(EventSetupProvider &iProvider, boost::shared_ptr< DataProxyProvider > iComponent, ParameterSet const &, bool)
static boost::shared_ptr< base_type > getComponentAndRegisterProcess(EventSetupsController &esController, ParameterSet const &iConfiguration)
ComponentFactory< ModuleMakerTraits > ModuleFactory
Definition: ModuleFactory.h:55
static void replaceExisting(EventSetupProvider &iProvider, boost::shared_ptr< DataProxyProvider > iComponent)
static void putComponent(EventSetupsController &esController, ParameterSet const &iConfiguration, boost::shared_ptr< base_type > const &component)