GaudiHandleArray< T > Class Template Reference

T is the concrete handle type, e.g. More...

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/996/GAUDI/GAUDI_v26r4/InstallArea/x86_64-slc6-gcc48-opt/include/GaudiKernel/GaudiHandle.h>

Inheritance diagram for GaudiHandleArray< T >:
Collaboration diagram for GaudiHandleArray< T >:

Public Types

typedef std::vector< 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
 
typedef std::vector< 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
 
typedef std::vector< GaudiHandleBase * > BaseHandleArray
 
typedef std::vector< const GaudiHandleBase * > ConstBaseHandleArray
 

Public Member Functions

virtual ~GaudiHandleArray ()=default
 
GaudiHandleArrayoperator= (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 ()
 
iterator end ()
 
const_iterator begin () const
 
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...
 
T & operator[] (int index)
 
const T & operator[] (int index) const
 
T * operator[] (const std::string &name)
 Get pointer (!) to ToolHandle by instance name. More...
 
const T * operator[] (const std::string &name) const
 Get const pointer (!) to ToolHandle by instance name. More...
 
virtual bool push_back (const T &myHandle)
 
StatusCode retrieve ()
 Retrieve all tools. More...
 
StatusCode release ()
 Release all tools. More...
 
virtual ~GaudiHandleArray ()=default
 
GaudiHandleArrayoperator= (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 ()
 
iterator end ()
 
const_iterator begin () const
 
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...
 
T & operator[] (int index)
 
const T & operator[] (int index) const
 
T * operator[] (const std::string &name)
 Get pointer (!) to ToolHandle by instance name. More...
 
const T * operator[] (const std::string &name) const
 Get const pointer (!) to ToolHandle by instance name. More...
 
virtual bool push_back (const T &myHandle)
 
StatusCode retrieve ()
 Retrieve all tools. More...
 
StatusCode release ()
 Release all tools. 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...
 
virtual bool push_back (const std::string &myHandleTypeAndName)=0
 Add a handle to the array with "type/name" given in <myHandleTypeAndName>. More...
 
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...
 
virtual bool push_back (const std::string &myHandleTypeAndName)=0
 Add a handle to the array with "type/name" given in <myHandleTypeAndName>. 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...
 
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...
 

Protected Member Functions

 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...
 
 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)
 
 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...
 
 GaudiHandleInfo (std::string myComponentType, std::string myParentName)
 Some basic information and helper functions shared between various handles/arrays. More...
 

Private Attributes

HandleVector m_handleArray
 

Detailed Description

template<class T>
class GaudiHandleArray< T >

T is the concrete handle type, e.g.

ToolHandle<IMyTool>

Definition at line 364 of file GaudiHandle.h.

Member Typedef Documentation

template<class T>
typedef HandleVector::const_iterator GaudiHandleArray< T >::const_iterator

Definition at line 375 of file GaudiHandle.h.

template<class T>
typedef HandleVector::const_iterator GaudiHandleArray< T >::const_iterator

Definition at line 375 of file GaudiHandle.h.

template<class T>
typedef HandleVector::const_reference GaudiHandleArray< T >::const_reference

Definition at line 373 of file GaudiHandle.h.

template<class T>
typedef HandleVector::const_reference GaudiHandleArray< T >::const_reference

Definition at line 373 of file GaudiHandle.h.

template<class T>
typedef HandleVector::const_reverse_iterator GaudiHandleArray< T >::const_reverse_iterator

Definition at line 377 of file GaudiHandle.h.

template<class T>
typedef HandleVector::const_reverse_iterator GaudiHandleArray< T >::const_reverse_iterator

Definition at line 377 of file GaudiHandle.h.

template<class T>
typedef std::vector< T > GaudiHandleArray< T >::HandleVector

Definition at line 369 of file GaudiHandle.h.

template<class T>
typedef std::vector< T > GaudiHandleArray< T >::HandleVector

Definition at line 369 of file GaudiHandle.h.

template<class T>
typedef HandleVector::iterator GaudiHandleArray< T >::iterator

Definition at line 374 of file GaudiHandle.h.

template<class T>
typedef HandleVector::iterator GaudiHandleArray< T >::iterator

Definition at line 374 of file GaudiHandle.h.

template<class T>
typedef HandleVector::reference GaudiHandleArray< T >::reference

Definition at line 372 of file GaudiHandle.h.

template<class T>
typedef HandleVector::reference GaudiHandleArray< T >::reference

Definition at line 372 of file GaudiHandle.h.

template<class T>
typedef HandleVector::reverse_iterator GaudiHandleArray< T >::reverse_iterator

Definition at line 376 of file GaudiHandle.h.

template<class T>
typedef HandleVector::reverse_iterator GaudiHandleArray< T >::reverse_iterator

Definition at line 376 of file GaudiHandle.h.

template<class T>
typedef HandleVector::size_type GaudiHandleArray< T >::size_type

Definition at line 371 of file GaudiHandle.h.

template<class T>
typedef HandleVector::size_type GaudiHandleArray< T >::size_type

Definition at line 371 of file GaudiHandle.h.

template<class T>
typedef HandleVector::value_type GaudiHandleArray< T >::value_type

Definition at line 370 of file GaudiHandle.h.

template<class T>
typedef HandleVector::value_type GaudiHandleArray< T >::value_type

Definition at line 370 of file GaudiHandle.h.

Constructor & Destructor Documentation

template<class T>
GaudiHandleArray< T >::GaudiHandleArray ( const std::vector< std::string > &  myTypesAndNamesList,
std::string  myComponentType,
std::string  myParentName 
)
inlineprotected

Generic constructor.

Probably not very useful...

Parameters
typesAndNamesList: a vector of strings with the concrete "type/name" strings for the list of tools

Definition at line 387 of file GaudiHandle.h.

389  : GaudiHandleArrayBase(std::move(myComponentType),std::move(myParentName))
390  {
391  setTypesAndNames( myTypesAndNamesList );
392  }
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in .
Definition: GaudiHandle.cpp:63
GaudiHandleArrayBase(std::string myComponentType, std::string myParentName)
Definition: GaudiHandle.h:306
template<class T>
GaudiHandleArray< T >::GaudiHandleArray ( const std::string &  myComponentType,
const std::string &  myParentName 
)
inlineprotected

Constructor creating an empty array.

Parameters
typesAndNamesList: a vector of strings with the concrete "type/name" strings for the list of tools

Definition at line 398 of file GaudiHandle.h.

399  : GaudiHandleArrayBase(myComponentType,myParentName)
400  {}
GaudiHandleArrayBase(std::string myComponentType, std::string myParentName)
Definition: GaudiHandle.h:306
template<class T>
virtual GaudiHandleArray< T >::~GaudiHandleArray ( )
virtualdefault
template<class T>
GaudiHandleArray< T >::GaudiHandleArray ( const std::vector< std::string > &  myTypesAndNamesList,
std::string  myComponentType,
std::string  myParentName 
)
inlineprotected

Generic constructor.

Probably not very useful...

Parameters
typesAndNamesList: a vector of strings with the concrete "type/name" strings for the list of tools

Definition at line 387 of file GaudiHandle.h.

389  : GaudiHandleArrayBase(std::move(myComponentType),std::move(myParentName))
390  {
391  setTypesAndNames( myTypesAndNamesList );
392  }
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in .
Definition: GaudiHandle.cpp:63
GaudiHandleArrayBase(std::string myComponentType, std::string myParentName)
Definition: GaudiHandle.h:306
template<class T>
GaudiHandleArray< T >::GaudiHandleArray ( const std::string &  myComponentType,
const std::string &  myParentName 
)
inlineprotected

Constructor creating an empty array.

Parameters
typesAndNamesList: a vector of strings with the concrete "type/name" strings for the list of tools

Definition at line 398 of file GaudiHandle.h.

399  : GaudiHandleArrayBase(myComponentType,myParentName)
400  {}
GaudiHandleArrayBase(std::string myComponentType, std::string myParentName)
Definition: GaudiHandle.h:306
template<class T>
virtual GaudiHandleArray< T >::~GaudiHandleArray ( )
virtualdefault

Member Function Documentation

template<class T>
iterator GaudiHandleArray< T >::begin ( )
inline

Definition at line 428 of file GaudiHandle.h.

428  {
429  return m_handleArray.begin();
430  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
iterator GaudiHandleArray< T >::begin ( )
inline

Definition at line 428 of file GaudiHandle.h.

428  {
429  return m_handleArray.begin();
430  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const_iterator GaudiHandleArray< T >::begin ( ) const
inline

Definition at line 436 of file GaudiHandle.h.

436  {
437  return m_handleArray.begin();
438  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const_iterator GaudiHandleArray< T >::begin ( ) const
inline

Definition at line 436 of file GaudiHandle.h.

436  {
437  return m_handleArray.begin();
438  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
void GaudiHandleArray< T >::clear ( )
inlineoverridevirtual

Clear the list of handles.

Implemented in GaudiHandleArray

Implements GaudiHandleArrayBase.

Definition at line 456 of file GaudiHandle.h.

456  {
457  m_handleArray.clear();
458  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
void GaudiHandleArray< T >::clear ( )
inlineoverridevirtual

Clear the list of handles.

Implemented in GaudiHandleArray

Implements GaudiHandleArrayBase.

Definition at line 456 of file GaudiHandle.h.

456  {
457  m_handleArray.clear();
458  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
bool GaudiHandleArray< T >::empty ( ) const
inlineoverridevirtual

Return whether the list of tools is empty.

Implements GaudiHandleArrayBase.

Definition at line 460 of file GaudiHandle.h.

460  {
461  return m_handleArray.empty();
462  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
bool GaudiHandleArray< T >::empty ( ) const
inlineoverridevirtual

Return whether the list of tools is empty.

Implements GaudiHandleArrayBase.

Definition at line 460 of file GaudiHandle.h.

460  {
461  return m_handleArray.empty();
462  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
iterator GaudiHandleArray< T >::end ( )
inline

Definition at line 432 of file GaudiHandle.h.

432  {
433  return m_handleArray.end();
434  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
iterator GaudiHandleArray< T >::end ( )
inline

Definition at line 432 of file GaudiHandle.h.

432  {
433  return m_handleArray.end();
434  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const_iterator GaudiHandleArray< T >::end ( ) const
inline

Definition at line 440 of file GaudiHandle.h.

440  {
441  return m_handleArray.end();
442  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const_iterator GaudiHandleArray< T >::end ( ) const
inline

Definition at line 440 of file GaudiHandle.h.

440  {
441  return m_handleArray.end();
442  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
GaudiHandleArrayBase::BaseHandleArray GaudiHandleArray< T >::getBaseArray ( )
inlineoverridevirtual

Get a read-write vector of GaudiHandleBase* pointing to the real handles.

Implemented in GaudiHandleArray.

Implements GaudiHandleArrayBase.

Definition at line 411 of file GaudiHandle.h.

411  {
413  iterator it = begin(), itEnd = end();
414  for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
415  return baseArray;
416  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:374
std::vector< GaudiHandleBase * > BaseHandleArray
Definition: GaudiHandle.h:310
iterator begin()
Definition: GaudiHandle.h:428
iterator end()
Definition: GaudiHandle.h:432
template<class T>
GaudiHandleArrayBase::BaseHandleArray GaudiHandleArray< T >::getBaseArray ( )
inlineoverridevirtual

Get a read-write vector of GaudiHandleBase* pointing to the real handles.

Implemented in GaudiHandleArray.

Implements GaudiHandleArrayBase.

Definition at line 411 of file GaudiHandle.h.

411  {
413  iterator it = begin(), itEnd = end();
414  for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
415  return baseArray;
416  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:374
std::vector< GaudiHandleBase * > BaseHandleArray
Definition: GaudiHandle.h:310
iterator begin()
Definition: GaudiHandle.h:428
iterator end()
Definition: GaudiHandle.h:432
template<class T>
GaudiHandleArrayBase::ConstBaseHandleArray GaudiHandleArray< T >::getBaseArray ( ) const
inlineoverridevirtual

Get a read-only vector of const GaudiHandleBase* pointing to the real handles.

Implemented in GaudiHandleArray.

Implements GaudiHandleArrayBase.

Definition at line 418 of file GaudiHandle.h.

418  {
420  const_iterator it = begin(), itEnd = end();
421  for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
422  return baseArray;
423  }
std::vector< const GaudiHandleBase * > ConstBaseHandleArray
Definition: GaudiHandle.h:311
iterator begin()
Definition: GaudiHandle.h:428
HandleVector::const_iterator const_iterator
Definition: GaudiHandle.h:375
iterator end()
Definition: GaudiHandle.h:432
template<class T>
GaudiHandleArrayBase::ConstBaseHandleArray GaudiHandleArray< T >::getBaseArray ( ) const
inlineoverridevirtual

Get a read-only vector of const GaudiHandleBase* pointing to the real handles.

Implemented in GaudiHandleArray.

Implements GaudiHandleArrayBase.

Definition at line 418 of file GaudiHandle.h.

418  {
420  const_iterator it = begin(), itEnd = end();
421  for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
422  return baseArray;
423  }
std::vector< const GaudiHandleBase * > ConstBaseHandleArray
Definition: GaudiHandle.h:311
iterator begin()
Definition: GaudiHandle.h:428
HandleVector::const_iterator const_iterator
Definition: GaudiHandle.h:375
iterator end()
Definition: GaudiHandle.h:432
template<class T>
GaudiHandleArray& GaudiHandleArray< T >::operator= ( const std::vector< std::string > &  myTypesAndNamesList)
inline

Set the array of GaudiHandles from typeAndNames given in vector of strings.

Definition at line 406 of file GaudiHandle.h.

406  {
407  setTypesAndNames( myTypesAndNamesList );
408  return *this;
409  }
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in .
Definition: GaudiHandle.cpp:63
template<class T>
GaudiHandleArray& GaudiHandleArray< T >::operator= ( const std::vector< std::string > &  myTypesAndNamesList)
inline

Set the array of GaudiHandles from typeAndNames given in vector of strings.

Definition at line 406 of file GaudiHandle.h.

406  {
407  setTypesAndNames( myTypesAndNamesList );
408  return *this;
409  }
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in .
Definition: GaudiHandle.cpp:63
template<class T>
T& GaudiHandleArray< T >::operator[] ( int  index)
inline

Definition at line 464 of file GaudiHandle.h.

464  {
465  return m_handleArray[index];
466  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
T& GaudiHandleArray< T >::operator[] ( int  index)
inline

Definition at line 464 of file GaudiHandle.h.

464  {
465  return m_handleArray[index];
466  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const T& GaudiHandleArray< T >::operator[] ( int  index) const
inline

Definition at line 468 of file GaudiHandle.h.

468  {
469  return m_handleArray[index];
470  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const T& GaudiHandleArray< T >::operator[] ( int  index) const
inline

Definition at line 468 of file GaudiHandle.h.

468  {
469  return m_handleArray[index];
470  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
T* GaudiHandleArray< T >::operator[] ( const std::string &  name)
inline

Get pointer (!) to ToolHandle by instance name.

Returns zero pointer if not found

Definition at line 473 of file GaudiHandle.h.

473  {
474  auto it = std::find_if(begin(),end(),[&](const_reference r) {
475  return r.name() == name;
476  } );
477  return it != end() ? &*it : nullptr;
478  }
HandleVector::const_reference const_reference
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:428
iterator end()
Definition: GaudiHandle.h:432
template<class T>
T* GaudiHandleArray< T >::operator[] ( const std::string &  name)
inline

Get pointer (!) to ToolHandle by instance name.

Returns zero pointer if not found

Definition at line 473 of file GaudiHandle.h.

473  {
474  auto it = std::find_if(begin(),end(),[&](const_reference r) {
475  return r.name() == name;
476  } );
477  return it != end() ? &*it : nullptr;
478  }
HandleVector::const_reference const_reference
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:428
iterator end()
Definition: GaudiHandle.h:432
template<class T>
const T* GaudiHandleArray< T >::operator[] ( const std::string &  name) const
inline

Get const pointer (!) to ToolHandle by instance name.

Returns zero pointer if not found

Definition at line 481 of file GaudiHandle.h.

481  {
482  auto it = std::find_if(begin(),end(),[&](const_reference r) {
483  return r.name() == name;
484  } );
485  return it != end() ? &*it : nullptr;
486  }
HandleVector::const_reference const_reference
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:428
iterator end()
Definition: GaudiHandle.h:432
template<class T>
const T* GaudiHandleArray< T >::operator[] ( const std::string &  name) const
inline

Get const pointer (!) to ToolHandle by instance name.

Returns zero pointer if not found

Definition at line 481 of file GaudiHandle.h.

481  {
482  auto it = std::find_if(begin(),end(),[&](const_reference r) {
483  return r.name() == name;
484  } );
485  return it != end() ? &*it : nullptr;
486  }
HandleVector::const_reference const_reference
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:428
iterator end()
Definition: GaudiHandle.h:432
template<class T>
virtual bool GaudiHandleArray< T >::push_back ( const T &  myHandle)
inlinevirtual

Reimplemented in ToolHandleArray< T >, ToolHandleArray< T >, ServiceHandleArray< T >, and ServiceHandleArray< T >.

Definition at line 491 of file GaudiHandle.h.

491  {
492  m_handleArray.push_back( myHandle );
493  return true;
494  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
virtual bool GaudiHandleArray< T >::push_back ( const T &  myHandle)
inlinevirtual

Reimplemented in ToolHandleArray< T >, ToolHandleArray< T >, ServiceHandleArray< T >, and ServiceHandleArray< T >.

Definition at line 491 of file GaudiHandle.h.

491  {
492  m_handleArray.push_back( myHandle );
493  return true;
494  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const_iterator GaudiHandleArray< T >::rbegin ( ) const
inline

Definition at line 444 of file GaudiHandle.h.

444  {
445  return m_handleArray.rbegin();
446  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const_iterator GaudiHandleArray< T >::rbegin ( ) const
inline

Definition at line 444 of file GaudiHandle.h.

444  {
445  return m_handleArray.rbegin();
446  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
StatusCode GaudiHandleArray< T >::release ( )
inline

Release all tools.

Definition at line 506 of file GaudiHandle.h.

506  {
508  for (auto& i : *this ) {
509  // continue trying to release other tools even if we fail...
510  if ( i.release().isFailure() ) sc = StatusCode::FAILURE;
511  }
512  return sc;
513  }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
list i
Definition: ana.py:128
template<class T>
StatusCode GaudiHandleArray< T >::release ( )
inline

Release all tools.

Definition at line 506 of file GaudiHandle.h.

506  {
508  for (auto& i : *this ) {
509  // continue trying to release other tools even if we fail...
510  if ( i.release().isFailure() ) sc = StatusCode::FAILURE;
511  }
512  return sc;
513  }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
list i
Definition: ana.py:128
template<class T>
const_iterator GaudiHandleArray< T >::rend ( ) const
inline

Definition at line 448 of file GaudiHandle.h.

448  {
449  return m_handleArray.rend();
450  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
const_iterator GaudiHandleArray< T >::rend ( ) const
inline

Definition at line 448 of file GaudiHandle.h.

448  {
449  return m_handleArray.rend();
450  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
StatusCode GaudiHandleArray< T >::retrieve ( )
inline

Retrieve all tools.

Definition at line 497 of file GaudiHandle.h.

497  {
498  for (auto& i : *this) {
499  // stop at first failure
500  if ( i.retrieve().isFailure() ) return StatusCode::FAILURE;
501  }
502  return StatusCode::SUCCESS;
503  }
list i
Definition: ana.py:128
template<class T>
StatusCode GaudiHandleArray< T >::retrieve ( )
inline

Retrieve all tools.

Definition at line 497 of file GaudiHandle.h.

497  {
498  for (auto& i : *this) {
499  // stop at first failure
500  if ( i.retrieve().isFailure() ) return StatusCode::FAILURE;
501  }
502  return StatusCode::SUCCESS;
503  }
list i
Definition: ana.py:128
template<class T>
size_type GaudiHandleArray< T >::size ( ) const
inline

Definition at line 452 of file GaudiHandle.h.

452  {
453  return m_handleArray.size();
454  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519
template<class T>
size_type GaudiHandleArray< T >::size ( ) const
inline

Definition at line 452 of file GaudiHandle.h.

452  {
453  return m_handleArray.size();
454  }
HandleVector m_handleArray
Definition: GaudiHandle.h:519

Member Data Documentation

template<class T>
HandleVector GaudiHandleArray< T >::m_handleArray
private

Definition at line 519 of file GaudiHandle.h.


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