| The Gaudi Framework v32r1 (f65d50dc)

Classes | Public Types | Private Types | Friends | List of all members
KeyedContainer< DATATYPE, MAPPING > Class Template Reference

template class KeyedContainer, KeyedContainer.h More...

`#include <GaudiKernel/KeyedContainer.h>`

Inheritance diagram for KeyedContainer< DATATYPE, MAPPING >:
[legend]
Collaboration diagram for KeyedContainer< DATATYPE, MAPPING >:
[legend]

## Classes
struct | _InsertRelease
| Internal functor for insertion of objects. More...
struct | _RemoveRelease
| Internal functor for insertion of objects. More...

## Public Types
typedef DATATYPE | contained_type
| Definition of the contained object type. More...
typedef MAPPING | container_type
| Definition of the implementing container type. More...
typedef std::vector< contained_type * > | seq_type
| General container specific type definitions. More...
typedef contained_type::key_type | key_type
| Definition of the key type: re-use definition of contained type. More...
typedef seq_type::value_type | value_type
| Sequential access: definition of type stored in sequential container. More...
typedef seq_type::reference | reference
| Sequential access: reference type used in sequential container. More...
typedef seq_type::const_reference | const_reference
| Sequential access: const reference type used in sequential container. More...
typedef seq_type::iterator | iterator
| Sequential access: iterator type used in sequential container. More...
typedef seq_type::const_iterator | const_iterator
| Sequential access: const iterator type used in sequential container. More...
typedef seq_type::reverse_iterator | reverse_iterator
| Sequential access: reverse iterator type used in sequential container. More...
typedef seq_type::const_reverse_iterator | const_reverse_iterator
| Sequential access: const reverse iterator type used in sequential container. More...
Public Types inherited from ObjectContainerBase
typedef size_t | size_type
| size_type, to conform the STL container interface More...

## Public Member Functions
Constructors/Destructors
| KeyedContainer (void)
| Standard Constructor. More...
| KeyedContainer (KeyedContainer &&other)
| KeyedContainer (const KeyedContainer &)=delete
| ~KeyedContainer () override
| Destructor. More...
NOT FOR GENERAL USE ObjectContainerBase function overloads.
The implementation of these methods ensure the behaviour of the class as a type of class ObjectContainerBase. This base class and its behaviour are only used by "generic" object handlers. These classes collaborate with several classes such as the SmartRef classes. Generic converters. Interfaces for interactivity (e.g. Python) For this reason, the entry points in this section are reserved for "generic" object handling and should NOT be used in public.
size_type | numberOfObjects () const override
| ObjectContainerBase overload: Number of objects in the container. More...
long | add (ContainedObject *pObject) override
| ObjectContainerBase overload: Add an object to the container. More...
long | remove (ContainedObject *pObject) override
| ObjectContainerBase overload: Remove an object from the container. More...
ContainedObject * | containedObject (long key_value) override
| ObjectContainerBase overload: Retrieve the object by reference given the long integer representation of the object's key. More...
ContainedObject const * | containedObject (long key_value) const override
| Pointer to an object of a given distance. More...
long | index (const ContainedObject *p) const override
| ObjectContainerBase overload: Retrieve the full long integer representation of the object's key from the object base class pointer. More...
virtual size_type | containedObjects (std::vector< ContainedObject * > &v) const
| Retrieve the full content of the object container. More...
Container related implementation.
These methods allow to manipulate the container as a whole and to retrieve information about the internal behaviour of the container.
size_type | size () const
| Number of objects in the container. More...
bool | empty () const
| For consistency with STL: check if container is empty. More...
void | reserve (size_type value)
| Reserve place for "value" objects in the container. More...
void | clear ()
| Clear the entire content and erase the objects from the container. More...
virtual const std::vector< const ContainedObject * > * | containedObjects () const
| Retrieve the full content of the object container by reference. More...
StatusCode | update () override
| Reconfigure direct access to elements (Needed by POOL data loading) This function reuses the "update" callback of the generic DataObject base class. More...
Sequential array access to objects using iterators.
Sequential object access using iterators is much faster then object access by key. In case all objects of the container should be addressed, use iterators rather than direct object access. If the container is accessed through the iterators defined below, the elements may be sorted according to the user needs. The container can be accesses in both const and non-const mode. Iterations are supported in both directions: From the beginning to the end and the reverse.
iterator | begin ()
| Retrieve start iterator. More...
const_iterator | begin () const
| Retrieve start const iterator. More...
iterator | end ()
| Retrieve terminating iterator. More...
const_iterator | end () const
| Retrieve terminating const iterator. More...
reverse_iterator | rbegin ()
| reverse_iterator returns the beginning of the reversed container More...
const_reverse_iterator | rbegin () const
| const reverse_iterator returns the beginning of the reversed container More...
reverse_iterator | rend ()
| reverse_iterator pointing to the end of the reversed container More...
const_reverse_iterator | rend () const
| const reverse_iterator pointing to the end of the reversed container More...
Random access to objects in the container.
Access to objects is given by Key. Please note, that random object access is nearly in all cases significantly slower than sequential access. If all objects in the contaienr should be addresses sequentially, use iterators rather than direct access. Direct access should only be used for selective retrieval of objects.
value_type | object (const key_type &kval) const
| Object access by key. More...
value_type | operator() (const key_type &kval) const
| STL algorithms support for object access. More...
Insert/Remove objects from the container.
Objects generally are identified by key. Since keys are stored with the objects, insertions and removals are possible by key or by reference.
long | erase (const key_type &kval)
| Remove/erase object (identified by key) from the container. More...
long | erase (const value_type val)
| Remove/erase object (identified by pointer value) from the container. More...
long | erase (iterator pos)
| Remove/erase object (identified by iterator) from the container. More...
void | erase (iterator pos_start, iterator pos_stop, bool use_temp=false)
| Remove/erase objects by iterator range. More...
const key_type & | insert (const value_type val, const key_type &kval)
| Insert entry to the container with a valid key. More...
const key_type & | insert (const value_type val)
| Insert entry to the container with automatic key assignment. More...
Public Member Functions inherited from DataObject
| DataObject ()
| Standard Constructor. More...
| DataObject (const DataObject &rhs)
| Copy Constructor. More...
DataObject & | operator= (const DataObject &rhs)
| Assignment Operator. More...
| DataObject (DataObject &&rhs)
| Move Constructor. More...
DataObject & | operator= (DataObject &&rhs)
| Move Assignment Operator. More...
virtual | ~DataObject ()
| Standard Destructor. More...
virtual unsigned long | addRef ()
| Add reference to object. More...
virtual unsigned long | release ()
| release reference to object More...
const std::string & | name () const
| Retreive DataObject name. It is the name when registered in the store. More...
void | setRegistry (IRegistry *pRegistry)
| Set pointer to Registry. More...
IRegistry * | registry () const
| Get pointer to Registry. More...
LinkManager * | linkMgr () const
| Retrieve Link manager. More...
unsigned char | version () const
| Retrieve version number of this object representation. More...
void | setVersion (unsigned char vsn)
| Set version number of this object representation. More...
unsigned long | refCount () const
| Return the refcount. More...
virtual std::ostream & | fillStream (std::ostream &s) const
| Fill the output stream (ASCII) More...

## Private Types
typedef Containers::traits< container_type, contained_type > | traits
| Traits class definition. More...

## Friends
struct | GaudiDict::KeyedContainerDict< DATATYPE >

## Implementation helpers.
container_type | m_cont
| Map container to facilitate object access by key. More...
seq_type | m_sequential
| Array to allow sequential access to the object (can be ordered). More...
seq_type * | m_random
| Array to allow random access to objects (not exposed) More...
FORCE_INLINE value_type | i_object (const key_type &k) const
| Internal function to access objects within the container. More...
long | i_erase (const_reference v, const key_type &k)
| Internal function to erase an object from the container. More...

## DataObject virtual function overloads.
The implementation of these methods is required by the DataObject base class and determines the persistent run-time-type information.
const CLID & | clID () const override
| Retrieve class ID. More...
static const CLID & | classID ()
| Retrieve class ID. More...

## Additional Inherited Members
Static Public Member Functions inherited from DataObject
static const CLID & | classID ()
| Retrieve reference to class definition structure (static access) More...
Protected Member Functions inherited from ObjectContainerBase
| ObjectContainerBase ()=default
| Constructor. More...
| ObjectContainerBase (ObjectContainerBase &&)=default
ObjectContainerBase & | operator= (ObjectContainerBase &&)=default

## Detailed Description

### template<class DATATYPE, class MAPPING = Containers::HashMap>
class KeyedContainer< DATATYPE, MAPPING >

template class KeyedContainer, KeyedContainer.h

This class represents a container, where the contained objects are accessed by a key. Such a key can be any class, which is able to convert to and from a 32-bit (long) integer.

To insert objects into the container, this implementation determines the key in the following way:

- If the object is already keyed, the object's key is kept and cannot be modified.
- If the object is NOT keyed, and a key is supplied, this key is used to register the object in the map and the same key is given to the object.
- If the object is NOT keyed, and NO key is supplied, a key is generated by the map implementation and this key is given to the object.
- It is not possible to insert two objects with the same key into the same container. This causes an exception.

Access to objects is given two-fold:

- Using iterators. This access is very efficient. The container however, may not be manipulated: No objects may not be inserted or removed using iterators.
- Using object keys: This access patterns provides random access to objects.

The KeyedContainer class uses for further specialization a traits class. By specializing these traits extra behaviour can be forced on request for special containers or special keys.

Author
  M.Frank CERN/LHCb

Version
  1.0

Definition at line 64 of file KeyedContainer.h.

## Member Typedef Documentation

## ◆ const_iterator

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef seq_type::const_iterator KeyedContainer< DATATYPE, MAPPING >::const_iterator

Sequential access: const iterator type used in sequential container.

Definition at line 92 of file KeyedContainer.h.

## ◆ const_reference

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef seq_type::const_reference KeyedContainer< DATATYPE, MAPPING >::const_reference

Sequential access: const reference type used in sequential container.

Definition at line 88 of file KeyedContainer.h.

## ◆ const_reverse_iterator

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef seq_type::const_reverse_iterator KeyedContainer< DATATYPE, MAPPING >::const_reverse_iterator

Sequential access: const reverse iterator type used in sequential container.

Definition at line 98 of file KeyedContainer.h.

## ◆ contained_type

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef DATATYPE KeyedContainer< DATATYPE, MAPPING >::contained_type

Definition of the contained object type.

Definition at line 69 of file KeyedContainer.h.

## ◆ container_type

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef MAPPING KeyedContainer< DATATYPE, MAPPING >::container_type

Definition of the implementing container type.

Definition at line 71 of file KeyedContainer.h.

## ◆ iterator

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef seq_type::iterator KeyedContainer< DATATYPE, MAPPING >::iterator

Sequential access: iterator type used in sequential container.

Definition at line 90 of file KeyedContainer.h.

## ◆ key_type

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef contained_type::key_type KeyedContainer< DATATYPE, MAPPING >::key_type

Definition of the key type: re-use definition of contained type.

Definition at line 82 of file KeyedContainer.h.

## ◆ reference

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef seq_type::reference KeyedContainer< DATATYPE, MAPPING >::reference

Sequential access: reference type used in sequential container.

Definition at line 86 of file KeyedContainer.h.

## ◆ reverse_iterator

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef seq_type::reverse_iterator KeyedContainer< DATATYPE, MAPPING >::reverse_iterator

Sequential access: reverse iterator type used in sequential container.

Definition at line 94 of file KeyedContainer.h.

## ◆ seq_type

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef std::vector<contained_type*> KeyedContainer< DATATYPE, MAPPING >::seq_type

General container specific type definitions.

The following type definitions are generic to most STL containers and are also presented by the KeyedContainer class. These forward declarations typically are used by STL algorithms.Definition of the STL sequential access type

Definition at line 80 of file KeyedContainer.h.

## ◆ traits

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef Containers::traits<container_type, contained_type> KeyedContainer< DATATYPE, MAPPING >::traits
| private

Traits class definition.

Specializing traits allows to specialize the container implementation for special needs.

Definition at line 104 of file KeyedContainer.h.

## ◆ value_type

template<class DATATYPE, class MAPPING = Containers::HashMap>

typedef seq_type::value_type KeyedContainer< DATATYPE, MAPPING >::value_type

Sequential access: definition of type stored in sequential container.

Definition at line 84 of file KeyedContainer.h.

## Constructor & Destructor Documentation

## ◆ KeyedContainer() [1/3]

template<class DATATYPE, class MAPPING = Containers::HashMap>

KeyedContainer< DATATYPE, MAPPING >::KeyedContainer | ( | void |  | ) |
| inline

Standard Constructor.

Definition at line 171 of file KeyedContainer.h.

171 {
172 // avoid problems with strict-aliasing rules
173 seq_type** rptr = &m_random;
174 seq_type* sptr = &m_sequential;
175 m_cont.setup( (void*)sptr, (void**)rptr );
176 }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
KeyedContainer::seq_type
std::vector< contained_type * > seq_type
General container specific type definitions.
Definition: KeyedContainer.h:80
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
KeyedContainer::m_random
seq_type * m_random
Array to allow random access to objects (not exposed)
Definition: KeyedContainer.h:114

## ◆ KeyedContainer() [2/3]

template<class DATATYPE, class MAPPING = Containers::HashMap>

KeyedContainer< DATATYPE, MAPPING >::KeyedContainer | ( | KeyedContainer< DATATYPE, MAPPING > && | other | ) |
| inline

Definition at line 177 of file KeyedContainer.h.

178 : ObjectContainerBase( std::move( other ) )
179 , m_cont( std::move( other.m_cont ) )
180 , m_sequential( std::move( other.m_sequential ) ) {
181 m_cont.setup( (void*)&m_sequential, (void**)&m_random );
182 std::for_each( begin(), end(), [this]( ContainedObject* obj ) { obj->setParent( this ); } );
183
184 other.m_cont.setup( (void*)&other.m_sequential, (void**)&other.m_random );
185 }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
KeyedContainer::begin
iterator begin()
Retrieve start iterator.
Definition: KeyedContainer.h:309
std::move
T move(T... args)
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
ContainedObject
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
Definition: ContainedObject.h:31
KeyedContainer::end
iterator end()
Retrieve terminating iterator.
Definition: KeyedContainer.h:313
ContainedObject::setParent
void setParent(ObjectContainerBase *value)
Update parent member.
Definition: ContainedObject.h:53
std::for_each
T for_each(T... args)
KeyedContainer::m_random
seq_type * m_random
Array to allow random access to objects (not exposed)
Definition: KeyedContainer.h:114
ObjectContainerBase::ObjectContainerBase
ObjectContainerBase()=default
Constructor.

## ◆ KeyedContainer() [3/3]

template<class DATATYPE, class MAPPING = Containers::HashMap>

KeyedContainer< DATATYPE, MAPPING >::KeyedContainer | ( | const KeyedContainer< DATATYPE, MAPPING > & |  | ) |
| delete

## ◆ ~KeyedContainer()

template<class DATATYPE , class MAPPING >

KeyedContainer< DATATYPE, MAPPING >::~KeyedContainer | ( |  | ) |
| inline override

Destructor.

Inline code for keyed container class.

Definition at line 489 of file KeyedContainer.h.

489 {
490 clear();
491 m_cont.clear();
492 }
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
KeyedContainer::clear
void clear()
Clear the entire content and erase the objects from the container.
Definition: KeyedContainer.h:281

## Member Function Documentation

## ◆ add()

template<class DATATYPE , class MAPPING >

long KeyedContainer< DATATYPE, MAPPING >::add | ( | ContainedObject * | pObject | ) |
| inline override virtual

ObjectContainerBase overload: Add an object to the container.

Plese see the documentation of the member function

const key_type& insert(DATATYPE* pObject)

for further details.

Parameters

  pObject | Pointer to the object to be inserted into the container.

Returns
  long integer representation of the key value.

Implements ObjectContainerBase.

Definition at line 589 of file KeyedContainer.h.

589 {
590 return traits::identifier( insert( dynamic_cast<typename seq_type::value_type>( pObject ) ) );
591 }
KeyedContainer::insert
const key_type & insert(const value_type val, const key_type &kval)
Insert entry to the container with a valid key.
Definition: KeyedContainer.h:526
Containers::key_traits< DATATYPE::key_type >::identifier
static long identifier(const key_type &k)
Full unhashed key identifier.
Definition: KeyedTraits.h:82

## ◆ begin() [1/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

iterator KeyedContainer< DATATYPE, MAPPING >::begin | ( |  | ) |
| inline

Retrieve start iterator.

Definition at line 309 of file KeyedContainer.h.

309 { return m_sequential.begin(); }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::begin
T begin(T... args)

## ◆ begin() [2/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

const_iterator KeyedContainer< DATATYPE, MAPPING >::begin | ( |  | ) | const
| inline

Retrieve start const iterator.

Definition at line 311 of file KeyedContainer.h.

311 { return m_sequential.begin(); }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::begin
T begin(T... args)

## ◆ classID()

template<class DATATYPE, class MAPPING = Containers::HashMap>

static const CLID& KeyedContainer< DATATYPE, MAPPING >::classID | ( |  | ) |
| inline static

Retrieve class ID.

Definition at line 199 of file KeyedContainer.h.

199 {
200 static CLID clid = contained_type::classID() + container_type::classID();
201 return clid;
202 }
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8

## ◆ clear()

template<class DATATYPE, class MAPPING = Containers::HashMap>

void KeyedContainer< DATATYPE, MAPPING >::clear | ( |  | ) |
| inline

Clear the entire content and erase the objects from the container.

Definition at line 281 of file KeyedContainer.h.

281 { erase( begin(), end() ); }
KeyedContainer::erase
long erase(const key_type &kval)
Remove/erase object (identified by key) from the container.
Definition: KeyedContainer.h:379
KeyedContainer::begin
iterator begin()
Retrieve start iterator.
Definition: KeyedContainer.h:309
KeyedContainer::end
iterator end()
Retrieve terminating iterator.
Definition: KeyedContainer.h:313

## ◆ clID()

template<class DATATYPE, class MAPPING = Containers::HashMap>

const CLID& KeyedContainer< DATATYPE, MAPPING >::clID | ( |  | ) | const
| inline override virtual

Retrieve class ID.

Reimplemented from DataObject.

Definition at line 197 of file KeyedContainer.h.

197 { return this->classID(); }
KeyedContainer::classID
static const CLID & classID()
Retrieve class ID.
Definition: KeyedContainer.h:199

## ◆ containedObject() [1/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

ContainedObject* KeyedContainer< DATATYPE, MAPPING >::containedObject | ( | long | key_value | ) |
| inline override virtual

ObjectContainerBase overload: Retrieve the object by reference given the long integer representation of the object's key.

Implements ObjectContainerBase.

Definition at line 253 of file KeyedContainer.h.

253 { return i_object( traits::makeKey( key_value ) ); }
KeyedContainer::i_object
FORCE_INLINE value_type i_object(const key_type &k) const
Internal function to access objects within the container.
Definition: KeyedContainer.h:130
Containers::key_traits< DATATYPE::key_type >::makeKey
static key_type makeKey(long k)
Create key from its full integer representation.
Definition: KeyedTraits.h:79

## ◆ containedObject() [2/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

ContainedObject const* KeyedContainer< DATATYPE, MAPPING >::containedObject | ( | long | dist | ) | const
| inline override virtual

Pointer to an object of a given distance.

Implements ObjectContainerBase.

Definition at line 254 of file KeyedContainer.h.

254 {
255 return i_object( traits::makeKey( key_value ) );
256 }
KeyedContainer::i_object
FORCE_INLINE value_type i_object(const key_type &k) const
Internal function to access objects within the container.
Definition: KeyedContainer.h:130
Containers::key_traits< DATATYPE::key_type >::makeKey
static key_type makeKey(long k)
Create key from its full integer representation.
Definition: KeyedTraits.h:79

## ◆ containedObjects() [1/2]

template<class DATATYPE , class MAPPING >

KeyedContainer< DATATYPE, MAPPING >::size_type KeyedContainer< DATATYPE, MAPPING >::containedObjects | ( | std::vector< ContainedObject * > & | v | ) | const
| inline virtual

Retrieve the full content of the object container.

Parameters

  v | Vector of contained objects, which will host all objects contained in this container.

Returns
  Number of objects returned in v.

Definition at line 575 of file KeyedContainer.h.

575 {
576 typename seq_type::const_iterator i = m_sequential.begin();
577 typename seq_type::const_iterator s = m_sequential.end();
578 vec.clear();
579 vec.reserve( size() );
580 for ( ; i != s; i++ ) {
581 ContainedObject* p = const_cast<typename seq_type::value_type>( *i );
582 vec.push_back( p );
583 }
584 return vec.size();
585 }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::end
T end(T... args)
KeyedContainer::size
size_type size() const
Number of objects in the container.
Definition: KeyedContainer.h:275
ContainedObject
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
Definition: ContainedObject.h:31
std::vector::begin
T begin(T... args)
gaudirun.s
string s
Definition: gaudirun.py:316

## ◆ containedObjects() [2/2]

template<class DATATYPE , class MAPPING >

const std::vector< const ContainedObject * > * KeyedContainer< DATATYPE, MAPPING >::containedObjects | ( |  | ) | const
| inline virtual

Retrieve the full content of the object container by reference.

Returned is the random access container if in sequntial direct access mode. Otherwise the sequential access container is returned

Returns
  Reference to sequencal access container.

Definition at line 520 of file KeyedContainer.h.

520 {
521 return (const std::vector<const ContainedObject*>*)( ( 0 == m_cont.isDirect() ) ? m_random : &m_sequential );
522 }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
std::vector
STL class.
KeyedContainer::m_random
seq_type * m_random
Array to allow random access to objects (not exposed)
Definition: KeyedContainer.h:114

## ◆ empty()

template<class DATATYPE, class MAPPING = Containers::HashMap>

bool KeyedContainer< DATATYPE, MAPPING >::empty | ( |  | ) | const
| inline

For consistency with STL: check if container is empty.

Definition at line 277 of file KeyedContainer.h.

277 { return m_sequential.empty(); }
std::vector::empty
T empty(T... args)
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112

## ◆ end() [1/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

iterator KeyedContainer< DATATYPE, MAPPING >::end | ( |  | ) |
| inline

Retrieve terminating iterator.

Definition at line 313 of file KeyedContainer.h.

313 { return m_sequential.end(); }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::end
T end(T... args)

## ◆ end() [2/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

const_iterator KeyedContainer< DATATYPE, MAPPING >::end | ( |  | ) | const
| inline

Retrieve terminating const iterator.

Definition at line 315 of file KeyedContainer.h.

315 { return m_sequential.end(); }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::end
T end(T... args)

## ◆ erase() [1/4]

template<class DATATYPE, class MAPPING = Containers::HashMap>

long KeyedContainer< DATATYPE, MAPPING >::erase | ( | const key_type & | kval | ) |
| inline

Remove/erase object (identified by key) from the container.

Parameters

  kval | Key to identify the object within the container.

Returns
  Enumeration value from the Containers namespace:
  - OBJ_NOT_FOUND: The indicated object was not found in the container
  - OBJ_ERASED: The indicated object was found and removed from the container. The object was not yet deleted, because its reference count was non zero.
  - OBJ_DELETED The indicated object was found and removed from the container. The object was deleted, because its reference count was zero.

Definition at line 379 of file KeyedContainer.h.

379 { return i_erase( 0, kval ); }
KeyedContainer::i_erase
long i_erase(const_reference v, const key_type &k)
Internal function to erase an object from the container.
Definition: KeyedContainer.h:136

## ◆ erase() [2/4]

template<class DATATYPE, class MAPPING = Containers::HashMap>

long KeyedContainer< DATATYPE, MAPPING >::erase | ( | const value_type | val | ) |
| inline

Remove/erase object (identified by pointer value) from the container.

This member function removes an object, which is identified by its reference from the container. No key value is supplied. To identify the object within the container, the key of the object is used as it can be retrieved using the KeyedObject::key() method.

Parameters

  val | Reference to object to be removed from the container.

Returns
  Enumeration value from the Containers namespace:
  - OBJ_NOT_FOUND: The indicated object was not found in the container
  - OBJ_ERASED: The indicated object was found and removed from the container. The object was not yet deleted, because its reference count was non zero.
  - OBJ_DELETED The indicated object was found and removed from the container. The object was deleted, because its reference count was zero.

Definition at line 401 of file KeyedContainer.h.

401 { return ( val ) ? i_erase( val, val->key() ) : (long)Containers::OBJ_NOT_FOUND; }
Containers::OBJ_NOT_FOUND
Object not present in the container.
Definition: KeyedTraits.h:23
KeyedContainer::i_erase
long i_erase(const_reference v, const key_type &k)
Internal function to erase an object from the container.
Definition: KeyedContainer.h:136

## ◆ erase() [3/4]

template<class DATATYPE, class MAPPING = Containers::HashMap>

long KeyedContainer< DATATYPE, MAPPING >::erase | ( | iterator | pos | ) |
| inline

Remove/erase object (identified by iterator) from the container.

This member function removes an object, which is identified by its reference from the container. No key value is supplied. To identify the object within the container, the key of the object is used as it can be retrieved using the KeyedObject::key() method.

Parameters

  val | Reference to object to be removed from the container.

Returns
  Enumeration value from the Containers namespace:
  - OBJ_NOT_FOUND: The indicated object was not found in the container
  - OBJ_ERASED: The indicated object was found and removed from the container. The object was not yet deleted, because its reference count was non zero.
  - OBJ_DELETED The indicated object was found and removed from the container. The object was deleted, because its reference count was zero.

Definition at line 423 of file KeyedContainer.h.

423 { return erase( *pos ); }
KeyedContainer::erase
long erase(const key_type &kval)
Remove/erase object (identified by key) from the container.
Definition: KeyedContainer.h:379

## ◆ erase() [4/4]

template<class DATATYPE , class MAPPING >

void KeyedContainer< DATATYPE, MAPPING >::erase | ( | iterator | pos_start,
|  | iterator | pos_stop,
|  | bool | use_temp = `false`
| ) |  |
| inline

Remove/erase objects by iterator range.

This member function removes all objects, which are within the sequential iterator range [pos_start, pos_stop[.

Parameters

  pos_start | Starting iterator of the range to be removed.
  pos_stop | Starting iterator of the range to be removed.
  use_temp | Flag to indicate that a temporary arry should be used.

Definition at line 614 of file KeyedContainer.h.

614 {
615 bool is_start = start_pos == m_sequential.begin();
616 bool is_stop = stop_pos == m_sequential.end();
617 if ( is_start && is_stop ) {
618 // Nothing special. Taken care of by Keyed object manager
619 } else if ( is_start || is_stop || use_tmp ) {
620 std::vector<DATATYPE*> tmp( m_sequential.begin(), start_pos );
621 tmp.insert( tmp.end(), stop_pos, m_sequential.end() );
622 std::for_each( tmp.begin(), tmp.end(), traits::addRef );
623 this->erase( m_sequential.begin(), m_sequential.end() );
624 std::for_each( tmp.begin(), tmp.end(), _InsertRelease( this ) );
625 return;
626 }
627 std::for_each( start_pos, stop_pos, _RemoveRelease( this ) );
628 seq_type* sptr = &m_sequential; // avoid problems with strict-aliasing rules
629 std::vector<void*>* v = (std::vector<void*>*)sptr;
630 std::vector<void*>::iterator i1 = v->begin() + std::distance( m_sequential.begin(), start_pos );
631 std::vector<void*>::iterator i2 = v->begin() + std::distance( m_sequential.begin(), stop_pos );
632 m_cont.erase( i1, i2 );
633 }
Containers::key_traits< DATATYPE::key_type >::addRef
static long addRef(obj_type *v)
Add reference counter to object when inserted into the container.
Definition: KeyedTraits.h:101
std::distance
T distance(T... args)
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
KeyedContainer::seq_type
std::vector< contained_type * > seq_type
General container specific type definitions.
Definition: KeyedContainer.h:80
KeyedContainer::erase
long erase(const key_type &kval)
Remove/erase object (identified by key) from the container.
Definition: KeyedContainer.h:379
std::vector::end
T end(T... args)
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
std::vector::insert
T insert(T... args)
std::vector
STL class.
std::vector::begin
T begin(T... args)
std::for_each
T for_each(T... args)

## ◆ i_erase()

template<class DATATYPE, class MAPPING = Containers::HashMap>

long KeyedContainer< DATATYPE, MAPPING >::i_erase | ( | const_reference | v,
|  | const key_type & | k
| ) |  |
| inline private

Internal function to erase an object from the container.

Definition at line 136 of file KeyedContainer.h.

136 {
137 value_type p = value_type( m_cont.erase( traits::hash( k ), v ) );
138 if ( p ) {
139 if ( p->parent() == this ) { p->setParent( 0 ); }
140 }
141 return traits::release( p ) <= 0 ? (long)Containers::OBJ_ERASED : (long)Containers::OBJ_DELETED;
142 }
Containers::key_traits< DATATYPE::key_type >::hash
static long hash(const key_type &key_value)
Hash function for this key.
Definition: KeyedTraits.h:84
KeyedContainer::value_type
seq_type::value_type value_type
Sequential access: definition of type stored in sequential container.
Definition: KeyedContainer.h:84
Containers::OBJ_ERASED
Object was removed, but not deleted.
Definition: KeyedTraits.h:25
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
Containers::key_traits< DATATYPE::key_type >::release
static long release(obj_type *v)
Release reference to object.
Definition: KeyedTraits.h:103
Containers::OBJ_DELETED
Object was removed from the container and deleted.
Definition: KeyedTraits.h:24

## ◆ i_object()

template<class DATATYPE, class MAPPING = Containers::HashMap>

FORCE_INLINE value_type KeyedContainer< DATATYPE, MAPPING >::i_object | ( | const key_type & | k | ) | const
| inline private

Internal function to access objects within the container.

Definition at line 130 of file KeyedContainer.h.

130 {
131 return 0 == m_cont.isDirect() ? value_type( *( m_random->begin() + traits::hash( k ) ) )
132 : value_type( m_cont.object( traits::hash( k ) ) );
133 }
KeyedContainer::traits
Containers::traits< container_type, contained_type > traits
Traits class definition.
Definition: KeyedContainer.h:104
Containers::key_traits< DATATYPE::key_type >::hash
static long hash(const key_type &key_value)
Hash function for this key.
Definition: KeyedTraits.h:84
KeyedContainer::value_type
seq_type::value_type value_type
Sequential access: definition of type stored in sequential container.
Definition: KeyedContainer.h:84
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
KeyedContainer::object
value_type object(const key_type &kval) const
Object access by key.
Definition: KeyedContainer.h:343
std::vector::begin
T begin(T... args)
KeyedContainer::m_random
seq_type * m_random
Array to allow random access to objects (not exposed)
Definition: KeyedContainer.h:114

## ◆ index()

template<class DATATYPE , class MAPPING >

long KeyedContainer< DATATYPE, MAPPING >::index | ( | const ContainedObject * | p | ) | const
| inline override virtual

ObjectContainerBase overload: Retrieve the full long integer representation of the object's key from the object base class pointer.

Implements ObjectContainerBase.

Definition at line 566 of file KeyedContainer.h.

566 {
567 const contained_type* ptr = dynamic_cast<const contained_type*>( p );
568 if ( ptr ) return traits::identifier( ptr->key() );
569 return -1;
570 }
KeyedContainer::contained_type
DATATYPE contained_type
Definition of the contained object type.
Definition: KeyedContainer.h:69
Containers::key_traits< DATATYPE::key_type >::identifier
static long identifier(const key_type &k)
Full unhashed key identifier.
Definition: KeyedTraits.h:82

## ◆ insert() [1/2]

template<class DATATYPE , class MAPPING >

const KeyedContainer< DATATYPE, MAPPING >::key_type & KeyedContainer< DATATYPE, MAPPING >::insert | ( | const value_type | val,
|  | const key_type & | kval
| ) |  |
| inline

Insert entry to the container with a valid key.

This member function inserts an element, which is identified by its reference to the container. The element will be inserted using the specified key. If the object is already keyed, the long representations of the supplied key and the object's key must agree.

The object will not be inserted and an exception will be raised under the following conditions:

- The supplied key does not agree with the object's key.
- An object with the supplied key is already present in the container.

Parameters

  val | Reference to object to be inserted into the container. The object reference may NOT be NULL.
  kval | Key to identify the object within the container.

Returns
  Key, which was used to index the object within the container. If the operation is not successful, an exception is thrown.

Definition at line 526 of file KeyedContainer.h.

526 {
527 if ( val ) {
528 long k0 = traits::hash( kval );
529 if ( !val->hasKey() || ( traits::hash( val->key() ) == k0 ) ) {
530 if ( m_cont.insert( this, val, val, k0 ) == Containers::OBJ_INSERTED ) {
531 if ( !val->hasKey() ) traits::setKey( val, kval );
532 traits::addRef( val );
533 return val->key();
534 }
535 }
536 }
537 // Cannot insert object...indicate bad object insertion...
538 Containers::cannotInsertToContainer();
539 return val->key();
540 }
Containers::key_traits< DATATYPE::key_type >::addRef
static long addRef(obj_type *v)
Add reference counter to object when inserted into the container.
Definition: KeyedTraits.h:101
Containers::OBJ_INSERTED
Object was inserted into the container.
Definition: KeyedTraits.h:26
Containers::cannotInsertToContainer
GAUDI_API void cannotInsertToContainer()
Function to be called to indicate that an object cannot be inserted to the container.
Definition: KeyedObjectManager.cpp:73
Containers::key_traits< DATATYPE::key_type >::hash
static long hash(const key_type &key_value)
Hash function for this key.
Definition: KeyedTraits.h:84
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
Containers::key_traits< DATATYPE::key_type >::setKey
static void setKey(obj_type *v, const key_type &k)
Set object key when inserted into the container.
Definition: KeyedTraits.h:86

## ◆ insert() [2/2]

template<class DATATYPE , class MAPPING >

const KeyedContainer< DATATYPE, MAPPING >::key_type & KeyedContainer< DATATYPE, MAPPING >::insert | ( | const value_type | val | ) |

Insert entry to the container with automatic key assignment.

This member function inserts an element, which is identified by its reference to the container. No key value is supplied. The key used to insert the object is retrieved from the element itself. In the event the object already has a key, the assigned key of the object is used. If no key was assigned to the object, (i.e. the object's key is equal to the invalid key), a key is generated according to the number of objects present in the container.

The object will not be inserted and an exception will be raised under the following conditions:

- A key was already assigned to the object, but another object with the same key is already present in the container.

Parameters

  val | Reference to object to be inserted into the container.

Returns
  Key, which was used to index the object within the container. If the operation is not successful, an exception is thrown.

Definition at line 545 of file KeyedContainer.h.

545 {
546 if ( 0 != val ) {
547 if ( val->hasKey() ) {
548 if ( m_cont.insert( this, val, val, traits::hash( val->key() ) ) == Containers::OBJ_INSERTED ) {
549 traits::addRef( val );
550 return val->key();
551 }
552 }
553 long k0;
554 if ( m_cont.insert( this, val, val, &k0 ) == Containers::OBJ_INSERTED ) {
555 traits::setKey( val, traits::makeKey( k0 ) );
556 traits::addRef( val );
557 return val->key();
558 }
559 }
560 // Cannot insert object...indicate bad object insertion...
561 Containers::cannotInsertToContainer();
562 return val->key();
563 }
Containers::key_traits< DATATYPE::key_type >::addRef
static long addRef(obj_type *v)
Add reference counter to object when inserted into the container.
Definition: KeyedTraits.h:101
Containers::key_traits< DATATYPE::key_type >::makeKey
static key_type makeKey(long k)
Create key from its full integer representation.
Definition: KeyedTraits.h:79
Containers::OBJ_INSERTED
Object was inserted into the container.
Definition: KeyedTraits.h:26
Containers::cannotInsertToContainer
GAUDI_API void cannotInsertToContainer()
Function to be called to indicate that an object cannot be inserted to the container.
Definition: KeyedObjectManager.cpp:73
Containers::key_traits< DATATYPE::key_type >::hash
static long hash(const key_type &key_value)
Hash function for this key.
Definition: KeyedTraits.h:84
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
Containers::key_traits< DATATYPE::key_type >::setKey
static void setKey(obj_type *v, const key_type &k)
Set object key when inserted into the container.
Definition: KeyedTraits.h:86

## ◆ numberOfObjects()

template<class DATATYPE, class MAPPING = Containers::HashMap>

size_type KeyedContainer< DATATYPE, MAPPING >::numberOfObjects | ( |  | ) | const
| inline override virtual

ObjectContainerBase overload: Number of objects in the container.

Implements ObjectContainerBase.

Definition at line 222 of file KeyedContainer.h.

222 { return m_sequential.size(); }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::size
T size(T... args)

## ◆ object()

template<class DATATYPE, class MAPPING = Containers::HashMap>

value_type KeyedContainer< DATATYPE, MAPPING >::object | ( | const key_type & | kval | ) | const
| inline

Object access by key.

Access contained objects by key.

Parameters

  kval | Key of the object to be returned.

Returns
  Valid reference to the requested object. If the key of the requested object cannot be found in the container a null reference is returned.

Definition at line 343 of file KeyedContainer.h.

343 { return i_object( kval ); }
KeyedContainer::i_object
FORCE_INLINE value_type i_object(const key_type &k) const
Internal function to access objects within the container.
Definition: KeyedContainer.h:130

## ◆ operator()()

template<class DATATYPE, class MAPPING = Containers::HashMap>

value_type KeyedContainer< DATATYPE, MAPPING >::operator() | ( | const key_type & | kval | ) | const
| inline

STL algorithms support for object access.

Access contained objects by key using the operator(), which is demanded by STL algorithms.

Parameters

  kval | Key of the object to be returned.

Returns
  Valid reference to the requested object. If the key of the requested object cannot be found in the container a null reference is returned.

Definition at line 354 of file KeyedContainer.h.

354 { return i_object( kval ); }
KeyedContainer::i_object
FORCE_INLINE value_type i_object(const key_type &k) const
Internal function to access objects within the container.
Definition: KeyedContainer.h:130

## ◆ rbegin() [1/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

reverse_iterator KeyedContainer< DATATYPE, MAPPING >::rbegin | ( |  | ) |
| inline

reverse_iterator returns the beginning of the reversed container

Definition at line 317 of file KeyedContainer.h.

317 { return m_sequential.rbegin(); }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::rbegin
T rbegin(T... args)

## ◆ rbegin() [2/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

const_reverse_iterator KeyedContainer< DATATYPE, MAPPING >::rbegin | ( |  | ) | const
| inline

const reverse_iterator returns the beginning of the reversed container

Definition at line 319 of file KeyedContainer.h.

319 { return m_sequential.rbegin(); }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::rbegin
T rbegin(T... args)

## ◆ remove()

template<class DATATYPE , class MAPPING >

long KeyedContainer< DATATYPE, MAPPING >::remove | ( | ContainedObject * | pObject | ) |
| inline override virtual

ObjectContainerBase overload: Remove an object from the container.

Because this function is also called from the destructor of The ContainedObject class, it is no longer possible to deduce the key from the object itself. It is hence necessary to relay on the NON-EXISTENCE of virtual inheritance, ie. (void*)pObject = (void*)(contained_object). If the virtual object table is still intact, the normal erase is called.

Parameters

  pObject | Pointer to the object to be removed from the container.

Implements ObjectContainerBase.

Definition at line 595 of file KeyedContainer.h.

595 {
596 contained_type* p1 = dynamic_cast<contained_type*>( p );
597 if ( p1 ) { // Normal case; object still fully intact
598 return this->erase( p1 );
599 } else if ( p ) {
600 const ObjectContainerBase* par = p->parent();
601 // The following should never occur: object is in a funny state,
602 // Because the parent was explicitly set to NULL in the
603 // KeyeObject destructor.
604 // - It cannot be a KeyedObject: It would not have a parent
605 // - Still the parent is present: We are not in the destructor
606 // of KeyedObject
607 if ( par ) { Containers::invalidContainerOperation(); }
608 return m_cont.erase( 0, p ) == 0 ? (long)Containers::OBJ_ERASED : (long)Containers::OBJ_NOT_FOUND;
609 }
610 return (long)Containers::OBJ_NOT_FOUND;
611 }
Containers::OBJ_NOT_FOUND
Object not present in the container.
Definition: KeyedTraits.h:23
KeyedContainer::erase
long erase(const key_type &kval)
Remove/erase object (identified by key) from the container.
Definition: KeyedContainer.h:379
KeyedContainer::contained_type
DATATYPE contained_type
Definition of the contained object type.
Definition: KeyedContainer.h:69
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:465
Containers::invalidContainerOperation
GAUDI_API void invalidContainerOperation()
Function to be called to indicate that an operation should be performed on the container or it's cont...
Definition: KeyedObjectManager.cpp:82
Containers::OBJ_ERASED
Object was removed, but not deleted.
Definition: KeyedTraits.h:25
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
ObjectContainerBase
ObjectContainerBase is the base class for Gaudi container classes.
Definition: ObjectContainerBase.h:19

## ◆ rend() [1/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

reverse_iterator KeyedContainer< DATATYPE, MAPPING >::rend | ( |  | ) |
| inline

reverse_iterator pointing to the end of the reversed container

Definition at line 321 of file KeyedContainer.h.

321 { return m_sequential.rend(); }
std::vector::rend
T rend(T... args)
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112

## ◆ rend() [2/2]

template<class DATATYPE, class MAPPING = Containers::HashMap>

const_reverse_iterator KeyedContainer< DATATYPE, MAPPING >::rend | ( |  | ) | const
| inline

const reverse_iterator pointing to the end of the reversed container

Definition at line 323 of file KeyedContainer.h.

323 { return m_sequential.rend(); }
std::vector::rend
T rend(T... args)
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112

## ◆ reserve()

template<class DATATYPE, class MAPPING = Containers::HashMap>

void KeyedContainer< DATATYPE, MAPPING >::reserve | ( | size_type | value | ) |
| inline

Reserve place for "value" objects in the container.

Definition at line 279 of file KeyedContainer.h.

279 { m_cont.reserve( value ); }
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110

## ◆ size()

template<class DATATYPE, class MAPPING = Containers::HashMap>

size_type KeyedContainer< DATATYPE, MAPPING >::size | ( |  | ) | const
| inline

Number of objects in the container.

Definition at line 275 of file KeyedContainer.h.

275 { return m_sequential.size(); }
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
std::vector::size
T size(T... args)

## ◆ update()

template<class DATATYPE , class MAPPING >

StatusCode KeyedContainer< DATATYPE, MAPPING >::update | ( |  | ) |
| inline override virtual

Reconfigure direct access to elements (Needed by POOL data loading) This function reuses the "update" callback of the generic DataObject base class.

Reimplemented from DataObject.

Definition at line 496 of file KeyedContainer.h.

496 {
497 int count = 0;
498 m_cont.clearDirect();
499 typename seq_type::iterator i = m_sequential.begin();
500 typename seq_type::iterator s = m_sequential.end();
501 for ( ; i != s; i++ ) {
502 typename seq_type::value_type v = *i;
503 if ( v ) {
504 if ( !v->hasKey() ) {
505 traits::setKey( v, v->key() );
506 traits::addRef( v );
507 }
508 long k0 = traits::hash( v->key() );
509 if ( m_cont.insertDirect( this, v, v, k0 ) == Containers::OBJ_INSERTED ) {}
510 } else {
511 ++count;
512 }
513 }
514 if ( count > 0 ) { Containers::cannotInsertToContainer(); }
515 return StatusCode::SUCCESS;
516 }
Containers::key_traits< DATATYPE::key_type >::addRef
static long addRef(obj_type *v)
Add reference counter to object when inserted into the container.
Definition: KeyedTraits.h:101
KeyedContainer::m_sequential
seq_type m_sequential
Array to allow sequential access to the object (can be ordered).
Definition: KeyedContainer.h:112
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
std::vector::end
T end(T... args)
Containers::OBJ_INSERTED
Object was inserted into the container.
Definition: KeyedTraits.h:26
Containers::cannotInsertToContainer
GAUDI_API void cannotInsertToContainer()
Function to be called to indicate that an object cannot be inserted to the container.
Definition: KeyedObjectManager.cpp:73
Containers::key_traits< DATATYPE::key_type >::hash
static long hash(const key_type &key_value)
Hash function for this key.
Definition: KeyedTraits.h:84
KeyedContainer::m_cont
container_type m_cont
Map container to facilitate object access by key.
Definition: KeyedContainer.h:110
std::count
T count(T... args)
std::vector::begin
T begin(T... args)
gaudirun.s
string s
Definition: gaudirun.py:316
Containers::key_traits< DATATYPE::key_type >::setKey
static void setKey(obj_type *v, const key_type &k)
Set object key when inserted into the container.
Definition: KeyedTraits.h:86

## Friends And Related Function Documentation

## ◆ GaudiDict::KeyedContainerDict< DATATYPE >

template<class DATATYPE, class MAPPING = Containers::HashMap>

friend struct GaudiDict::KeyedContainerDict< DATATYPE >
| friend

Definition at line 65 of file KeyedContainer.h.

## Member Data Documentation

## ◆ m_cont

template<class DATATYPE, class MAPPING = Containers::HashMap>

container_type KeyedContainer< DATATYPE, MAPPING >::m_cont
| private

Map container to facilitate object access by key.

Definition at line 110 of file KeyedContainer.h.

## ◆ m_random

template<class DATATYPE, class MAPPING = Containers::HashMap>

seq_type* KeyedContainer< DATATYPE, MAPPING >::m_random
| private

Array to allow random access to objects (not exposed)

Definition at line 114 of file KeyedContainer.h.

## ◆ m_sequential

template<class DATATYPE, class MAPPING = Containers::HashMap>

seq_type KeyedContainer< DATATYPE, MAPPING >::m_sequential
| private

Array to allow sequential access to the object (can be ordered).

Definition at line 112 of file KeyedContainer.h.

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

- GaudiKernel/GaudiKernel/KeyedContainer.h