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 )
56 [[deprecated(
"use ISvcLocator::service<T>(type_name, createIf) -> SmartIF<T>" )]]
virtual StatusCode
72 [[deprecated(
"use ISvcLocator::service<T>(type_name, createIf) -> SmartIF<T>" )]]
virtual StatusCode
74 auto svc = service(
typeName,
false );
94 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR )
97 [[deprecated(
"use ISvcLocator::service<T>(type_name, createIf) -> SmartIF<T>" )]]
StatusCode
109 [[deprecated(
"use ISvcLocator::service<T>(type_name, createIf) -> SmartIF<T>" )]]
StatusCode
110 service( std::string_view
type, std::string_view
name, T*& svc,
bool createIf =
true ) {
119 template <
typename T>
125 template <
typename IFace>
136 #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.
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
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.