|
Gaudi Framework, version v23r2 |
| Home | Generated: Thu Jun 28 2012 |
Base class of array's of various gaudihandles. More...
#include <GaudiHandle.h>


Public Types | |
| typedef std::vector < GaudiHandleBase * > | BaseHandleArray |
| typedef std::vector< const GaudiHandleBase * > | ConstBaseHandleArray |
Public Member Functions | |
| bool | setTypesAndNames (const std::vector< std::string > &myTypesAndNamesList) |
| Set the array of handles from list of "type/name" strings in <myTypesAndNamesList>. | |
| const std::vector< std::string > | typesAndNames () const |
| Return a vector with "type/name" strings of all handles in the array. | |
| const std::vector< std::string > | types () const |
| Return a vector with "type" strings of all handles in the array. | |
| const std::vector< std::string > | names () const |
| Return a vector with "type/name" strings of all handles in the array. | |
| 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. | |
| virtual const std::string | pythonPropertyClassName () const |
| Name of the componentType with "HandleArray" appended. | |
| virtual const std::string | pythonRepr () const |
| Python representation of array of handles, i.e. | |
| virtual bool | push_back (const std::string &myHandleTypeAndName)=0 |
| Add a handle to the array with "type/name" given in <myHandleTypeAndName>. | |
| virtual void | clear ()=0 |
| Clear the list of handles. | |
| virtual bool | empty () const =0 |
| Return whether the list of tools is empty. | |
| virtual ConstBaseHandleArray | getBaseArray () const =0 |
| Get a read-only vector of const GaudiHandleBase* pointing to the real handles. | |
| virtual BaseHandleArray | getBaseArray ()=0 |
| Get a read-write vector of GaudiHandleBase* pointing to the real handles. | |
Protected Member Functions | |
| GaudiHandleArrayBase (const std::string &myComponentType, const std::string &myParentName) | |
Base class of array's of various gaudihandles.
Used in communication with GaudiHandleArrayProperty. For that purpose is has some pure virtual functions. This is a non-templated class to one Property can handle all kinds of concrete handles.
Definition at line 293 of file GaudiHandle.h.
Definition at line 299 of file GaudiHandle.h.
| typedef std::vector< const GaudiHandleBase* > GaudiHandleArrayBase::ConstBaseHandleArray |
Definition at line 300 of file GaudiHandle.h.
| GaudiHandleArrayBase::GaudiHandleArrayBase | ( | const std::string & | myComponentType, |
| const std::string & | myParentName | ||
| ) | [inline, protected] |
Definition at line 295 of file GaudiHandle.h.
: GaudiHandleInfo(myComponentType,myParentName) {}
| virtual void GaudiHandleArrayBase::clear | ( | ) | [pure virtual] |
Clear the list of handles.
Implemented in GaudiHandleArray
Implemented in GaudiHandleArray< T >, GaudiHandleArray< ToolHandle< T > >, and GaudiHandleArray< ServiceHandle< T > >.
| virtual bool GaudiHandleArrayBase::empty | ( | ) | const [pure virtual] |
Return whether the list of tools is empty.
Implemented in GaudiHandleArray< T >, GaudiHandleArray< ToolHandle< T > >, and GaudiHandleArray< ServiceHandle< T > >.
| virtual ConstBaseHandleArray GaudiHandleArrayBase::getBaseArray | ( | ) | const [pure virtual] |
Get a read-only vector of const GaudiHandleBase* pointing to the real handles.
Implemented in GaudiHandleArray.
Implemented in GaudiHandleArray< T >, GaudiHandleArray< ToolHandle< T > >, and GaudiHandleArray< ServiceHandle< T > >.
| virtual BaseHandleArray GaudiHandleArrayBase::getBaseArray | ( | ) | [pure virtual] |
Get a read-write vector of GaudiHandleBase* pointing to the real handles.
Implemented in GaudiHandleArray.
Implemented in GaudiHandleArray< T >, GaudiHandleArray< ToolHandle< T > >, and GaudiHandleArray< ServiceHandle< T > >.
| const std::vector< std::string > GaudiHandleArrayBase::getBaseInfos | ( | std::string(GaudiHandleBase::*)() const | pMemFunc ) | const |
Helper function to get a vector of strings filled with the return value of each tool of a member function if GaudiHandleBase.
Definition at line 74 of file GaudiHandle.cpp.
{
std::vector< std::string > theList;
const GaudiHandleArrayBase::ConstBaseHandleArray& baseArray = getBaseArray();
GaudiHandleArrayBase::ConstBaseHandleArray::const_iterator it = baseArray.begin(),
itEnd = baseArray.end();
for ( ; it != itEnd; ++it ) theList.push_back( ((*it)->*pMemFunc)() );
return theList;
}
| const std::vector< std::string > GaudiHandleArrayBase::names | ( | ) | const |
Return a vector with "type/name" strings of all handles in the array.
Definition at line 91 of file GaudiHandle.cpp.
{
return getBaseInfos( &GaudiHandleBase::name );
}
| virtual bool GaudiHandleArrayBase::push_back | ( | const std::string & | myHandleTypeAndName ) | [pure virtual] |
Add a handle to the array with "type/name" given in <myHandleTypeAndName>.
Return whether addition was successful or not. Must be implemented by derived class with concrete handle category.
Implemented in ServiceHandleArray< T >, and ToolHandleArray< T >.
| const std::string GaudiHandleArrayBase::pythonPropertyClassName | ( | ) | const [virtual] |
Name of the componentType with "HandleArray" appended.
Used as the python class name for the property in the genconf-generated configurables. The python class is defined in GaudiPython/python/GaudiHandles.py.
Implements GaudiHandleInfo.
Definition at line 95 of file GaudiHandle.cpp.
{
return componentType() + "HandleArray";
}
| const std::string GaudiHandleArrayBase::pythonRepr | ( | ) | const [virtual] |
Python representation of array of handles, i.e.
list of python handles. Can be used in the genconf-generated configurables. The corresponding python classes are defined in GaudiPython/GaudiHandles.py
Implements GaudiHandleInfo.
Definition at line 99 of file GaudiHandle.cpp.
{
std::string repr = pythonPropertyClassName() + "([";
const std::vector< std::string >& theList = typesAndNames();
std::vector< std::string >::const_iterator it = theList.begin(),
itEnd = theList.end(), itLast = itEnd - 1;
for ( ; it != itEnd; ++it ) {
repr += "'" + *it + "'";
if ( it != itLast ) repr += ",";
}
repr += "])";
return repr;
}
| bool GaudiHandleArrayBase::setTypesAndNames | ( | const std::vector< std::string > & | myTypesAndNamesList ) |
Set the array of handles from list of "type/name" strings in <myTypesAndNamesList>.
Return whether set was successful or not
Definition at line 63 of file GaudiHandle.cpp.
{
clear();
std::vector< std::string >::const_iterator it = myTypesAndNamesList.begin(),
itEnd = myTypesAndNamesList.end();
for ( ; it != itEnd; ++it ) {
if ( !push_back( *it ) ) return false;
}
return true;
}
| const std::vector< std::string > GaudiHandleArrayBase::types | ( | ) | const |
Return a vector with "type" strings of all handles in the array.
Definition at line 87 of file GaudiHandle.cpp.
{
return getBaseInfos( &GaudiHandleBase::type );
}
| const std::vector< std::string > GaudiHandleArrayBase::typesAndNames | ( | ) | const |
Return a vector with "type/name" strings of all handles in the array.
Inverse of setTypesAndNames()
Definition at line 83 of file GaudiHandle.cpp.
{
return getBaseInfos( &GaudiHandleBase::typeAndName );
}