![]() |
ATLAS Offline Software
|
IConstAuxStore implementation referencing external buffers. More...
#include <AuxStoreConstMem.h>
Public Member Functions | |
| AuxStoreConstMem (size_t size) | |
| Constructor. | |
| void | addBuffer (SG::auxid_t auxid, const void *buf) |
| Add a new, external buffer. | |
| virtual const void * | getData (SG::auxid_t auxid) const override |
| Return the data vector for one aux data item. | |
| virtual const IAuxTypeVector * | getVector (SG::auxid_t) const override |
| Return vector interface for one aux data item. | |
| virtual void * | getDecoration (auxid_t auxid, size_t size, size_t capacity) override |
| Return the data vector for one aux data decoration item. | |
| virtual const SG::auxid_set_t & | getAuxIDs () const override |
| Return a set of identifiers for existing data items in this store. | |
| virtual const SG::auxid_set_t & | getDecorIDs () const override |
| Return a set of identifiers for decorations in this store. | |
| virtual SG::auxid_set_t | getCopyIDs (bool warnUnlocked=false) const override |
| Return the set of variables to copy in a deep copy. | |
| virtual bool | isDecoration (auxid_t auxid) const override |
| Test if a particular variable is tagged as a decoration. | |
| virtual void | lock () override |
| Lock the container. | |
| virtual bool | clearDecorations () override |
| Clear all decorations. | |
| virtual size_t | size () const override |
| Return the number of elements in the store. | |
| virtual void | lockDecoration (SG::auxid_t auxid) override |
| Lock a decoration. | |
Private Attributes | |
| size_t | m_size |
| std::vector< const void * > | m_buffers |
| SG::auxid_set_t | m_auxids |
Set of auxid's for which we've added a buffer. | |
IConstAuxStore implementation referencing external buffers.
This is an implementation of IConstAuxStore that, rather than managing memory itself, simply holds references to buffers managed externally.
You need to specify the number of elements when you create the object. Then call addBuffer for each auxiliary variable to be managed, passing the auxid and the buffer.
This class assumes the managed data is strictly const, and hence makes no attempt to implement decorations.
Definition at line 36 of file AuxStoreConstMem.h.
| SG::AuxStoreConstMem::AuxStoreConstMem | ( | size_t | size | ) |
Constructor.
| size | The number of elements in the container. |
Definition at line 23 of file AuxStoreConstMem.cxx.
| void SG::AuxStoreConstMem::addBuffer | ( | SG::auxid_t | auxid, |
| const void * | buf ) |
Add a new, external buffer.
| auxid | The identifier of the aux data item. |
| buf | Pointer to the start of the buffer for the variable. |
The actual type of the data pointed to must match the registered type of auxid; no checking is done.
This method is not compatible with any other accesses to this object in other threads.
Definition at line 40 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Clear all decorations.
This is a no-op for this (const) class. Always returns false.
Definition at line 162 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Return a set of identifiers for existing data items in this store.
This should include identifiers for all items, const and non-const.
Definition at line 103 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Return the set of variables to copy in a deep copy.
| warnUnlocked | If true, we warn about variables skipped on account of being decorations. |
This just returns getAuxIDs().
Definition at line 127 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Return the data vector for one aux data item.
| auxid | The identifier of the desired aux data item. |
Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.
This should return 0 if the item doesn't exist.
Definition at line 59 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Return the data vector for one aux data decoration item.
| auxid | The identifier of the desired aux data item. |
| size | The current size of the container (in case the data item does not already exist). |
| capacity | The current capacity of the container (in case the data item does not already exist). |
This always returns null for this (const) class.
Definition at line 90 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Return a set of identifiers for decorations in this store.
Definition at line 112 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Return vector interface for one aux data item.
| auxid | The identifier of the desired aux data item. |
Unimplemented for this implementation.
Definition at line 74 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Test if a particular variable is tagged as a decoration.
| auxid | The identifier of the desired aux data item. |
This always returns false for this (const) class.
Definition at line 139 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Lock the container.
After this, only decorations can be changed/modified.
This is a no-op for this (const) class.
Definition at line 152 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Lock a decoration.
| auxid | Identifier of the decoration to lock. |
This is a no-op for this (const) class.
Definition at line 185 of file AuxStoreConstMem.cxx.
|
overridevirtual |
Return the number of elements in the store.
May return 0 for a store with no aux data.
Definition at line 173 of file AuxStoreConstMem.cxx.
|
private |
Set of auxid's for which we've added a buffer.
Definition at line 172 of file AuxStoreConstMem.h.
|
private |
Definition at line 169 of file AuxStoreConstMem.h.
|
private |
Definition at line 168 of file AuxStoreConstMem.h.