| The Gaudi Framework v27r1

- 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/Kernel.h"
6 #include "GaudiKernel/ClassID.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
21 typedef long (*MANIPULATOR)(void*);
23 struct GAUDI_API hashmap;
25 struct GAUDI_API map;
27 struct GAUDI_API array;
29 struct GAUDI_API vector;
30
44 template <class SETUP>
45 class GAUDI_API KeyedObjectManager {
46 private:
47 typedef std::vector<void*> seq_type;
49 seq_type* m_seq;
51 mutable long m_direct;
52 mutable long m_keyCtxt;
53 union {
55 char buffer[128];
56 SETUP* s;
57 } m_setup;
58
60 void onDirty() const;
61
62 public:
64 KeyedObjectManager();
66 virtual ~KeyedObjectManager();
68 void clearDirect();
70 long insertDirect(ObjectContainerBase* b,ContainedObject* c,void* o, long k);
72 long isDirect() const { return m_direct; }
74 void* object(long key) const;
76 long insert(ObjectContainerBase* b,ContainedObject* c,void* o, long* k);
78 long insert(ObjectContainerBase* b,ContainedObject* c,void* o,long k);
80 void* erase(long key, const void* obj);
82 long erase(seq_type::iterator beg, seq_type::iterator end);
84 void reserve(long size);
86 void clear();
88 void setup(void* seq, void** rndm);
90 static CLID classID();
91 };
92
94 typedef KeyedObjectManager< map > Map;
96 typedef KeyedObjectManager< hashmap > HashMap;
98 typedef KeyedObjectManager< vector > Vector;
100 typedef KeyedObjectManager< array > Array;
101 }
102 #endif // GAUDIKERNEL_KEYEDOBJECTMANAGER_H
ClassID.h
Kernel.h
Containers::Array
KeyedObjectManager< array > Array
Forward declaration of specialized redirection array object manager.
Definition: KeyedObjectManager.h:100
KeyedTraits.h
gaudirun.c
tuple c
Definition: gaudirun.py:391
Containers::Vector
KeyedObjectManager< vector > Vector
Forward declaration of specialized std::vector-like object manager.
Definition: KeyedObjectManager.h:98
Containers::KeyedObjectManager::s
SETUP * s
Definition: KeyedObjectManager.h:56
Containers
Containers namespace.
Definition: KeyedObjectManager.h:18
Containers::array
Definition: KeyedObjectManager.cpp:29
Containers::hashmap
Definition: KeyedObjectManager.cpp:11
Containers::KeyedObjectManager::m_keyCtxt
long m_keyCtxt
Definition: KeyedObjectManager.h:52
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:47
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
Containers::KeyedObjectManager::seq_type
std::vector< void * > seq_type
Definition: KeyedObjectManager.h:47
ContainedObject
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
Definition: ContainedObject.h:29
std::vector< void * >
Containers::map
Definition: KeyedObjectManager.cpp:20
Containers::HashMap
KeyedObjectManager< hashmap > HashMap
Forward declaration of specialized std::hashmap-like object manager.
Definition: KeyedObjectManager.h:96
Containers::vector
Definition: KeyedObjectManager.cpp:44
Containers::KeyedObjectManager
KeyedObjectManager Class to manage keyed objects.
Definition: KeyedObjectManager.h:45
AtomicAlgSequencerTest.seq
tuple seq
Definition: AtomicAlgSequencerTest.py:78
Containers::MANIPULATOR
long(* MANIPULATOR)(void *)
Object manipulator type definition.
Definition: KeyedObjectManager.h:21
Containers::KeyedObjectManager::isDirect
long isDirect() const
Check if the container is dirty.
Definition: KeyedObjectManager.h:72
ObjectContainerBase
ObjectContainerBase is the base class for Gaudi container classes.
Definition: ObjectContainerBase.h:19
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
Containers::KeyedObjectManager::m_direct
long m_direct
Dirty flag.
Definition: KeyedObjectManager.h:51
Containers::Map
KeyedObjectManager< map > Map
Forward declaration of specialized std::map-like object manager.
Definition: KeyedObjectManager.h:94
Containers::KeyedObjectManager::m_seq
seq_type * m_seq
Container holding array like container.
Definition: KeyedObjectManager.h:49