Go to the documentation of this file.
11 #ifndef GAUDIKERNEL_ISVCLOCATOR_H
12 #define GAUDIKERNEL_ISVCLOCATOR_H 1
30 namespace Interfaces {
34 #define GAUDI_HAS_IOPTIONS_SVC
51 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR )
57 const bool createIf =
true ) {
74 auto svc = service(
typeName,
false );
94 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR )
117 template <
typename T>
123 template <
typename IFace>
134 #endif // GAUDI_ISVCLOCATOR_H
Class to handle automatically the versioning of the interfaces when they are inheriting from other in...
virtual const std::list< IService * > & getServices() const =0
Get a reference to a service and create it if it does not exists.
DeclareInterfaceID(ISvcLocator, 3, 0)
InterfaceID.
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.
IInterface *PyHelper() getService(IInterface *app, char *name)
virtual StatusCode getService(const Gaudi::Utils::TypeNameString &typeName, IService *&svc, const bool createIf=true)
Get a reference to the service given a service name.
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
Helper class to parse a string of format "type/name".
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Header file for std:chrono::duration-based Counters.
constexpr static const auto SUCCESS
std::string typeName(const std::type_info &typ)
Central entity in a Gaudi application that manages monitoring objects (i.e.
constexpr static const auto FAILURE
Interface for a component that manages application configuration options.
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(std::string_view type, std::string_view name, T *&svc, bool createIf=true)
Templated method to access a service by type and name.
virtual bool existsService(std::string_view name) const =0
Check the existence of a service given a service name.