| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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();
65 KeyedObjectManager(KeyedObjectManager&& other);
67 virtual ~KeyedObjectManager();
69 void clearDirect();
71 long insertDirect(ObjectContainerBase* b,ContainedObject* c,void* o, long k);
73 long isDirect() const { return m_direct; }
75 void* object(long key) const;
77 long insert(ObjectContainerBase* b,ContainedObject* c,void* o, long* k);
79 long insert(ObjectContainerBase* b,ContainedObject* c,void* o,long k);
81 void* erase(long key, const void* obj);
83 long erase(seq_type::iterator beg, seq_type::iterator end);
85 void reserve(long size);
87 void clear();
89 void setup(void* seq, void** rndm);
91 static CLID classID();
92 };
93
95 typedef KeyedObjectManager< map > Map;
97 typedef KeyedObjectManager< hashmap > HashMap;
99 typedef KeyedObjectManager< vector > Vector;
101 typedef KeyedObjectManager< array > Array;
102 }
103 #endif // GAUDIKERNEL_KEYEDOBJECTMANAGER_H
ClassID.h
Kernel.h
Containers::Array
KeyedObjectManager< array > Array
Forward declaration of specialized redirection array object manager.
Definition: KeyedObjectManager.h:101
gaudirun.c
c
Definition: gaudirun.py:391
KeyedTraits.h
Gaudi::Functional::details::insert
constexpr struct Gaudi::Functional::details::insert_t insert
Containers::Vector
KeyedObjectManager< vector > Vector
Forward declaration of specialized std::vector-like object manager.
Definition: KeyedObjectManager.h:99
Containers::KeyedObjectManager::s
SETUP * s
Definition: KeyedObjectManager.h:56
Containers
Containers namespace.
Definition: KeyedObjectManager.h:18
Containers::array
Definition: KeyedObjectManager.cpp:33
Containers::hashmap
Definition: KeyedObjectManager.cpp:11
Containers::KeyedObjectManager::m_keyCtxt
long m_keyCtxt
Definition: KeyedObjectManager.h:52
SequentialAlgSequencerTest.seq
seq
Definition: SequentialAlgSequencerTest.py:77
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:50
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:22
Containers::HashMap
KeyedObjectManager< hashmap > HashMap
Forward declaration of specialized std::hashmap-like object manager.
Definition: KeyedObjectManager.h:97
Containers::vector
Definition: KeyedObjectManager.cpp:50
Containers::KeyedObjectManager
KeyedObjectManager Class to manage keyed objects.
Definition: KeyedObjectManager.h:45
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:73
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:95
Containers::KeyedObjectManager::m_seq
seq_type * m_seq
Container holding array like container.
Definition: KeyedObjectManager.h:49