Interface for non-const operations on an auxiliary store. More...
#include <IAuxStore.h>
Public Member Functions | |
virtual void * | getData (auxid_t auxid, size_t size, size_t capacity)=0 |
Return the data vector for one aux data item. | |
virtual const SG::auxid_set_t & | getWritableAuxIDs () const =0 |
Return a set of identifiers for writable data items in this store. | |
virtual void | resize (size_t sz)=0 |
Change the size of all aux data vectors. | |
virtual void | reserve (size_t sz)=0 |
Change the capacity of all aux data vectors. | |
virtual void | shift (size_t pos, ptrdiff_t offs)=0 |
Shift the elements of the container. | |
virtual bool | setOption (auxid_t, const AuxDataOption &) |
Set an option for a given auxiliary variable. |
Interface for non-const operations on an auxiliary store.
virtual void* SG::IAuxStore::getData | ( | auxid_t | auxid, | |
size_t | size, | |||
size_t | capacity | |||
) | [pure virtual] |
Return the data vector for one aux data 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). |
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.
If the data item does not exist, it should be created and initialized to default values. size
and capacity
give the size for the new aux data item vector.
If the container is locked, throw an exception.
Implemented in SG::AuxStoreInternal.
virtual const SG::auxid_set_t& SG::IAuxStore::getWritableAuxIDs | ( | ) | const [pure virtual] |
Return a set of identifiers for writable data items in this store.
This should include only non-const identifiers.
Implemented in SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::AuxInfoBase, xAOD::ShallowAuxContainer, xAOD::TAuxStore, and xAOD::ByteStreamAuxContainer_v1.
virtual void SG::IAuxStore::reserve | ( | size_t | sz | ) | [pure virtual] |
Change the capacity of all aux data vectors.
sz | The new capacity. |
This should be called when the capacity of the container changes (by reserve
). This should change the capacity for the vectors for all aux data items.
Implemented in SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::AuxInfoBase, xAOD::ShallowAuxContainer, xAOD::TAuxStore, and xAOD::ByteStreamAuxContainer_v1.
virtual void SG::IAuxStore::resize | ( | size_t | sz | ) | [pure virtual] |
Change the size of all aux data vectors.
sz | The new size. |
This should be called when the size of the container changes. This should resize the vectors for all aux data items.
If the size of the container grows, the new elements should be default-initialized; if it shrinks, destructors should be run as appropriate.
Implemented in SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::AuxInfoBase, xAOD::ShallowAuxContainer, xAOD::TAuxStore, and xAOD::ByteStreamAuxContainer_v1.
virtual bool SG::IAuxStore::setOption | ( | auxid_t | , | |
const AuxDataOption & | ||||
) | [inline, virtual] |
Set an option for a given auxiliary variable.
auxid | The identifier of the desired aux data item. | |
option | The option to set. |
The interpretation of the option depends on the particular representation of the variable.
Returns true if the option setting was successful; false otherwise.
Reimplemented in SG::AuxStoreInternal.
virtual void SG::IAuxStore::shift | ( | size_t | pos, | |
ptrdiff_t | offs | |||
) | [pure virtual] |
Shift the elements of the container.
pos | The starting index for the shift. | |
offs | The (signed) amount of the shift. |
This operation shifts the elements in the vectors for all aux data items, to implement an insertion or deletion. offs
may be either positive or negative.
If offs
is positive, then the container is growing. The container size should be increased by offs
, the element at pos
moved to pos
+ offs
, and similarly for following elements. The elements between pos
and pos
+ offs
should be default-initialized.
If offs
is negative, then the container is shrinking. The element at pos
should be moved to pos
+ offs
, and similarly for following elements. The container should then be shrunk by -offs
elements (running destructors as appropriate).
Implemented in SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::AuxInfoBase, xAOD::ShallowAuxContainer, xAOD::TAuxStore, and xAOD::ByteStreamAuxContainer_v1.