GaudiHandleArray< T > Class Template Reference

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

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/825/GAUDI/GAUDI_v26r3/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 ()
 
GaudiHandleArrayoperator= (const std::vector< std::string > &myTypesAndNamesList)
 Set the array of GaudiHandles from typeAndNames given in vector of strings. More...
 
virtual GaudiHandleArrayBase::BaseHandleArray getBaseArray ()
 Get a read-write vector of GaudiHandleBase* pointing to the real handles. More...
 
virtual GaudiHandleArrayBase::ConstBaseHandleArray getBaseArray () const
 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
 
virtual void clear ()
 Clear the list of handles. More...
 
virtual bool empty () const
 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 ()
 
GaudiHandleArrayoperator= (const std::vector< std::string > &myTypesAndNamesList)
 Set the array of GaudiHandles from typeAndNames given in vector of strings. More...
 
virtual GaudiHandleArrayBase::BaseHandleArray getBaseArray ()
 Get a read-write vector of GaudiHandleBase* pointing to the real handles. More...
 
virtual GaudiHandleArrayBase::ConstBaseHandleArray getBaseArray () const
 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
 
virtual void clear ()
 Clear the list of handles. More...
 
virtual bool empty () const
 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...
 
virtual const std::string pythonPropertyClassName () const
 Name of the componentType with "HandleArray" appended. More...
 
virtual const std::string pythonRepr () const
 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...
 
virtual const std::string pythonPropertyClassName () const
 Name of the componentType with "HandleArray" appended. More...
 
virtual const std::string pythonRepr () const
 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 ()
 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 (const 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 ()
 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 (const 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, const std::string &myComponentType, const 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, const std::string &myComponentType, const 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 (const std::string &myComponentType, const std::string &myParentName)
 
 GaudiHandleArrayBase (const std::string &myComponentType, const std::string &myParentName)
 
- Protected Member Functions inherited from GaudiHandleInfo
 GaudiHandleInfo (const std::string &myComponentType, const std::string &myParentName)
 Some basic information and helper functions shared between various handles/arrays. More...
 
 GaudiHandleInfo (const std::string &myComponentType, const 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 363 of file GaudiHandle.h.

Member Typedef Documentation

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

Definition at line 374 of file GaudiHandle.h.

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

Definition at line 374 of file GaudiHandle.h.

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

Definition at line 372 of file GaudiHandle.h.

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

Definition at line 372 of file GaudiHandle.h.

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

Definition at line 376 of file GaudiHandle.h.

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

Definition at line 376 of file GaudiHandle.h.

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

Definition at line 368 of file GaudiHandle.h.

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

Definition at line 368 of file GaudiHandle.h.

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

Definition at line 373 of file GaudiHandle.h.

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

Definition at line 373 of file GaudiHandle.h.

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

Definition at line 371 of file GaudiHandle.h.

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

Definition at line 371 of file GaudiHandle.h.

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

Definition at line 375 of file GaudiHandle.h.

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

Definition at line 375 of file GaudiHandle.h.

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

Definition at line 370 of file GaudiHandle.h.

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

Definition at line 370 of file GaudiHandle.h.

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

Definition at line 369 of file GaudiHandle.h.

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

Definition at line 369 of file GaudiHandle.h.

Constructor & Destructor Documentation

template<class T>
GaudiHandleArray< T >::GaudiHandleArray ( const std::vector< std::string > &  myTypesAndNamesList,
const std::string &  myComponentType,
const 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 386 of file GaudiHandle.h.

388  : GaudiHandleArrayBase(myComponentType,myParentName)
389  {
390  setTypesAndNames( myTypesAndNamesList );
391  }
GaudiHandleArrayBase(const std::string &myComponentType, const std::string &myParentName)
Definition: GaudiHandle.h:305
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< 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 397 of file GaudiHandle.h.

398  : GaudiHandleArrayBase(myComponentType,myParentName)
399  {}
GaudiHandleArrayBase(const std::string &myComponentType, const std::string &myParentName)
Definition: GaudiHandle.h:305
template<class T>
virtual GaudiHandleArray< T >::~GaudiHandleArray ( )
inlinevirtual

Definition at line 402 of file GaudiHandle.h.

402 {};
template<class T>
GaudiHandleArray< T >::GaudiHandleArray ( const std::vector< std::string > &  myTypesAndNamesList,
const std::string &  myComponentType,
const 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 386 of file GaudiHandle.h.

388  : GaudiHandleArrayBase(myComponentType,myParentName)
389  {
390  setTypesAndNames( myTypesAndNamesList );
391  }
GaudiHandleArrayBase(const std::string &myComponentType, const std::string &myParentName)
Definition: GaudiHandle.h:305
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< 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 397 of file GaudiHandle.h.

398  : GaudiHandleArrayBase(myComponentType,myParentName)
399  {}
GaudiHandleArrayBase(const std::string &myComponentType, const std::string &myParentName)
Definition: GaudiHandle.h:305
template<class T>
virtual GaudiHandleArray< T >::~GaudiHandleArray ( )
inlinevirtual

Definition at line 402 of file GaudiHandle.h.

402 {};

Member Function Documentation

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

Definition at line 427 of file GaudiHandle.h.

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

Definition at line 427 of file GaudiHandle.h.

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

Definition at line 435 of file GaudiHandle.h.

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

Definition at line 435 of file GaudiHandle.h.

435  {
436  return m_handleArray.begin();
437  }
HandleVector m_handleArray
Definition: GaudiHandle.h:528
template<class T>
virtual void GaudiHandleArray< T >::clear ( )
inlinevirtual

Clear the list of handles.

Implemented in GaudiHandleArray

Implements GaudiHandleArrayBase.

Definition at line 455 of file GaudiHandle.h.

455  {
456  m_handleArray.clear();
457  }
HandleVector m_handleArray
Definition: GaudiHandle.h:528
template<class T>
virtual void GaudiHandleArray< T >::clear ( )
inlinevirtual

Clear the list of handles.

Implemented in GaudiHandleArray

Implements GaudiHandleArrayBase.

Definition at line 455 of file GaudiHandle.h.

455  {
456  m_handleArray.clear();
457  }
HandleVector m_handleArray
Definition: GaudiHandle.h:528
template<class T>
virtual bool GaudiHandleArray< T >::empty ( ) const
inlinevirtual

Return whether the list of tools is empty.

Implements GaudiHandleArrayBase.

Definition at line 459 of file GaudiHandle.h.

459  {
460  return m_handleArray.empty();
461  }
HandleVector m_handleArray
Definition: GaudiHandle.h:528
template<class T>
virtual bool GaudiHandleArray< T >::empty ( ) const
inlinevirtual

Return whether the list of tools is empty.

Implements GaudiHandleArrayBase.

Definition at line 459 of file GaudiHandle.h.

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

Definition at line 431 of file GaudiHandle.h.

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

Definition at line 431 of file GaudiHandle.h.

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

Definition at line 439 of file GaudiHandle.h.

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

Definition at line 439 of file GaudiHandle.h.

439  {
440  return m_handleArray.end();
441  }
HandleVector m_handleArray
Definition: GaudiHandle.h:528
template<class T>
virtual GaudiHandleArrayBase::BaseHandleArray GaudiHandleArray< T >::getBaseArray ( )
inlinevirtual

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

Implemented in GaudiHandleArray.

Implements GaudiHandleArrayBase.

Definition at line 410 of file GaudiHandle.h.

410  {
412  iterator it = begin(), itEnd = end();
413  for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
414  return baseArray;
415  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:373
std::vector< GaudiHandleBase * > BaseHandleArray
Definition: GaudiHandle.h:309
iterator begin()
Definition: GaudiHandle.h:427
iterator end()
Definition: GaudiHandle.h:431
template<class T>
virtual GaudiHandleArrayBase::BaseHandleArray GaudiHandleArray< T >::getBaseArray ( )
inlinevirtual

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

Implemented in GaudiHandleArray.

Implements GaudiHandleArrayBase.

Definition at line 410 of file GaudiHandle.h.

410  {
412  iterator it = begin(), itEnd = end();
413  for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
414  return baseArray;
415  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:373
std::vector< GaudiHandleBase * > BaseHandleArray
Definition: GaudiHandle.h:309
iterator begin()
Definition: GaudiHandle.h:427
iterator end()
Definition: GaudiHandle.h:431
template<class T>
virtual GaudiHandleArrayBase::ConstBaseHandleArray GaudiHandleArray< T >::getBaseArray ( ) const
inlinevirtual

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

Implemented in GaudiHandleArray.

Implements GaudiHandleArrayBase.

Definition at line 417 of file GaudiHandle.h.

417  {
419  const_iterator it = begin(), itEnd = end();
420  for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
421  return baseArray;
422  }
std::vector< const GaudiHandleBase * > ConstBaseHandleArray
Definition: GaudiHandle.h:310
iterator begin()
Definition: GaudiHandle.h:427
HandleVector::const_iterator const_iterator
Definition: GaudiHandle.h:374
iterator end()
Definition: GaudiHandle.h:431
template<class T>
virtual GaudiHandleArrayBase::ConstBaseHandleArray GaudiHandleArray< T >::getBaseArray ( ) const
inlinevirtual

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

Implemented in GaudiHandleArray.

Implements GaudiHandleArrayBase.

Definition at line 417 of file GaudiHandle.h.

417  {
419  const_iterator it = begin(), itEnd = end();
420  for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
421  return baseArray;
422  }
std::vector< const GaudiHandleBase * > ConstBaseHandleArray
Definition: GaudiHandle.h:310
iterator begin()
Definition: GaudiHandle.h:427
HandleVector::const_iterator const_iterator
Definition: GaudiHandle.h:374
iterator end()
Definition: GaudiHandle.h:431
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 405 of file GaudiHandle.h.

405  {
406  setTypesAndNames( myTypesAndNamesList );
407  return *this;
408  }
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 405 of file GaudiHandle.h.

405  {
406  setTypesAndNames( myTypesAndNamesList );
407  return *this;
408  }
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 463 of file GaudiHandle.h.

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

Definition at line 463 of file GaudiHandle.h.

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

Definition at line 467 of file GaudiHandle.h.

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

Definition at line 467 of file GaudiHandle.h.

467  {
468  return m_handleArray[index];
469  }
HandleVector m_handleArray
Definition: GaudiHandle.h:528
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 472 of file GaudiHandle.h.

472  {
473  iterator it = begin(), itEnd = end();
474  for ( ; it != itEnd; ++it ) {
475  if ( it->name() == name ) return &*it;
476  }
477  // not found
478  return 0;
479  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:427
iterator end()
Definition: GaudiHandle.h:431
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 472 of file GaudiHandle.h.

472  {
473  iterator it = begin(), itEnd = end();
474  for ( ; it != itEnd; ++it ) {
475  if ( it->name() == name ) return &*it;
476  }
477  // not found
478  return 0;
479  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:427
iterator end()
Definition: GaudiHandle.h:431
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 482 of file GaudiHandle.h.

482  {
483  const_iterator it = begin(), itEnd = end();
484  for ( ; it != itEnd; ++it ) {
485  if ( it->name() == name ) return &*it;
486  }
487  // not found
488  return 0;
489  }
iterator begin()
Definition: GaudiHandle.h:427
HandleVector::const_iterator const_iterator
Definition: GaudiHandle.h:374
iterator end()
Definition: GaudiHandle.h:431
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 482 of file GaudiHandle.h.

482  {
483  const_iterator it = begin(), itEnd = end();
484  for ( ; it != itEnd; ++it ) {
485  if ( it->name() == name ) return &*it;
486  }
487  // not found
488  return 0;
489  }
iterator begin()
Definition: GaudiHandle.h:427
HandleVector::const_iterator const_iterator
Definition: GaudiHandle.h:374
iterator end()
Definition: GaudiHandle.h:431
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 494 of file GaudiHandle.h.

494  {
495  m_handleArray.push_back( myHandle );
496  return true;
497  }
HandleVector m_handleArray
Definition: GaudiHandle.h:528
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 494 of file GaudiHandle.h.

494  {
495  m_handleArray.push_back( myHandle );
496  return true;
497  }
HandleVector m_handleArray
Definition: GaudiHandle.h:528
template<class T>
const_iterator GaudiHandleArray< T >::rbegin ( ) const
inline

Definition at line 443 of file GaudiHandle.h.

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

Definition at line 443 of file GaudiHandle.h.

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

Release all tools.

Definition at line 512 of file GaudiHandle.h.

512  {
514  iterator it = begin(), itEnd = end();
515  for ( ; it != itEnd; ++it ) {
516  if ( it->release().isFailure() ) {
517  // continue trying to release other tools
518  sc = StatusCode::FAILURE;
519  }
520  }
521  return sc;
522  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:427
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
iterator end()
Definition: GaudiHandle.h:431
template<class T>
StatusCode GaudiHandleArray< T >::release ( )
inline

Release all tools.

Definition at line 512 of file GaudiHandle.h.

512  {
514  iterator it = begin(), itEnd = end();
515  for ( ; it != itEnd; ++it ) {
516  if ( it->release().isFailure() ) {
517  // continue trying to release other tools
518  sc = StatusCode::FAILURE;
519  }
520  }
521  return sc;
522  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:427
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
iterator end()
Definition: GaudiHandle.h:431
template<class T>
const_iterator GaudiHandleArray< T >::rend ( ) const
inline

Definition at line 447 of file GaudiHandle.h.

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

Definition at line 447 of file GaudiHandle.h.

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

Retrieve all tools.

Definition at line 500 of file GaudiHandle.h.

500  {
501  iterator it = begin(), itEnd = end();
502  for ( ; it != itEnd; ++it ) {
503  if ( it->retrieve().isFailure() ) {
504  // stop at first failure
505  return StatusCode::FAILURE;
506  }
507  }
508  return StatusCode::SUCCESS;
509  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:427
iterator end()
Definition: GaudiHandle.h:431
template<class T>
StatusCode GaudiHandleArray< T >::retrieve ( )
inline

Retrieve all tools.

Definition at line 500 of file GaudiHandle.h.

500  {
501  iterator it = begin(), itEnd = end();
502  for ( ; it != itEnd; ++it ) {
503  if ( it->retrieve().isFailure() ) {
504  // stop at first failure
505  return StatusCode::FAILURE;
506  }
507  }
508  return StatusCode::SUCCESS;
509  }
HandleVector::iterator iterator
Definition: GaudiHandle.h:373
iterator begin()
Definition: GaudiHandle.h:427
iterator end()
Definition: GaudiHandle.h:431
template<class T>
size_type GaudiHandleArray< T >::size ( ) const
inline

Definition at line 451 of file GaudiHandle.h.

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

Definition at line 451 of file GaudiHandle.h.

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

Member Data Documentation

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

Definition at line 528 of file GaudiHandle.h.


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