ATLAS Offline Software
|
Aux store instance used to hold dynamic variables deserialized from the bytestream. More...
#include <TrigAuxStore.h>
Public Member Functions | |
TrigAuxStore () | |
bool | standalone () const |
Return the standalone flag. More... | |
virtual const void * | getData (SG::auxid_t auxid) const override |
Return the data vector for one aux data item. More... | |
virtual void * | getData (SG::auxid_t auxid, size_t size, size_t capacity) override |
Return the data vector for one aux data item. More... | |
virtual const void * | getData (SG::auxid_t auxid) const=0 |
Pick up the const version from the base class. More... | |
virtual const IAuxTypeVector * | getVector (SG::auxid_t auxid) const override |
Return vector interface for one aux data item. More... | |
virtual void * | getDecoration (auxid_t auxid, size_t size, size_t capacity) override |
Return the data vector for one aux data decoration item. More... | |
virtual bool | resize (size_t sz) override |
Change the size of all aux data vectors. More... | |
virtual void | reserve (size_t sz) override |
Change the capacity of all aux data vectors. More... | |
virtual void | shift (size_t pos, ptrdiff_t offs) override |
Shift the elements of the container. More... | |
virtual bool | insertMove (size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore=SG::auxid_set_t(0)) override |
Move all elements from other to this store. More... | |
virtual const SG::auxid_set_t & | getAuxIDs () const override |
Return a set of identifiers for existing data items in this store. More... | |
virtual const SG::auxid_set_t & | getDecorIDs () const override |
Return a set of identifiers for decorations in this store. More... | |
virtual bool | isDecoration (auxid_t auxid) const override |
Test if a particular variable is tagged as a decoration. More... | |
virtual const SG::auxid_set_t & | getWritableAuxIDs () const override |
Return a set of identifiers for writable data items in this store. More... | |
virtual const void * | getIOData (SG::auxid_t auxid) const override |
Return a pointer to the data to be stored for one aux data item. More... | |
virtual const std::type_info * | getIOType (SG::auxid_t auxid) const override |
Return the type of the data to be stored for one aux data item. More... | |
virtual const SG::auxid_set_t & | getDynamicAuxIDs () const override |
Get the list of all variables that need to be handled. More... | |
virtual void | lock () override |
Lock the container. More... | |
virtual bool | clearDecorations () override |
Clear all decorations. More... | |
virtual size_t | size () const override |
Return the number of elements in the store. More... | |
virtual bool | setOption (auxid_t id, const AuxDataOption &option) override |
Set an option for an auxiliary data variable. More... | |
virtual void | lockDecoration (SG::auxid_t auxid) override |
Lock a decoration. More... | |
virtual IAuxTypeVector * | linkedVector (SG::auxid_t auxid) override |
Return interface for a linked variable. More... | |
virtual const IAuxTypeVector * | linkedVector (SG::auxid_t auxid) const override |
Return interface for a linked variable. More... | |
virtual const IAuxTypeVector * | linkedVector (SG::auxid_t) const |
Return interface for a linked variable. More... | |
virtual SG::auxid_set_t | getSelectedAuxIDs () const |
Get a list of dynamic variables that need to be written out. More... | |
Static Public Attributes | |
static constexpr bool | supportsThinning = true |
Mark that this type supports thinning operations. More... | |
Protected Member Functions | |
const void * | getIODataInternal (auxid_t auxid, bool quiet) const |
Return a pointer to the data to be stored for one aux data item. More... | |
void * | getIODataInternal (auxid_t auxid, bool quiet) |
Return a pointer to the data to be stored for one aux data item. More... | |
void | addAuxID (auxid_t auxid) |
Add a new auxid to the set of those being managed by this store. More... | |
virtual void * | getDataInternal (SG::auxid_t auxid, size_t size, size_t capacity, bool no_lock_check) |
Return the data vector for one aux data item. More... | |
void | addVector (std::unique_ptr< IAuxTypeVector > vec, bool isDecoration) |
Explicitly add a vector to the store. More... | |
Private Types | |
typedef AthContainers_detail::mutex | mutex_t |
Mutex used to synchronize modifications to the cache vector. More... | |
typedef AthContainers_detail::lock_guard< mutex_t > | guard_t |
Private Member Functions | |
virtual IAuxTypeVector * | getVectorInternal_noLock (SG::auxid_t auxid, size_t size, size_t capacity, bool no_lock_check) |
Implementation of getVectorInternal; no locking. More... | |
size_t | size_noLock () const |
Return the number of elements in the store; no locking. More... | |
Private Attributes | |
bool | m_standalone |
Are we being written in standalone mode? More... | |
std::vector< std::unique_ptr< IAuxTypeVector > > | m_vecs |
The collection of vectors of aux data that we're managing, indexed by auxid . More... | |
SG::auxid_set_t | m_decorations |
Record which variables are decorations. More... | |
SG::auxid_set_t | m_auxids |
Set of auxid's for which we've created a vector. More... | |
bool | m_locked |
Has this container been locked? More... | |
mutex_t | m_mutex |
Aux store instance used to hold dynamic variables deserialized from the bytestream.
This is just AuxStoreInternal except that we make the addVector
method available to allow adding vector instances to the store.
Definition at line 34 of file TrigAuxStore.h.
|
privateinherited |
Definition at line 461 of file AuxStoreInternal.h.
|
privateinherited |
Mutex used to synchronize modifications to the cache vector.
Definition at line 460 of file AuxStoreInternal.h.
|
inline |
Definition at line 38 of file TrigAuxStore.h.
|
protectedinherited |
Add a new auxid to the set of those being managed by this store.
auxid | The auxid to add. |
Definition at line 676 of file AuxStoreInternal.cxx.
|
protectedinherited |
Explicitly add a vector to the store.
vec | Vector data being added. |
isDecoration | Should this variable be marked as a decoration? |
For internal use. The auxid
must not already exist in the store.
Definition at line 144 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Clear all decorations.
Erase all decorations from the store, restoring the state to when lock
was called. Be sure to clear the cache of the referencing container!
Returns true if there were any decorations that were cleared, false if the store did not contain any decorations.
Implements SG::IConstAuxStore.
Definition at line 581 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Return a set of identifiers for existing data items in this store.
This should include identifiers for all items, const and non-const.
Implements SG::IConstAuxStore.
Definition at line 400 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
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 nullptr if the item doesn't exist.
Implements SG::IConstAuxStore.
Reimplemented in APRTest::AuxStore, and RootAuxDynStore.
Definition at line 83 of file AuxStoreInternal.cxx.
|
inherited |
Pick up the const version from the base class.
|
overridevirtualinherited |
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.
Implements SG::IAuxStore.
Reimplemented in APRTest::AuxStore, and RootAuxDynStore.
Definition at line 130 of file AuxStoreInternal.cxx.
|
protectedvirtualinherited |
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). |
no_lock_check | If true, then skip the test for a locked container. |
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.
Definition at line 735 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
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). |
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 then it will be created and initialized with default values. If the container is locked, then the new item will be marked as a decoration. size
and capacity
give the size for the new aux data item vector.
If the data item already exists, then we return it if either the container is not locked or the item is marked as a decoration. Otherwise we throw an exception.
Implements SG::IConstAuxStore.
Reimplemented in RootAuxDynStore.
Definition at line 198 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Return a set of identifiers for decorations in this store.
Implements SG::IConstAuxStore.
Definition at line 410 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Get the list of all variables that need to be handled.
Implements SG::IAuxStoreIO.
Definition at line 552 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Return a pointer to the data to be stored for one aux data item.
auxid | The identifier of the desired aux data item. |
This will usually be a pointer to a std::vector
; however, it may be something different for a standalone object.
Returns 0 and reports an error if the requested aux data item does not exist.
Implements SG::IAuxStoreIO.
Reimplemented in RootAuxDynStore.
Definition at line 515 of file AuxStoreInternal.cxx.
|
protectedinherited |
Return a pointer to the data to be stored for one aux data item.
auxid | The identifier of the desired aux data item. |
quiet | If true, then don't print an error on failure. |
This will usually be a pointer to a std::vector
; however, it may be something different for a standalone object.
Returns 0 and reports an error if the requested aux data item does not exist.
Definition at line 483 of file AuxStoreInternal.cxx.
|
protectedinherited |
Return a pointer to the data to be stored for one aux data item.
auxid | The identifier of the desired aux data item. |
quiet | If true, then don't print an error on failure. |
This will usually be a pointer to a std::vector
; however, it may be something different for a standalone object.
Returns 0 and reports an error if the requested aux data item does not exist.
Definition at line 450 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Return the type of the data to be stored for one aux data item.
auxid | The identifier of the desired aux data item. |
For an aux data item of type T
, this will usually be std::vector<T>
. For standalone objects, however, it will usually be T
; and std::vector<char>
will be used instead of std::vector<bool>
.
Returns 0 if the requested aux data item does not exist.
Implements SG::IAuxStoreIO.
Definition at line 532 of file AuxStoreInternal.cxx.
|
inlinevirtualinherited |
Get a list of dynamic variables that need to be written out.
Reimplemented in xAOD::TAuxStore, xAOD::AuxContainerBase, xAOD::ShallowAuxContainer, xAOD::AuxInfoBase, and xAOD::RAuxStore.
Definition at line 86 of file IAuxStoreIO.h.
|
overridevirtualinherited |
Return vector interface for one aux data item.
auxid | The identifier of the desired aux data item. |
This should return nullptr if the item doesn't exist.
Implements SG::IConstAuxStore.
Reimplemented in RootAuxDynStore.
Definition at line 99 of file AuxStoreInternal.cxx.
|
privatevirtualinherited |
Implementation of getVectorInternal; no locking.
Definition at line 684 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Return a set of identifiers for writable data items in this store.
This should include only non-const identifiers.
Implements SG::IAuxStore.
Definition at line 433 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Move all elements from other
to this store.
pos | The starting index of the insertion. |
other | Store from which to do the move. |
ignore | Set of variables that should not be added to the store. |
Let len
be the size of other
. The store will be increased in size by len
elements, with the elements at pos
being copied to pos+len
. Then, for each auxiliary variable, the entire contents of that variable for other
will be moved to this store at index pos
. This will be done via move semantics if possible; otherwise, it will be done with a copy. Variables present in this store but not in other
will have the corresponding elements default-initialized. Variables in other
but not in this store will be added unless they are in ignore
.
Returns true if it is known that none of the vectors' memory moved, false otherwise.
Implements SG::IAuxStore.
Definition at line 332 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Test if a particular variable is tagged as a decoration.
auxid | The identifier of the desired aux data item. |
Implements SG::IConstAuxStore.
Reimplemented in RootAuxDynStore.
Definition at line 420 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Return interface for a linked variable.
auxid | The ID of the parent variable. |
If auxid
has a linked variable, then return the IAuxTypeVector
describing it. Otherwise, return nullptr
. May return nullptr
unconditionally if this store does not support linked variables.
Reimplemented from SG::IConstAuxStore.
Definition at line 789 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Return interface for a linked variable.
auxid | The ID of the parent variable. |
If auxid
has a linked variable, then return the IAuxTypeVector
describing it. Otherwise, return nullptr
. May return nullptr
unconditionally if this store does not support linked variables.
Reimplemented from SG::IAuxStore.
Definition at line 769 of file AuxStoreInternal.cxx.
|
inlineinherited |
Return interface for a linked variable.
auxid | The ID of the parent variable. |
If auxid
has a linked variable, then return the IAuxTypeVector
describing it. Otherwise, return nullptr
. May return nullptr
unconditionally if this store does not support linked variables.
Definition at line 189 of file IConstAuxStore.h.
|
overridevirtualinherited |
Lock the container.
After this, only decorations can be changed/modified. If the container is already locked, this is a no-op.
Implements SG::IConstAuxStore.
Definition at line 564 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Lock a decoration.
auxid | Identifier of the decoration to lock. |
A decoration is locked by changing from a decoration to an ordinary variable. If the container itself is locked, then modifications to the variable are not permitted after this call.
Implements SG::IConstAuxStore.
Definition at line 753 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
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.
Implements SG::IAuxStore.
Definition at line 267 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
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.
Should return true
if it is known that none of the data pointers changed (and thus the cache does not need to be cleared), false otherwise.
Implements SG::IAuxStore.
Definition at line 243 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Set an option for an auxiliary data variable.
id | The variable for which we want to set the option. |
option | The option setting to make. |
The interpretation of option
depends on the associated auxiliary store. See PackedParameters.h for option settings for writing packed data. Returns true
on success, false
otherwise.
Reimplemented from SG::IAuxStore.
Definition at line 636 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
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).
Implements SG::IAuxStore.
Definition at line 301 of file AuxStoreInternal.cxx.
|
overridevirtualinherited |
Return the number of elements in the store.
May return 0 for a store with no aux data.
Implements SG::IConstAuxStore.
Reimplemented in RootAuxDynStore, and APRTest::AuxStore.
Definition at line 602 of file AuxStoreInternal.cxx.
|
privateinherited |
Return the number of elements in the store; no locking.
Return the number of elements in the store.
(No locking.)
May return 0 for a store with no aux data.
Definition at line 614 of file AuxStoreInternal.cxx.
|
inherited |
Return the standalone flag.
Definition at line 67 of file AuxStoreInternal.cxx.
|
privateinherited |
Set of auxid's
for which we've created a vector.
Definition at line 454 of file AuxStoreInternal.h.
|
privateinherited |
Record which variables are decorations.
Definition at line 451 of file AuxStoreInternal.h.
|
privateinherited |
Has this container been locked?
Definition at line 457 of file AuxStoreInternal.h.
|
mutableprivateinherited |
Definition at line 462 of file AuxStoreInternal.h.
|
privateinherited |
Are we being written in standalone mode?
Definition at line 444 of file AuxStoreInternal.h.
|
privateinherited |
The collection of vectors of aux data that we're managing, indexed by auxid
.
Definition at line 448 of file AuxStoreInternal.h.
|
staticconstexprinherited |
Mark that this type supports thinning operations.
See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.
Definition at line 199 of file IAuxStore.h.