| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

KeyedObjectManager.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_KEYEDOBJECTMANAGER_H
2 #define GAUDIKERNEL_KEYEDOBJECTMANAGER_H
3
4 // Framework include files
5 #include "GaudiKernel/ClassID.h"
6 #include "GaudiKernel/Kernel.h"
7 #include "GaudiKernel/KeyedTraits.h"
8
9 // STL includes
10 #include <vector>
11
12 // Forward declarations
13 class ObjectContainerBase;
14 class ContainedObject;
15
18 namespace Containers
19 {
20
22 typedef long ( *MANIPULATOR )( void* );
24 struct GAUDI_API hashmap;
26 struct GAUDI_API map;
28 struct GAUDI_API array;
30 struct GAUDI_API vector;
31
45 template <class SETUP>
46 class GAUDI_API KeyedObjectManager
47 {
48 private:
49 typedef std::vector<void*> seq_type;
51 seq_type* m_seq;
53 mutable long m_direct;
54 mutable long m_keyCtxt;
55 union {
57 char buffer[128];
58 SETUP* s;
59 } m_setup;
60
62 void onDirty() const;
63
64 public:
66 KeyedObjectManager();
67 KeyedObjectManager( KeyedObjectManager&& other );
69 virtual ~KeyedObjectManager();
71 void clearDirect();
73 long insertDirect( ObjectContainerBase* b, ContainedObject* c, void* o, long k );
75 long isDirect() const { return m_direct; }
77 void* object( long key ) const;
79 long insert( ObjectContainerBase* b, ContainedObject* c, void* o, long* k );
81 long insert( ObjectContainerBase* b, ContainedObject* c, void* o, long k );
83 void* erase( long key, const void* obj );
85 long erase( seq_type::iterator beg, seq_type::iterator end );
87 void reserve( long size );
89 void clear();
91 void setup( void* seq, void** rndm );
93 static CLID classID();
94 };
95
97 typedef KeyedObjectManager<map> Map;
99 typedef KeyedObjectManager<hashmap> HashMap;
101 typedef KeyedObjectManager<vector> Vector;
103 typedef KeyedObjectManager<array> Array;
104 }
105 #endif // GAUDIKERNEL_KEYEDOBJECTMANAGER_H
ClassID.h
Kernel.h
gaudirun.c
c
Definition: gaudirun.py:407
KeyedTraits.h
Gaudi::Functional::details::insert
constexpr struct Gaudi::Functional::details::insert_t insert
Containers::KeyedObjectManager::s
SETUP * s
Definition: KeyedObjectManager.h:58
Containers
Containers namespace.
Definition: KeyedObjectManager.h:18
Containers::array
Definition: KeyedObjectManager.cpp:36
Containers::hashmap
Definition: KeyedObjectManager.cpp:12
Containers::Vector
KeyedObjectManager< vector > Vector
Forward declaration of specialized std::vector-like object manager.
Definition: KeyedObjectManager.h:101
Containers::KeyedObjectManager::m_keyCtxt
long m_keyCtxt
Definition: KeyedObjectManager.h:54
SequentialAlgSequencerTest.seq
seq
Definition: SequentialAlgSequencerTest.py:76
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:64
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
Containers::KeyedObjectManager::seq_type
std::vector< void * > seq_type
Definition: KeyedObjectManager.h:49
Containers::MANIPULATOR
long(* MANIPULATOR)(void *)
Object manipulator type definition.
Definition: KeyedObjectManager.h:22
ContainedObject
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
Definition: ContainedObject.h:31
std::vector< void * >
Containers::map
Definition: KeyedObjectManager.cpp:24
Containers::vector
Definition: KeyedObjectManager.cpp:54
Containers::HashMap
KeyedObjectManager< hashmap > HashMap
Forward declaration of specialized std::hashmap-like object manager.
Definition: KeyedObjectManager.h:99
Containers::KeyedObjectManager
KeyedObjectManager Class to manage keyed objects.
Definition: KeyedObjectManager.h:46
Containers::KeyedObjectManager::isDirect
long isDirect() const
Check if the container is dirty.
Definition: KeyedObjectManager.h:75
ObjectContainerBase
ObjectContainerBase is the base class for Gaudi container classes.
Definition: ObjectContainerBase.h:19
Containers::Array
KeyedObjectManager< array > Array
Forward declaration of specialized redirection array object manager.
Definition: KeyedObjectManager.h:103
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
Containers::Map
KeyedObjectManager< map > Map
Forward declaration of specialized std::map-like object manager.
Definition: KeyedObjectManager.h:97
Containers::KeyedObjectManager::m_direct
long m_direct
Dirty flag.
Definition: KeyedObjectManager.h:53
Containers::KeyedObjectManager::m_seq
seq_type * m_seq
Container holding array like container.
Definition: KeyedObjectManager.h:51