1 #ifndef GAUDIKERNEL_ISVCLOCATOR_H 2 #define GAUDIKERNEL_ISVCLOCATOR_H 1 31 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) 37 const bool createIf =
true )
56 auto svc = service( typeName,
false );
76 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) 93 return service( type +
"/" + name, svc, createIf );
101 template <
typename T>
104 return SmartIF<T>{service( typeName, createIf )};
108 template <
typename IFace>
115 #endif // GAUDI_ISVCLOCATOR_H constexpr static const auto FAILURE
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
SmartIF< T > service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)
Returns a smart pointer to the requested interface of a service.
StatusCode service(const std::string &type, const std::string &name, T *&svc, bool createIf=true)
Templated method to access a service by type and name.
TYPE * get() const
Get interface pointer.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Helper class to parse a string of format "type/name".
General service interface definition.
This class is used for returning status codes from appropriate routines.
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition of the basic interface.
virtual StatusCode getService(const Gaudi::Utils::TypeNameString &typeName, IService *&svc, const bool createIf=true)
Get a reference to the service given a service name.
constexpr static const auto SUCCESS
virtual StatusCode getService(const Gaudi::Utils::TypeNameString &typeName, const InterfaceID &iid, IInterface *&pinterface)
Get a specific interface pointer given a service name and interface id.
std::string typeName(const std::type_info &typ)
IInterface *PyHelper() getService(IInterface *app, char *name)
Gaudi::InterfaceId< IInterface, 0, 0 > iid
Interface ID.