| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BaseToolHandle Class Referenceabstract

Non-templated base class for actual ToolHandle<T>. More...

`#include <GaudiKernel/ToolHandle.h>`

Inheritance diagram for BaseToolHandle:
[legend]
Collaboration diagram for BaseToolHandle:
[legend]

## Public Member Functions
StatusCode | retrieve (IAlgTool *&tool) const
virtual StatusCode | retrieve () const =0
const IAlgTool * | get () const
IAlgTool * | get ()
virtual std::string | typeAndName () const =0
bool | isEnabled () const
| Helper to check if the ToolHandle should be retrieved. More...
void | enable ()
void | disable ()
bool | setEnabled (const bool flag)
Public Member Functions inherited from ToolHandleInfo
virtual | ~ToolHandleInfo ()=default
bool | isPublic () const noexcept
bool | createIf () const noexcept
const IInterface * | parent () const noexcept

## Protected Member Functions
| BaseToolHandle (const IInterface *parent=nullptr, bool createIf=true)
virtual StatusCode | i_retrieve (IAlgTool *&) const =0
virtual const IAlgTool * | getAsIAlgTool () const =0
virtual IAlgTool * | getAsIAlgTool ()=0
Protected Member Functions inherited from ToolHandleInfo
| ToolHandleInfo (const IInterface *parent=nullptr, bool createIf=true)

## Protected Attributes
bool | m_enabled = true
Protected Attributes inherited from ToolHandleInfo
const IInterface * | m_parent = nullptr
bool | m_createIf {true}

## Additional Inherited Members
Static Public Member Functions inherited from ToolHandleInfo
static std::string | toolComponentType (const IInterface *parent)
static std::string | toolParentName (const IInterface *parent)

## Detailed Description

Non-templated base class for actual ToolHandle<T>.

Defines the interface for the management of ToolHandles in the Algorithms and Tools

Author
  Daniel Funke danie.nosp@m.l.fu.nosp@m.nke@c.nosp@m.ern..nosp@m.ch

Definition at line 67 of file ToolHandle.h.

## Constructor & Destructor Documentation

BaseToolHandle::BaseToolHandle | ( | const IInterface * | parent = `nullptr`,
|  | bool | createIf = `true`
| ) |  |
| inline protected

Definition at line 71 of file ToolHandle.h.

71 : ToolHandleInfo( parent, createIf ) {}
ToolHandleInfo::ToolHandleInfo
ToolHandleInfo(const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:29
ToolHandleInfo::createIf
bool createIf() const noexcept
Definition: ToolHandle.h:39

## Member Function Documentation

void BaseToolHandle::disable | ( |  | ) |
| inline

Definition at line 96 of file ToolHandle.h.

96 { m_enabled = false; }
BaseToolHandle::m_enabled
bool m_enabled
Definition: ToolHandle.h:110

void BaseToolHandle::enable | ( |  | ) |
| inline

Definition at line 94 of file ToolHandle.h.

94 { m_enabled = true; }
BaseToolHandle::m_enabled
bool m_enabled
Definition: ToolHandle.h:110

const IAlgTool* BaseToolHandle::get | ( |  | ) | const
| inline

Definition at line 80 of file ToolHandle.h.

80 { return getAsIAlgTool(); }
BaseToolHandle::getAsIAlgTool
virtual const IAlgTool * getAsIAlgTool() const =0

IAlgTool* BaseToolHandle::get | ( |  | ) |
| inline

Definition at line 82 of file ToolHandle.h.

82 { return getAsIAlgTool(); }
BaseToolHandle::getAsIAlgTool
virtual const IAlgTool * getAsIAlgTool() const =0

virtual const IAlgTool* BaseToolHandle::getAsIAlgTool | ( |  | ) | const
| protected pure virtual

Implemented in ToolHandle< T >, and ToolHandle< IThreadInitTool >.

virtual IAlgTool* BaseToolHandle::getAsIAlgTool | ( |  | ) |
| protected pure virtual

Implemented in ToolHandle< T >, and ToolHandle< IThreadInitTool >.

virtual StatusCode BaseToolHandle::i_retrieve | ( | IAlgTool *& |  | ) | const
| protected pure virtual

Implemented in ToolHandle< T >, and ToolHandle< IThreadInitTool >.

bool BaseToolHandle::isEnabled | ( |  | ) | const
| inline

Helper to check if the ToolHandle should be retrieved.

Definition at line 87 of file ToolHandle.h.

88 {
89 // the handle is considered enabled if the type/name is valid and the
90 // enabled flag was set to true, or it was already retrieved
91 return ( m_enabled && !typeAndName().empty() ) || get();
92 }
BaseToolHandle::typeAndName
virtual std::string typeAndName() const =0
BaseToolHandle::m_enabled
bool m_enabled
Definition: ToolHandle.h:110

StatusCode BaseToolHandle::retrieve | ( | IAlgTool *& | tool | ) | const
| inline

Definition at line 76 of file ToolHandle.h.

76 { return i_retrieve( tool ); }
BaseToolHandle::i_retrieve
virtual StatusCode i_retrieve(IAlgTool *&) const =0

virtual StatusCode BaseToolHandle::retrieve | ( |  | ) | const
| pure virtual

Implemented in ToolHandle< T >, and ToolHandle< IThreadInitTool >.

bool BaseToolHandle::setEnabled | ( | const bool | flag | ) |
| inline

Definition at line 98 of file ToolHandle.h.

99 {
100 auto old = m_enabled;
101 m_enabled = flag;
102 return old;
103 }
BaseToolHandle::m_enabled
bool m_enabled
Definition: ToolHandle.h:110

virtual std::string BaseToolHandle::typeAndName | ( |  | ) | const
| pure virtual

Implemented in ToolHandle< T >, and ToolHandle< IThreadInitTool >.

## Member Data Documentation

bool BaseToolHandle::m_enabled = true
| protected

Definition at line 110 of file ToolHandle.h.

The documentation for this class was generated from the following file:

- GaudiKernel/GaudiKernel/ToolHandle.h