1 #ifndef FWCore_ServiceRegistry_ServiceMaker_h
2 #define FWCore_ServiceRegistry_ServiceMaker_h
38 namespace serviceregistry {
40 template<
typename T,
typename TConcrete>
46 template<
typename T,
typename TConcrete = T>
51 return std::auto_ptr<T>(
new TConcrete(iPS, iAR));
55 template<
typename T,
typename TConcrete = T>
59 return std::auto_ptr<T>(
new TConcrete(iPS));
63 template<
typename T,
typename TConcrete = T>
67 return std::auto_ptr<T>(
new TConcrete());
71 template<
typename T,
typename TMaker = AllArgsMaker<T> >
79 virtual std::type_info
const&
serviceType()
const {
return typeid(
T); }
85 std::auto_ptr<T> pService(maker.make(iPS, iAR));
113 #define DEFINE_FWK_SERVICE(type) \
114 DEFINE_EDM_PLUGIN (edm::serviceregistry::ServicePluginFactory, edm::serviceregistry::ServiceMaker<type>, #type); \
115 DEFINE_DESC_FILLER_FOR_SERVICES(type, type)
117 #define DEFINE_FWK_SERVICE_MAKER(concrete, maker) \
118 typedef edm::serviceregistry::ServiceMaker<maker::interface_t, maker> concrete ## _ ## _t; \
119 DEFINE_EDM_PLUGIN (edm::serviceregistry::ServicePluginFactory, concrete ## _ ## _t , #concrete); \
120 typedef maker::concrete_t concrete ## _ ## _ ## _t; \
121 DEFINE_DESC_FILLER_FOR_SERVICES(concrete, concrete ## _ ## _ ## _t)
std::auto_ptr< T > make(ParameterSet const &, ActivityRegistry &) const
bool isProcessWideService(TFileService const *)
std::auto_ptr< T > make(ParameterSet const &iPS, ActivityRegistry &) const
virtual bool saveConfiguration() const
bool testSaveConfiguration(SaveConfiguration const *) const
virtual bool processWideService() const
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
virtual std::type_info const & serviceType() const
bool put(boost::shared_ptr< ServiceWrapper< T > > iPtr)
returns false if put fails because a service of this type already exists
virtual bool make(ParameterSet const &iPS, ActivityRegistry &iAR, ServicesManager &oSM) const
std::auto_ptr< T > make(ParameterSet const &iPS, ActivityRegistry &iAR) const
ServiceMaker const & operator=(ServiceMaker const &)