|
| DeclareInterfaceID (IToolSvc, 2, 1) |
| InterfaceID. More...
|
|
virtual StatusCode | retrieve (std::string_view type, const InterfaceID &iid, IAlgTool *&tool, const IInterface *parent=0, bool createIf=true)=0 |
| Retrieve tool with tool dependent part of the name automatically assigned. More...
|
|
virtual StatusCode | retrieve (std::string_view type, std::string_view name, const InterfaceID &iid, IAlgTool *&tool, const IInterface *parent=0, bool createIf=true)=0 |
| Retrieve tool with tool dependent part of the name specified by the requester. More...
|
|
virtual std::vector< std::string > | getInstances (std::string_view toolType)=0 |
| Get the names of all instances of tools of a given type. More...
|
|
virtual std::vector< std::string > | getInstances () const =0 |
| Get the names all tool instances. More...
|
|
virtual std::vector< IAlgTool * > | getTools () const =0 |
| Get pointers to all tool instances. More...
|
|
virtual StatusCode | releaseTool (IAlgTool *tool)=0 |
| Release the tool. More...
|
|
template<class T > |
StatusCode | retrieveTool (std::string_view type, T *&tool, const IInterface *parent=nullptr, bool createIf=true) |
| Retrieve specified tool sub-type with tool dependent part of the name automatically assigned. More...
|
|
template<class T > |
StatusCode | retrieveTool (std::string_view type, std::string_view name, T *&tool, const IInterface *parent=nullptr, bool createIf=true) |
| Retrieve specified tool sub-type with tool dependent part of the name tool dependent part of the name specified by the requester. More...
|
|
virtual void | registerObserver (Observer *obs)=0 |
|
virtual void * | i_cast (const InterfaceID &) const =0 |
| main cast function More...
|
|
virtual std::vector< std::string > | getInterfaceNames () const =0 |
| Returns a vector of strings containing the names of all the implemented interfaces. More...
|
|
virtual unsigned long | addRef ()=0 |
| Increment the reference count of Interface instance. More...
|
|
virtual unsigned long | release ()=0 |
| Release Interface instance. More...
|
|
virtual unsigned long | refCount () const =0 |
| Current reference count. More...
|
|
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp)=0 |
| Set the void** to the pointer to the requested interface of the instance. More...
|
|
virtual | ~IInterface ()=default |
| Virtual destructor. More...
|
|
The interface implemented by the IToolSvc base class.
- Author
- G.Corti
Definition at line 29 of file IToolSvc.h.
template<class T >
StatusCode IToolSvc::retrieveTool |
( |
std::string_view |
type, |
|
|
std::string_view |
name, |
|
|
T *& |
tool, |
|
|
const IInterface * |
parent = nullptr , |
|
|
bool |
createIf = true |
|
) |
| |
|
inline |
Retrieve specified tool sub-type with tool dependent part of the name tool dependent part of the name specified by the requester.
Internally it uses the corresponding IToolSvc::retrieve and does the dynamic casting.
For this example public tool of type 'MyToolType'
will be retrieved from Tool Service (created on demand). The full name of the tool instance is set to be ToolSvc.MyToolName
For this example the private tool of type 'MyToolType'
will be retrieved from Tool Service (created on demand). The full name of the tool instance is set to be <AlgName>.MyToolName
, where <AlgName>
is a name of the algorithm.
If name
is empty (""
) it is assumed to be equal to the type
- Parameters
-
type | AlgTool type name |
name | name to be assigned to tool dependent part of the name |
tool | returned tool |
parent | constant reference to parent (def=none) |
createIf | creation flag (def=create if not existing) |
Definition at line 196 of file IToolSvc.h.
template<class T >
StatusCode IToolSvc::retrieveTool |
( |
std::string_view |
type, |
|
|
T *& |
tool, |
|
|
const IInterface * |
parent = nullptr , |
|
|
bool |
createIf = true |
|
) |
| |
|
inline |
Retrieve specified tool sub-type with tool dependent part of the name automatically assigned.
Internally it uses the corresponding IToolSvc::retrieve and does the dynamic casting.
For this example public tool of type 'MyToolType'
will be retrieved from Tool Service (created on demand). The full name of the tool instance is set to be ToolSvc.MyToolType
For this example the private tool of type 'MyToolType'
will be retrieved from Tool Service (created on demand). The full name of the tool instance is set to be <AlgName>.MyToolType
, where <AlgName>
is a name of the algorithm.
For this example public tool of type 'MyToolType'
will be retrieved from Tool Service (created on demand). The full name of the tool instance is set to be ToolSvc.MyToolName
For this example the private tool of type 'MyToolType'
will be retrieved from Tool Service (created on demand). The full name of the tool instance is set to be <AlgName>.MyToolName
, where <AlgName>
is a name of the algorithm.
- Parameters
-
tool | returned tool |
parent | constant reference to parent (def=none) |
createIf | creation flag (def=create if not existing) |
Definition at line 148 of file IToolSvc.h.