1 #ifndef GAUDIKERNEL_TOOLHANDLE_H
2 #define GAUDIKERNEL_TOOLHANDLE_H
14 #include <type_traits>
44 return parent ?
"PrivateTool" :
"PublicTool";
48 if (!parent)
return "ToolSvc";
50 return pNamed ? pNamed->
name() :
"";
139 #if defined(TOOLHANDLE_DEPR_WARN)
141 #pragma message("Untracked ToolHandle: Migrate explicit DataHandle constructor to declareTool Algorithm Property")
187 algTool =
i_retrieve(iface) ?
dynamic_cast<T*
>(iface) :
nullptr;
282 inline std::ostream& operator<<( std::ostream& os, const ToolHandle<T>& handle ) {
283 return operator<<(os, static_cast<const GaudiHandleInfo&>(handle) );
288 inline std::ostream& operator<<( std::ostream& os, const ToolHandleArray<T>& handle ) {
289 return operator<<(os, static_cast<const GaudiHandleInfo&>(handle) );
293 #endif // ! GAUDIKERNEL_TOOLHANDLE_H
Handle to be used in lieu of naked pointers to gaudis.
std::string getDefaultType()
Helper function to get default type string from the class type.
void setTypeAndName(std::string myTypeAndName)
The component "type/name" string.
void setComponentType(const std::string &componentType)
The component type.
const std::string & parentName() const
The name of the parent.
void setParentName(const std::string &parent)
The name of the parent.
StatusCode release() const
Release the component.
StatusCode initialize(const std::string &serviceName, const std::string &theParentName)
virtual const std::string & name() const =0
Retrieve the name of the instance.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
StatusCode retrieve() const
Retrieve the component.
StatusCode retrieve() const
Retrieve the Service.
Base class from which all concrete algorithm classes should be derived.
IInterface compliant class extending IInterface with the name() method.
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
std::string typeAndName() const
The full type and name: "type/name".
Base class for all services.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
T * get() const
Return the wrapped pointer, not calling retrieve() if null.
T is the concrete handle type, e.g.