| The Gaudi Framework v30r0 (c919700c)

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

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

Public Member Functions | List of all members
PublicToolHandleArray< T > Class Template Reference

Helper class to construct ToolHandle instances for public tools via the auto registering constructor. More...

`#include <GaudiKernel/ToolHandle.h>`

Inheritance diagram for PublicToolHandleArray< T >:
[legend]
Collaboration diagram for PublicToolHandleArray< T >:
[legend]

## Public Member Functions
| PublicToolHandleArray (bool createIf=true)
| PublicToolHandleArray (const std::vector< std::string > &typesAndNames, bool createIf=true)
template<class OWNER , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
| PublicToolHandleArray (OWNER *owner, std::string name, const std::vector< std::string > &typesAndNames={}, std::string doc="")
| Autodeclaring constructor with property name, tool type/name and documentation. More...
Public Member Functions inherited from ToolHandleArray< T >
| ToolHandleArray (const std::vector< std::string > &myTypesAndNames, const IInterface *parent=nullptr, bool createIf=true)
| Generic constructor. More...
| ToolHandleArray (const IInterface *parent=nullptr, bool createIf=true)
| Constructor which creates and empty list. More...
bool | push_back (const std::string &toolTypeAndName) override
| Add a handle to the array with given tool type and name. More...
bool | push_back (const ToolHandle< T > &myHandle) override
| Ensure that for added handles the parent and creatIf are taken from this array. More...
template<class OWNER , typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
| ToolHandleArray (OWNER *owner, std::string name, const std::vector< std::string > &typesAndNames={}, std::string doc="")
| Autodeclaring constructor with property name, tool type/name and documentation. More...
Public Member Functions inherited from ToolHandleInfo
virtual | ~ToolHandleInfo ()=default
bool | isPublic () const noexcept
bool | createIf () const noexcept
const IInterface * | parent () const noexcept
Public Member Functions inherited from GaudiHandleArray< ToolHandle< T > >
virtual | ~GaudiHandleArray ()=default
GaudiHandleArray & | operator= (const std::vector< std::string > &myTypesAndNamesList)
| Set the array of GaudiHandles from typeAndNames given in vector of strings. More...
GaudiHandleArrayBase::BaseHandleArray | getBaseArray () override
| Get a read-write vector of GaudiHandleBase* pointing to the real handles. More...
GaudiHandleArrayBase::ConstBaseHandleArray | getBaseArray () const override
| Get a read-only vector of const GaudiHandleBase* pointing to the real handles. More...
iterator | begin ()
const_iterator | begin () const
iterator | end ()
const_iterator | end () const
const_iterator | rbegin () const
const_iterator | rend () const
size_type | size () const
void | clear () override
| Clear the list of handles. More...
bool | empty () const override
| Return whether the list of tools is empty. More...
ToolHandle< T > & | operator[] (int index)
const ToolHandle< T > & | operator[] (int index) const
ToolHandle< T > * | operator[] (const std::string &name)
| Get pointer (!) to ToolHandle by instance name. More...
const ToolHandle< T > * | operator[] (const std::string &name) const
| Get const pointer (!) to ToolHandle by instance name. More...
StatusCode | retrieve ()
| Retrieve all tools. More...
StatusCode | release ()
| Release all tools. More...
virtual bool | retrieved () const override
| has Array been retreived? More...
Public Member Functions inherited from GaudiHandleArrayBase
bool | setTypesAndNames (const std::vector< std::string > &myTypesAndNamesList)
| Set the array of handles from list of "type/name" strings in <myTypesAndNamesList>. More...
const std::vector< std::string > | typesAndNames () const
| Return a vector with "type/name" strings of all handles in the array. More...
const std::vector< std::string > | types () const
| Return a vector with "type" strings of all handles in the array. More...
const std::vector< std::string > | names () const
| Return a vector with "type/name" strings of all handles in the array. More...
const std::vector< std::string > | getBaseInfos (std::string(GaudiHandleBase::*pMemFunc)() const ) const
| Helper function to get a vector of strings filled with the return value of each tool of a member function if GaudiHandleBase. More...
std::string | pythonPropertyClassName () const override
| Name of the componentType with "HandleArray" appended. More...
std::string | pythonRepr () const override
| Python representation of array of handles, i.e. More...
Public Member Functions inherited from GaudiHandleInfo
virtual | ~GaudiHandleInfo ()=default
| virtual destructor so that derived class destructor is called. More...
const std::string & | componentType () const
const std::string & | propertyName () const
| name as used in declareProperty(name,gaudiHandle) More...
void | setPropertyName (std::string propName)
| set name as used in declareProperty(name,gaudiHandle). More...
const std::string & | parentName () const
| The name of the parent. More...

## Additional Inherited Members
Public Types inherited from GaudiHandleArray< ToolHandle< T > >
typedef std::vector< ToolHandle< T > > | HandleVector
typedef HandleVector::value_type | value_type
typedef HandleVector::size_type | size_type
typedef HandleVector::reference | reference
typedef HandleVector::const_reference | const_reference
typedef HandleVector::iterator | iterator
typedef HandleVector::const_iterator | const_iterator
typedef HandleVector::reverse_iterator | reverse_iterator
typedef HandleVector::const_reverse_iterator | const_reverse_iterator
Public Types inherited from GaudiHandleArrayBase
typedef std::vector< GaudiHandleBase * > | BaseHandleArray
typedef std::vector< const GaudiHandleBase * > | ConstBaseHandleArray
Static Public Member Functions inherited from ToolHandleInfo
static std::string | toolComponentType (const IInterface *parent)
static std::string | toolParentName (const IInterface *parent)
Protected Member Functions inherited from ToolHandleInfo
| ToolHandleInfo (const IInterface *parent=nullptr, bool createIf=true)
Protected Member Functions inherited from GaudiHandleArray< ToolHandle< T > >
| GaudiHandleArray (const std::vector< std::string > &myTypesAndNamesList, std::string myComponentType, std::string myParentName)
| Generic constructor. More...
| GaudiHandleArray (const std::string &myComponentType, const std::string &myParentName)
| Constructor creating an empty array. More...
Protected Member Functions inherited from GaudiHandleArrayBase
| GaudiHandleArrayBase (std::string myComponentType, std::string myParentName)
Protected Member Functions inherited from GaudiHandleInfo
| GaudiHandleInfo (std::string myComponentType, std::string myParentName)
| Some basic information and helper functions shared between various handles/arrays. More...
void | setComponentType (const std::string &componentType)
| The component type. More...
void | setParentName (const std::string &parent)
| The name of the parent. More...
Protected Attributes inherited from ToolHandleInfo
const IInterface * | m_parent = nullptr
bool | m_createIf {true}

## Detailed Description

### template<class T>
class PublicToolHandleArray< T >

Helper class to construct ToolHandle instances for public tools via the auto registering constructor.

Definition at line 413 of file ToolHandle.h.

## Constructor & Destructor Documentation

template<class T >

PublicToolHandleArray< T >::PublicToolHandleArray | ( | bool | createIf = `true` | ) |
| inline

Definition at line 416 of file ToolHandle.h.

416 : ToolHandleArray<T>( nullptr, createIf ) {}
ToolHandleArray
Array of Handles to be used in lieu of vector of naked pointers to tools.
Definition: PropertyHolder.h:34
ToolHandleInfo::createIf
bool createIf() const noexcept
Definition: ToolHandle.h:39
template<class T >

PublicToolHandleArray< T >::PublicToolHandleArray | ( | const std::vector< std::string > & | typesAndNames,
|  | bool | createIf = `true`
| ) |  |
| inline

Definition at line 417 of file ToolHandle.h.

418 : ToolHandleArray<T>( typesAndNames, nullptr, createIf )
419 {
420 }
ToolHandleArray
Array of Handles to be used in lieu of vector of naked pointers to tools.
Definition: PropertyHolder.h:34
GaudiHandleArrayBase::typesAndNames
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:75
ToolHandleInfo::createIf
bool createIf() const noexcept
Definition: ToolHandle.h:39
template<class T >
template<class OWNER , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>

PublicToolHandleArray< T >::PublicToolHandleArray | ( | OWNER * | owner,
|  | std::string | name,
|  | const std::vector< std::string > & | typesAndNames = `{}`,
|  | std::string | doc = `""`
| ) |  |
| inline

Autodeclaring constructor with property name, tool type/name and documentation.

Note
  the use std::enable_if is required to avoid ambiguities

Definition at line 425 of file ToolHandle.h.

425 {},
426 std::string doc = "" )
427 : PublicToolHandleArray( typesAndNames )
428 {
429 owner->addToolsArray( *this );
430 auto p = owner->OWNER::PropertyHolderImpl::declareProperty( std::move( name ), *this, std::move( doc ) );
431 p->template setOwnerType<OWNER>();
432 }
std::string
STL class.
std::move
T move(T...args)
PublicToolHandleArray::PublicToolHandleArray
PublicToolHandleArray(bool createIf=true)
Definition: ToolHandle.h:416

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

- GaudiKernel/GaudiKernel/ToolHandle.h