The Gaudi Framework  master (37c0b60a)
Containers::KeyedObjectManager< SETUP > Class Template Reference

KeyedObjectManager Class to manage keyed objects. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/KeyedObjectManager.h>

Collaboration diagram for Containers::KeyedObjectManager< SETUP >:

Public Member Functions

 KeyedObjectManager ()
 Standard Constructor. More...
 
 KeyedObjectManager (KeyedObjectManager &&other)
 
virtual ~KeyedObjectManager ()
 Standard Destructor. More...
 
void clearDirect ()
 Clear all direct access fields. More...
 
long insertDirect (ObjectContainerBase *b, ContainedObject *c, void *o, long k)
 Insert element into direct access map. More...
 
long isDirect () const
 Check if the container is dirty. More...
 
void * object (long key) const
 Retrieve object identified by a key from the container. More...
 
long insert (ObjectContainerBase *b, ContainedObject *c, void *o, long *k)
 Insert new object into container. More...
 
long insert (ObjectContainerBase *b, ContainedObject *c, void *o, long k)
 Insert new object into container. More...
 
void * erase (long key, const void *obj)
 Remove object from container (very inefficient if key is invalid) More...
 
long erase (seq_type::iterator beg, seq_type::iterator end)
 Remove object by sequential iterators. More...
 
void reserve (long size)
 Reserve buffer space. More...
 
void clear ()
 Clear content of the vector. More...
 
void setup (void *seq, void **rndm)
 Setup of the Map and the parent object. More...
 
CLID classID ()
 
CLID classID ()
 
void * object (long value) const
 
long insert (ObjectContainerBase *b, ContainedObject *c, void *o, long *k)
 
long insert (ObjectContainerBase *b, ContainedObject *c, void *o, long k)
 
long insertDirect (ObjectContainerBase *b, ContainedObject *c, void *o, long k)
 
void clearDirect ()
 
void * erase (long key, const void *obj)
 
long erase (seq_type::iterator beg, seq_type::iterator end)
 
CLID classID ()
 
void * object (long) const
 
long insert (ObjectContainerBase *b, ContainedObject *c, void *o, long *k)
 
long insert (ObjectContainerBase *b, ContainedObject *c, void *o, long k)
 
long insertDirect (ObjectContainerBase *b, ContainedObject *c, void *o, long k)
 
void clearDirect ()
 
void * erase (long, const void *)
 
long erase (seq_type::iterator beg, seq_type::iterator end)
 
CLID classID ()
 

Static Public Member Functions

static CLID classID ()
 Access CLID for this type of container. More...
 

Private Types

typedef std::vector< void * > seq_type
 

Private Member Functions

void onDirty () const
 Callback when the container becomes dirty. More...
 
void onDirty () const
 
void onDirty () const
 

Private Attributes

seq_typem_seq
 Container holding array like container. More...
 
long m_direct
 Dirty flag. More...
 
long m_keyCtxt
 
union {
   char   buffer [128]
 Buffer space to hold keyed container. More...
 
   SETUP *   s
 
m_setup
 

Detailed Description

template<class SETUP>
class Containers::KeyedObjectManager< SETUP >

KeyedObjectManager Class to manage keyed objects.

Object manager class.

This class is instantiated for two container types: map and hashmap. Other types are possible, but currently not supported. Other implementations may be achieved by specializing the SETUP class.

As an example below the specialization for a vector like implementation is shown.

Author
M.Frank CERN/LHCb
Version
1.0

Definition at line 55 of file KeyedObjectManager.h.

Member Typedef Documentation

◆ seq_type

template<class SETUP >
typedef std::vector<void*> Containers::KeyedObjectManager< SETUP >::seq_type
private

Definition at line 57 of file KeyedObjectManager.h.

Constructor & Destructor Documentation

◆ KeyedObjectManager() [1/2]

Standard Constructor.

Definition at line 98 of file KeyedObjectManager.cpp.

98  : m_seq( nullptr ), m_direct( 0 ) {
99  if ( sizeof( typename T::map_type ) > sizeof( m_setup.buffer ) ) {
100  throw GaudiException( "Basic STL contaier sizes are incompatible", "KeyedContainer", StatusCode::FAILURE );
101  }
102  m_setup.s = ::new ( m_setup.buffer + sizeof( m_setup.s ) ) T();
103  m_keyCtxt = -1;
104 }

◆ KeyedObjectManager() [2/2]

template<class T >
Containers::KeyedObjectManager< T >::KeyedObjectManager ( KeyedObjectManager< SETUP > &&  other)

Definition at line 107 of file KeyedObjectManager.cpp.

108  : m_seq( nullptr ), m_direct( other.m_direct ), m_keyCtxt( other.m_keyCtxt ) {
109  m_setup.s = ::new ( m_setup.buffer + sizeof( m_setup.s ) ) T( std::move( *other.m_setup.s ) );
110 
111  other.m_keyCtxt = -1;
112  other.m_seq = nullptr;
113  other.m_direct = 0;
114 }

◆ ~KeyedObjectManager()

template<class T >
Containers::KeyedObjectManager< T >::~KeyedObjectManager
virtual

Standard Destructor.

Definition at line 121 of file KeyedObjectManager.cpp.

121  {
122  m_setup.s->~T();
123  }

Member Function Documentation

◆ classID() [1/5]

template<class SETUP >
static CLID Containers::KeyedObjectManager< SETUP >::classID ( )
static

Access CLID for this type of container.

◆ classID() [2/5]

Definition at line 298 of file KeyedObjectManager.cpp.

298  {
299  return CLID_ObjectVector + 0x00030000;
300  }

◆ classID() [3/5]

Definition at line 302 of file KeyedObjectManager.cpp.

302  {
303  return CLID_ObjectVector + 0x00040000;
304  }

◆ classID() [4/5]

Definition at line 492 of file KeyedObjectManager.cpp.

492  {
493  return CLID_ObjectVector + 0x00050000;
494  }

◆ classID() [5/5]

Definition at line 576 of file KeyedObjectManager.cpp.

576  {
577  return CLID_ObjectVector + 0x00060000;
578  }

◆ clear()

template<class T >
void Containers::KeyedObjectManager< T >::clear

Clear content of the vector.

Definition at line 245 of file KeyedObjectManager.cpp.

245  {
246  clearDirect();
247  m_seq->clear();
248 }

◆ clearDirect() [1/3]

template<class T >
void Containers::KeyedObjectManager< T >::clearDirect

Clear all direct access fields.

Definition at line 251 of file KeyedObjectManager.cpp.

251  {
252  switch ( m_direct ) {
253  case 1:
254  m_setup.s->m.clear();
255  break;
256  case 0:
257  m_setup.s->v.clear();
258  break;
259  default:
260  break;
261  }
262  m_direct = 0;
263  m_keyCtxt = -1;
264 }

◆ clearDirect() [2/3]

void Containers::KeyedObjectManager< __A >::clearDirect ( )

Definition at line 414 of file KeyedObjectManager.cpp.

414  {
415  m_setup.s->v.clear();
416  m_setup.s->m_idx.clear();
417  m_direct = 0;
418  m_keyCtxt = -1;
419  }

◆ clearDirect() [3/3]

void Containers::KeyedObjectManager< __V >::clearDirect ( )

Definition at line 551 of file KeyedObjectManager.cpp.

551  {
552  m_setup.s->v.clear();
553  m_direct = 0;
554  m_keyCtxt = -1;
555  }

◆ erase() [1/6]

template<class T >
void * Containers::KeyedObjectManager< T >::erase ( long  key,
const void *  obj 
)

Remove object from container (very inefficient if key is invalid)

Definition at line 201 of file KeyedObjectManager.cpp.

201  {
202  typedef typename T::map_type MTYP;
203  typedef find<MTYP> FND;
204  if ( 1 == m_direct ) {
205  auto& m = m_setup.s->m;
206  auto i = ( obj ? std::find_if( m.begin(), m.end(), FND( obj ) ) : m_setup.s->m.find( key ) );
207  if ( i != m_setup.s->m.end() ) {
208  void* o = i->second;
209  auto j = std::find( m_seq->begin(), m_seq->end(), o );
210  if ( j != m_seq->end() ) {
211  m_seq->erase( j );
212  m_setup.s->m.erase( i );
213  return o;
214  }
215  }
217  }
218  onDirty();
219  return erase( key, obj );
220 }

◆ erase() [2/6]

void * Containers::KeyedObjectManager< __A >::erase ( long  key,
const void *  obj 
)

Definition at line 423 of file KeyedObjectManager.cpp.

423  {
424  if ( 0 == m_direct ) {
425  onDirty();
426  return erase( key, obj );
427  }
428  if ( obj ) {
429  auto& idx = m_setup.s->m_idx;
430  for ( auto& elem : idx ) {
431  auto j = m_setup.s->v.begin() + ( elem );
432  auto k = std::find( m_seq->begin(), m_seq->end(), *j );
433  if ( *j == obj ) {
434  void* o = *j;
435  m_seq->erase( k );
436  m_setup.s->v.erase( j );
437  std::for_each( m_setup.s->m_idx.begin(), m_setup.s->m_idx.end(), array::decrement( elem ) );
438  elem = -1;
439  return o;
440  }
441  }
442  } else if ( key >= 0 && key < long( m_setup.s->m_idx.size() ) ) {
443  auto idx = m_setup.s->m_idx.begin() + key;
444  if ( *idx != -1 ) {
445  auto i = m_setup.s->v.begin() + ( *idx );
446  if ( i == m_setup.s->v.end() ) { containerIsInconsistent(); }
447  void* o = *i;
448  auto j = std::find( m_seq->begin(), m_seq->end(), o );
449  if ( j == m_seq->end() ) { containerIsInconsistent(); }
450  m_seq->erase( j );
451  m_setup.s->v.erase( i );
452  std::for_each( m_setup.s->m_idx.begin(), m_setup.s->m_idx.end(), array::decrement( *idx ) );
453  *idx = -1;
454  return o;
455  }
456  }
458  return nullptr;
459  }

◆ erase() [3/6]

void * Containers::KeyedObjectManager< __V >::erase ( long  ,
const void *   
)

Definition at line 559 of file KeyedObjectManager.cpp.

559  {
561  return nullptr;
562  }

◆ erase() [4/6]

template<class T >
long Containers::KeyedObjectManager< T >::erase ( seq_type::iterator  beg,
seq_type::iterator  end 
)

Remove object by sequential iterators.

Definition at line 268 of file KeyedObjectManager.cpp.

268  {
269  typedef typename T::map_type MTYP;
270  typedef find<MTYP> FND;
271  if ( 0 == m_direct ) {
272  onDirty();
273  return erase( beg, end );
274  }
275  if ( beg == m_seq->begin() && end == m_seq->end() ) {
276  clear();
277  } else {
278  for ( auto j = beg; j != end; ++j ) {
279  // auto& m = m_setup.s->m;
280  auto i = std::find_if( m_setup.s->m.begin(), m_setup.s->m.end(), FND( *j ) );
281  if ( i != m_setup.s->m.end() ) {
282  m_setup.s->m.erase( i );
283  continue;
284  }
286  }
287  m_seq->erase( beg, end );
288  }
289  return OBJ_ERASED;
290 }

◆ erase() [5/6]

long Containers::KeyedObjectManager< __A >::erase ( seq_type::iterator  beg,
seq_type::iterator  end 
)

Definition at line 463 of file KeyedObjectManager.cpp.

463  {
464  if ( beg == m_seq->begin() && end == m_seq->end() ) {
465  clear();
466  return OBJ_ERASED;
467  } else if ( 0 == m_direct ) {
468  onDirty();
469  return erase( beg, end );
470  } else {
471  long cnt = 0, nobj = end - beg;
472  auto& idx = m_setup.s->m_idx;
473  for ( auto& elem : idx ) {
474  auto j = m_setup.s->v.begin() + ( elem );
475  auto k = std::find( beg, end, *j );
476  if ( k != end ) {
477  m_setup.s->v.erase( j );
478  std::for_each( m_setup.s->m_idx.begin(), m_setup.s->m_idx.end(), array::decrement( elem ) );
479  elem = -1;
480  cnt++;
481  if ( cnt == nobj ) break;
482  }
483  }
484  m_seq->erase( beg, end );
485  if ( cnt != nobj ) { containerIsInconsistent(); }
486  return OBJ_ERASED;
487  }
488  // cannot reach this point
489  }

◆ erase() [6/6]

long Containers::KeyedObjectManager< __V >::erase ( seq_type::iterator  beg,
seq_type::iterator  end 
)

Definition at line 566 of file KeyedObjectManager.cpp.

566  {
567  if ( beg == m_seq->begin() && end == m_seq->end() ) {
568  clear();
569  return OBJ_ERASED;
570  }
572  return OBJ_ERASED;
573  }

◆ insert() [1/6]

template<class T >
long Containers::KeyedObjectManager< T >::insert ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long *  k 
)

Insert new object into container.

Definition at line 143 of file KeyedObjectManager.cpp.

144  {
145  *key = ++m_keyCtxt;
146  return insert( pBase, pObject, obj, *key );
147 }

◆ insert() [2/6]

long Containers::KeyedObjectManager< __A >::insert ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long *  k 
)

Definition at line 347 of file KeyedObjectManager.cpp.

347  {
348  // auto key creation only possible for direct access!
349  if ( 0 == m_direct ) {
350  m_seq->push_back( o );
351  m_setup.s->v.push_back( o );
352  if ( !c->parent() ) c->setParent( b );
353  *k = ++m_keyCtxt;
354  return OBJ_INSERTED;
355  }
357  return OBJ_CANNOT_INSERT;
358  }

◆ insert() [3/6]

long Containers::KeyedObjectManager< __V >::insert ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long *  k 
)

Definition at line 521 of file KeyedObjectManager.cpp.

521  {
522  m_seq->push_back( o );
523  m_setup.s->v.push_back( o );
524  if ( !c->parent() ) c->setParent( b );
525  *k = ( m_setup.s->v.size() - 1 );
526  return OBJ_INSERTED;
527  }

◆ insert() [4/6]

template<class T >
long Containers::KeyedObjectManager< T >::insert ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long  k 
)

Insert new object into container.

Keep major key value

Definition at line 150 of file KeyedObjectManager.cpp.

151  {
153  if ( key > m_keyCtxt ) { m_keyCtxt = key; }
154  if ( 1 == m_direct ) {
155  if ( m_setup.s->insert( obj, key ) ) {
156  if ( !pObject->parent() ) { pObject->setParent( pBase ); }
157  m_seq->push_back( obj );
158  return OBJ_INSERTED;
159  }
160  } else if ( key == long( m_setup.s->v.size() ) ) {
161  m_setup.s->v.push_back( obj );
162  if ( !pObject->parent() ) { pObject->setParent( pBase ); }
163  m_seq->push_back( obj );
164  return OBJ_INSERTED;
165  } else {
166  // Document is dirty now...
167  // need to copy all pointers from the vector to the map
168  onDirty();
169  return insert( pBase, pObject, obj, key );
170  }
172  return OBJ_CANNOT_INSERT;
173 }

◆ insert() [5/6]

long Containers::KeyedObjectManager< __A >::insert ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long  k 
)

Keep major key value

Extend redirection array and insert

Definition at line 362 of file KeyedObjectManager.cpp.

362  {
363  if ( 0 == m_direct ) {
364  if ( k == m_keyCtxt + 1 ) { return insert( b, c, o, &k ); }
365  onDirty();
366  return insert( b, c, o, k );
367  }
369  if ( k > m_keyCtxt ) m_keyCtxt = k;
371  if ( k + 1 > long( m_setup.s->m_idx.size() ) ) { m_setup.s->m_idx.resize( k + 1, -1 ); }
372  auto idx = m_setup.s->m_idx.begin() + k;
373  if ( *idx == -1 ) {
374  *idx = m_setup.s->v.size();
375  m_setup.s->v.push_back( o );
376  m_seq->push_back( o );
377  if ( !c->parent() ) c->setParent( b );
378  return OBJ_INSERTED;
379  }
381  return OBJ_CANNOT_INSERT;
382  }

◆ insert() [6/6]

long Containers::KeyedObjectManager< __V >::insert ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long  k 
)

Definition at line 531 of file KeyedObjectManager.cpp.

531  {
532  if ( k == long( m_setup.s->v.size() ) ) { return insert( b, c, o, &k ); }
534  return OBJ_CANNOT_INSERT;
535  }

◆ insertDirect() [1/3]

template<class T >
long Containers::KeyedObjectManager< T >::insertDirect ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long  k 
)

Insert element into direct access map.

Keep major key value

Definition at line 176 of file KeyedObjectManager.cpp.

177  {
179  if ( key > m_keyCtxt ) { m_keyCtxt = key; }
180  if ( 1 == m_direct ) {
181  if ( m_setup.s->insert( obj, key ) ) {
182  if ( !pObject->parent() ) { pObject->setParent( pBase ); }
183  return OBJ_INSERTED;
184  }
185  } else if ( key == long( m_setup.s->v.size() ) ) {
186  m_setup.s->v.push_back( obj );
187  if ( !pObject->parent() ) { pObject->setParent( pBase ); }
188  return OBJ_INSERTED;
189  } else {
190  // Document is dirty now...
191  // need to copy all pointers from the vector to the map
192  onDirty();
193  return insertDirect( pBase, pObject, obj, key );
194  }
196  return OBJ_CANNOT_INSERT;
197 }

◆ insertDirect() [2/3]

long Containers::KeyedObjectManager< __A >::insertDirect ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long  k 
)

Keep major key value

Extend redirection array and insert

Definition at line 386 of file KeyedObjectManager.cpp.

386  {
387  if ( 0 == m_direct ) {
388  if ( k == m_keyCtxt + 1 ) {
389  m_setup.s->v.push_back( o );
390  if ( !c->parent() ) c->setParent( b );
391  ++m_keyCtxt;
392  return OBJ_INSERTED;
393  }
394  onDirty();
395  return insertDirect( b, c, o, k );
396  }
398  if ( k > m_keyCtxt ) m_keyCtxt = k;
400  if ( k + 1 > long( m_setup.s->m_idx.size() ) ) { m_setup.s->m_idx.resize( k + 1, -1 ); }
401  auto idx = m_setup.s->m_idx.begin() + k;
402  if ( *idx == -1 ) {
403  *idx = m_setup.s->v.size();
404  m_setup.s->v.push_back( o );
405  if ( !c->parent() ) c->setParent( b );
406  return OBJ_INSERTED;
407  }
409  return OBJ_CANNOT_INSERT;
410  }

◆ insertDirect() [3/3]

long Containers::KeyedObjectManager< __V >::insertDirect ( ObjectContainerBase b,
ContainedObject c,
void *  o,
long  k 
)

Definition at line 539 of file KeyedObjectManager.cpp.

539  {
540  if ( k == long( m_setup.s->v.size() ) ) {
541  m_setup.s->v.push_back( o );
542  if ( !c->parent() ) c->setParent( b );
543  return OBJ_INSERTED;
544  }
546  return OBJ_CANNOT_INSERT;
547  }

◆ isDirect()

template<class SETUP >
long Containers::KeyedObjectManager< SETUP >::isDirect ( ) const
inline

Check if the container is dirty.

Definition at line 83 of file KeyedObjectManager.h.

83 { return m_direct; }

◆ object() [1/3]

template<class T >
void * Containers::KeyedObjectManager< T >::object ( long  key) const

Retrieve object identified by a key from the container.

Definition at line 223 of file KeyedObjectManager.cpp.

223  {
224  if ( 0 == m_direct ) onDirty();
225  auto i = m_setup.s->m.find( key );
226  if ( i != m_setup.s->m.end() ) return ( *i ).second;
227  return nullptr;
228 }

◆ object() [2/3]

void * Containers::KeyedObjectManager< __A >::object ( long  value) const

Definition at line 322 of file KeyedObjectManager.cpp.

322  {
323 #ifdef CHECK_KEYED_CONTAINER
324  unsigned long siz = m_setup.s->m_idx.size();
325  if ( value >= 0 && size_t( value ) < siz ) {
326  long ent = *( m_setup.s->m_idx.begin() + value );
327  if ( ent >= 0 ) { return *( m_setup.s->v.begin() + ent ); }
328  }
329  return nullptr;
330 #else
331  return *( m_setup.s->v.begin() + ( *( m_setup.s->m_idx.begin() + value ) ) );
332 #endif
333  }

◆ object() [3/3]

void * Containers::KeyedObjectManager< __V >::object ( long  ) const

Definition at line 509 of file KeyedObjectManager.cpp.

509  {
511  return nullptr;
512  }

◆ onDirty() [1/3]

template<class T >
void Containers::KeyedObjectManager< T >::onDirty
private

Callback when the container becomes dirty.

Definition at line 134 of file KeyedObjectManager.cpp.

134  {
135  m_direct = 1;
136  auto& s = *m_setup.s;
137  long i = 0;
138  for ( auto p : s.v ) s.insert( p, i++ );
139  s.v.clear();
140 }

◆ onDirty() [2/3]

void Containers::KeyedObjectManager< __A >::onDirty ( ) const
private

Definition at line 336 of file KeyedObjectManager.cpp.

336  {
337  m_direct = 1;
338  m_setup.s->m_idx.reserve( m_setup.s->v.size() + 1 );
339  for ( size_t i = 0, stop = m_setup.s->v.size(); i < stop; ++i ) {
340  if ( !m_setup.s->v[i] ) { containerIsInconsistent(); }
341  m_setup.s->m_idx.push_back( i );
342  }
343  }

◆ onDirty() [3/3]

void Containers::KeyedObjectManager< __V >::onDirty ( ) const
private

Definition at line 515 of file KeyedObjectManager.cpp.

515  {
517  }

◆ reserve()

template<class T >
void Containers::KeyedObjectManager< T >::reserve ( long  size)

Reserve buffer space.

Definition at line 231 of file KeyedObjectManager.cpp.

231  {
232  switch ( m_direct ) {
233  case 1:
234  break;
235  case 0:
236  m_setup.s->v.reserve( len );
237  break;
238  default:
239  break;
240  }
241  m_seq->reserve( len );
242 }

◆ setup()

template<class T >
void Containers::KeyedObjectManager< T >::setup ( void *  seq,
void **  rndm 
)

Setup of the Map and the parent object.

Definition at line 128 of file KeyedObjectManager.cpp.

128  {
129  m_seq = (seq_type*)seq;
130  *rndm = &m_setup.s->v;
131 }

Member Data Documentation

◆ buffer

template<class SETUP >
char Containers::KeyedObjectManager< SETUP >::buffer[128]

Buffer space to hold keyed container.

Definition at line 65 of file KeyedObjectManager.h.

◆ m_direct

template<class SETUP >
long Containers::KeyedObjectManager< SETUP >::m_direct
mutableprivate

Dirty flag.

Definition at line 61 of file KeyedObjectManager.h.

◆ m_keyCtxt

template<class SETUP >
long Containers::KeyedObjectManager< SETUP >::m_keyCtxt
mutableprivate

Definition at line 62 of file KeyedObjectManager.h.

◆ m_seq

template<class SETUP >
seq_type* Containers::KeyedObjectManager< SETUP >::m_seq
private

Container holding array like container.

Definition at line 59 of file KeyedObjectManager.h.

◆ m_setup

union { ... } Containers::KeyedObjectManager< SETUP >::m_setup

◆ s

template<class SETUP >
SETUP* Containers::KeyedObjectManager< SETUP >::s

Definition at line 66 of file KeyedObjectManager.h.


The documentation for this class was generated from the following files:
Containers::OBJ_ERASED
@ OBJ_ERASED
Object was removed, but not deleted
Definition: KeyedTraits.h:35
Containers::cannotInsertToContainer
GAUDI_API void cannotInsertToContainer()
Function to be called to indicate that an object cannot be inserted to the container.
Definition: KeyedObjectManager.cpp:83
std::for_each
T for_each(T... args)
Containers::OBJ_INSERTED
@ OBJ_INSERTED
Object was inserted into the container.
Definition: KeyedTraits.h:36
Containers::KeyedObjectManager::insertDirect
long insertDirect(ObjectContainerBase *b, ContainedObject *c, void *o, long k)
Insert element into direct access map.
Definition: KeyedObjectManager.cpp:176
Containers::KeyedObjectManager::s
SETUP * s
Definition: KeyedObjectManager.h:66
std::vector::reserve
T reserve(T... args)
Containers::KeyedObjectManager::onDirty
void onDirty() const
Callback when the container becomes dirty.
Definition: KeyedObjectManager.cpp:134
std::find_if
T find_if(T... args)
GaudiException
Definition: GaudiException.h:31
Containers::KeyedObjectManager::m_direct
long m_direct
Dirty flag.
Definition: KeyedObjectManager.h:61
Containers::KeyedObjectManager::insert
long insert(ObjectContainerBase *b, ContainedObject *c, void *o, long *k)
Insert new object into container.
Definition: KeyedObjectManager.cpp:143
Containers::KeyedObjectManager::clearDirect
void clearDirect()
Clear all direct access fields.
Definition: KeyedObjectManager.cpp:251
gaudirun.c
c
Definition: gaudirun.py:525
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:92
Containers::KeyedObjectManager::m_keyCtxt
long m_keyCtxt
Definition: KeyedObjectManager.h:62
std::vector::clear
T clear(T... args)
Containers::OBJ_CANNOT_INSERT
@ OBJ_CANNOT_INSERT
Cannot insert object into container.
Definition: KeyedTraits.h:37
std::vector::push_back
T push_back(T... args)
Containers::KeyedObjectManager::m_setup
union Containers::KeyedObjectManager::@4 m_setup
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:108
ProduceConsume.j
j
Definition: ProduceConsume.py:104
std::vector::erase
T erase(T... args)
Containers::KeyedObjectManager::erase
void * erase(long key, const void *obj)
Remove object from container (very inefficient if key is invalid)
Definition: KeyedObjectManager.cpp:201
std::vector::begin
T begin(T... args)
std
STL namespace.
Containers::KeyedObjectManager::seq_type
std::vector< void * > seq_type
Definition: KeyedObjectManager.h:57
std::vector::end
T end(T... args)
IOTest.end
end
Definition: IOTest.py:125
ManySmallAlgs.seq
seq
Definition: ManySmallAlgs.py:102
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
ProduceConsume.key
key
Definition: ProduceConsume.py:84
Containers::containerIsInconsistent
GAUDI_API void containerIsInconsistent()
Function to be called to indicate that the container is found to be inconsistent.
Definition: KeyedObjectManager.cpp:87
Containers::KeyedObjectManager::m_seq
seq_type * m_seq
Container holding array like container.
Definition: KeyedObjectManager.h:59
Containers::KeyedObjectManager::clear
void clear()
Clear content of the vector.
Definition: KeyedObjectManager.cpp:245