ATLAS Offline Software
|
Shallow copy for the auxiliary store of standalone objects. More...
#include <ShallowAuxInfo.h>
Public Types | |
typedef SG::auxid_t | auxid_t |
The aux ID type definition. More... | |
typedef SG::auxid_set_t | auxid_set_t |
The aux ID set type definition. More... | |
enum | AuxStoreType { AST_ObjectStore = 0, AST_ContainerStore = 1 } |
Type of the auxiliary store. More... | |
Public Member Functions | |
ShallowAuxInfo () | |
Default constructor. More... | |
ShallowAuxInfo (const DataLink< SG::IConstAuxStore > &parent) | |
Constructor with a parent object. More... | |
virtual AuxStoreType | getStoreType () const |
Return the type of the store object. More... | |
const DataLink< SG::IConstAuxStore > & | parent () const |
Get the parent store. More... | |
void | setParent (const DataLink< SG::IConstAuxStore > &link) |
Set the parent store. More... | |
bool | shallowIO () const |
Check whether only the overriden parameters will be written out or not. More... | |
void | setShallowIO (bool value) |
Set whether only the overriden parameters should be written out. More... | |
virtual const void * | getData (SG::auxid_t auxid) const=0 |
Pick up the const version from the base class. More... | |
virtual bool | insertMove (size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore=SG::auxid_set_t())=0 |
Move all elements from other to this store. More... | |
virtual bool | setOption (auxid_t, const AuxDataOption &) |
Set an option for a given auxiliary variable. More... | |
virtual IAuxTypeVector * | linkedVector (SG::auxid_t) |
virtual const IAuxTypeVector * | linkedVector (SG::auxid_t) const |
Return interface for a linked variable. More... | |
virtual const IAuxTypeVector * | linkedVector (SG::auxid_t) const |
Return interface for a linked variable. More... | |
Functions implementing the SG::IConstAuxStore interface | |
virtual const void * | getData (auxid_t auxid) const override |
Get a pointer to a given array. More... | |
virtual const SG::IAuxTypeVector * | getVector (SG::auxid_t auxid) const override final |
Return vector interface for one aux data item. More... | |
virtual const auxid_set_t & | getAuxIDs () const override |
Get the types(names) of variables handled by this container. More... | |
virtual const auxid_set_t & | getDecorIDs () const override |
Get the types(names) of decorations handled by this container. More... | |
virtual bool | isDecoration (auxid_t auxid) const override |
Test if a variable is a decoration. 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 void | lock () override |
Lock the container. More... | |
virtual bool | clearDecorations () override |
Clear all decorations. More... | |
virtual size_t | size () const override |
Get the size of the container. More... | |
virtual void | lockDecoration (SG::auxid_t auxid) override |
Lock a decoration. More... | |
Functions implementing the SG::IAuxStore interface | |
virtual void * | getData (auxid_t auxid, size_t size, size_t capacity) override |
Get a pointer to a given array, creating the array if necessary. More... | |
virtual const auxid_set_t & | getWritableAuxIDs () const override |
Return a set of writable data identifiers. More... | |
virtual bool | resize (size_t size) override |
Resize the arrays to a given size. More... | |
virtual void | reserve (size_t size) override |
Reserve a given size for the arrays. More... | |
virtual void | shift (size_t pos, ptrdiff_t offs) override |
Shift the contents of the stored arrays. More... | |
virtual bool | insertMove (size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override |
Insert contents of another store via move. More... | |
Functions implementing the SG::IAuxStoreIO interface | |
virtual const void * | getIOData (auxid_t auxid) const override |
Get a pointer to the data being stored for one aux data item. More... | |
virtual const std::type_info * | getIOType (auxid_t auxid) const override |
Return the type of the data to be stored for one aux data item. More... | |
virtual const auxid_set_t & | getDynamicAuxIDs () const override |
Get the types(names) of variables created dynamically. More... | |
virtual auxid_set_t | getSelectedAuxIDs () const override |
Get the IDs of the selected dynamic Aux variables (for writing) More... | |
Functions managing the instance name of the container | |
const char * | name () const |
Get the name of the container instance. More... | |
void | setName (const char *name) |
Set the name of the container instance. More... | |
Functions implementing the SG::IAuxStoreHolder interface | |
virtual SG::IAuxStore * | getStore () override |
Get the currently used internal store object. More... | |
virtual const SG::IAuxStore * | getStore () const override |
virtual void | setStore (SG::IAuxStore *store) override |
Set a different internal store object. More... | |
Functions implementing the SG::IConstAuxStore interface | |
virtual const void * | getData (auxid_t auxid) const override |
Get a pointer to a given array. More... | |
virtual const SG::IAuxTypeVector * | getVector (SG::auxid_t auxid) const override final |
Return vector interface for one aux data item. More... | |
virtual const auxid_set_t & | getAuxIDs () const override |
Get the types(names) of variables handled by this container. More... | |
virtual const auxid_set_t & | getDecorIDs () const override |
Get the types(names) of decorations handled by this container. More... | |
virtual bool | isDecoration (auxid_t auxid) const override |
Test if a variable is a decoration. 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 void | lock () override |
Lock the container. More... | |
virtual bool | clearDecorations () override |
Clear all decorations. More... | |
virtual size_t | size () const override |
Get the size of the container. More... | |
virtual void | lockDecoration (SG::auxid_t auxid) override |
Lock a decoration. More... | |
Functions implementing the SG::IAuxStore interface | |
virtual void * | getData (auxid_t auxid, size_t size, size_t capacity) override |
Get a pointer to a given array, creating the array if necessary. More... | |
virtual const auxid_set_t & | getWritableAuxIDs () const override |
Return a set of writable data identifiers. More... | |
virtual bool | resize (size_t size) override |
Resize the arrays to a given size. More... | |
virtual void | reserve (size_t size) override |
Reserve a given size for the arrays. More... | |
virtual void | shift (size_t pos, ptrdiff_t offs) override |
Shift the contents of the stored arrays. More... | |
virtual bool | insertMove (size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override |
Insert contents of another store via move. More... | |
Functions implementing the SG::IAuxStoreIO interface | |
virtual const void * | getIOData (auxid_t auxid) const override |
Get a pointer to the data being stored for one aux data item. More... | |
virtual const std::type_info * | getIOType (auxid_t auxid) const override |
Return the type of the data to be stored for one aux data item. More... | |
virtual const auxid_set_t & | getDynamicAuxIDs () const override |
Get the types(names) of variables created dynamically. More... | |
virtual auxid_set_t | getSelectedAuxIDs () const override |
Get the IDs of the selected dynamic Aux variables (for writing) More... | |
Functions managing the instance name of the container | |
const char * | name () const |
Get the name of the container instance. More... | |
void | setName (const char *name) |
Set the name of the container instance. More... | |
Static Public Attributes | |
static constexpr bool | supportsThinning = false |
Flag that we should not use the xAOD aux store pool converter for this type. More... | |
Private Types | |
typedef AthContainers_detail::recursive_mutex | mutex_t |
Mutex for multithread synchronization. More... | |
typedef AthContainers_detail::lock_guard< mutex_t > | guard_t |
Private Member Functions | |
void | remakeAuxIDs () const |
Private Attributes | |
AuxSelection | m_selection |
Dynamic attributes selection implementation. More... | |
SG::IAuxStore * | m_store |
Internal dynamic auxiliary store object. More... | |
SG::IAuxStoreIO * | m_storeIO |
The IO interface to the internal auxiliary store. More... | |
bool | m_ownsStore |
Flag deciding if the object owns the dynamic store or not. More... | |
bool | m_locked |
Flag keeping track of whether this object is locked or not. More... | |
DataLink< SG::IConstAuxStore > | m_parentLink |
Link to the parent object. More... | |
const SG::IAuxStoreIO * | m_parentIO |
Optional pointer to the IO interface of the parent object. More... | |
bool | m_shallowIO |
Flag for whether to do "shallow IO" or not. More... | |
mutex_t | m_mutex |
auxid_set_t m_auxids | ATLAS_THREAD_SAFE |
auxid_set_t m_decorids | ATLAS_THREAD_SAFE |
bool m_auxidsValid | ATLAS_THREAD_SAFE |
std::string | m_name |
Name of the container in memory. Set externally. More... | |
Shallow copy for the auxiliary store of standalone objects.
The design of this is exactly the same as for the SG::AuxStoreInternal
- SG::AuxStoreStandalone
pair. All the code is in xAOD::ShallowAuxContainer
, this class is just a convenience shorthand for calling xAOD::ShallowAuxContainer(true)
in the code.
Definition at line 29 of file ShallowAuxInfo.h.
|
inherited |
The aux ID set type definition.
Definition at line 60 of file ShallowAuxContainer.h.
|
inherited |
The aux ID type definition.
Definition at line 58 of file ShallowAuxContainer.h.
|
privateinherited |
Definition at line 202 of file ShallowAuxContainer.h.
|
privateinherited |
Mutex for multithread synchronization.
Definition at line 201 of file ShallowAuxContainer.h.
|
inherited |
Type of the auxiliary store.
In the xAOD EDM we use auxiliary store objects in some cases to describe a single object, and in most cases to describe a container of objects. This enumeration declares which type the object implementing this interface is.
Enumerator | |
---|---|
AST_ObjectStore | The store describes a single object. |
AST_ContainerStore | The store describes a container. |
Definition at line 66 of file IAuxStoreHolder.h.
xAOD::ShallowAuxInfo::ShallowAuxInfo | ( | ) |
Default constructor.
Definition at line 12 of file ShallowAuxInfo.cxx.
xAOD::ShallowAuxInfo::ShallowAuxInfo | ( | const DataLink< SG::IConstAuxStore > & | parent | ) |
Constructor with a parent object.
Definition at line 17 of file ShallowAuxInfo.cxx.
|
overridevirtualinherited |
Clear all decorations.
Implements SG::IConstAuxStore.
Definition at line 374 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Get the types(names) of variables handled by this container.
Implements SG::IConstAuxStore.
Definition at line 227 of file ShallowAuxContainer.cxx.
Get a pointer to a given array.
Implements SG::IConstAuxStore.
Definition at line 187 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Get a pointer to a given array, creating the array if necessary.
Implements SG::IAuxStore.
Definition at line 393 of file ShallowAuxContainer.cxx.
|
inherited |
Pick up the const version from the base class.
|
overridevirtualinherited |
Return the data vector for one aux data decoration item.
Implements SG::IConstAuxStore.
Definition at line 258 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Get the types(names) of decorations handled by this container.
Implements SG::IConstAuxStore.
Definition at line 237 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Get the types(names) of variables created dynamically.
Implements SG::IAuxStoreIO.
Definition at line 563 of file ShallowAuxContainer.cxx.
Get a pointer to the data being stored for one aux data item.
Implements SG::IAuxStoreIO.
Definition at line 510 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Return the type of the data to be stored for one aux data item.
Implements SG::IAuxStoreIO.
Definition at line 536 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Get the IDs of the selected dynamic Aux variables (for writing)
Reimplemented from SG::IAuxStoreIO.
Definition at line 578 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Implements SG::IAuxStoreHolder.
Definition at line 154 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Get the currently used internal store object.
Implements SG::IAuxStoreHolder.
Definition at line 149 of file ShallowAuxContainer.cxx.
|
inlinevirtual |
Return the type of the store object.
Reimplemented from xAOD::ShallowAuxContainer.
Definition at line 43 of file ShallowAuxInfo.h.
|
finaloverridevirtualinherited |
Return vector interface for one aux data item.
Implements SG::IConstAuxStore.
Definition at line 196 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Return a set of writable data identifiers.
Implements SG::IAuxStore.
Definition at line 462 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Insert contents of another store via move.
Definition at line 493 of file ShallowAuxContainer.cxx.
|
pure virtualinherited |
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.
Implemented in SG::AuxStoreInternal.
Test if a variable is a decoration.
Implements SG::IConstAuxStore.
Definition at line 246 of file ShallowAuxContainer.cxx.
|
inlinevirtualinherited |
Reimplemented in SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::AuxInfoBase, and xAOD::TAuxStore.
Definition at line 187 of file IAuxStore.h.
|
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.
|
inlinevirtualinherited |
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 in SG::AuxStoreInternal, xAOD::TAuxStore, xAOD::AuxContainerBase, and xAOD::AuxInfoBase.
Definition at line 189 of file IConstAuxStore.h.
|
overridevirtualinherited |
|
overridevirtualinherited |
Lock a decoration.
Implements SG::IConstAuxStore.
Definition at line 353 of file ShallowAuxContainer.cxx.
Get the name of the container instance.
Definition at line 595 of file ShallowAuxContainer.cxx.
|
inherited |
Get the parent store.
Definition at line 117 of file ShallowAuxContainer.cxx.
|
privateinherited |
Definition at line 606 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Reserve a given size for the arrays.
Implements SG::IAuxStore.
Definition at line 479 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Resize the arrays to a given size.
Implements SG::IAuxStore.
Definition at line 469 of file ShallowAuxContainer.cxx.
Set the name of the container instance.
Definition at line 600 of file ShallowAuxContainer.cxx.
|
inlinevirtualinherited |
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 xAOD::AuxContainerBase, xAOD::AuxInfoBase, and SG::AuxStoreInternal.
Definition at line 173 of file IAuxStore.h.
|
inherited |
|
inherited |
Set whether only the overriden parameters should be written out.
Definition at line 137 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Set a different internal store object.
Implements SG::IAuxStoreHolder.
Definition at line 159 of file ShallowAuxContainer.cxx.
|
inherited |
Check whether only the overriden parameters will be written out or not.
Definition at line 132 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Shift the contents of the stored arrays.
Implements SG::IAuxStore.
Definition at line 486 of file ShallowAuxContainer.cxx.
|
overridevirtualinherited |
Get the size of the container.
Implements SG::IConstAuxStore.
Definition at line 360 of file ShallowAuxContainer.cxx.
|
mutableprivateinherited |
Definition at line 207 of file ShallowAuxContainer.h.
|
mutableprivateinherited |
Definition at line 208 of file ShallowAuxContainer.h.
|
mutableprivateinherited |
Definition at line 209 of file ShallowAuxContainer.h.
|
privateinherited |
Flag keeping track of whether this object is locked or not.
Definition at line 191 of file ShallowAuxContainer.h.
|
mutableprivateinherited |
Definition at line 203 of file ShallowAuxContainer.h.
|
privateinherited |
Name of the container in memory. Set externally.
Definition at line 212 of file ShallowAuxContainer.h.
|
privateinherited |
Flag deciding if the object owns the dynamic store or not.
Definition at line 189 of file ShallowAuxContainer.h.
|
privateinherited |
Optional pointer to the IO interface of the parent object.
Definition at line 196 of file ShallowAuxContainer.h.
|
privateinherited |
Link to the parent object.
Definition at line 194 of file ShallowAuxContainer.h.
|
privateinherited |
Dynamic attributes selection implementation.
Definition at line 182 of file ShallowAuxContainer.h.
|
privateinherited |
Flag for whether to do "shallow IO" or not.
Definition at line 198 of file ShallowAuxContainer.h.
|
privateinherited |
Internal dynamic auxiliary store object.
Definition at line 185 of file ShallowAuxContainer.h.
|
privateinherited |
The IO interface to the internal auxiliary store.
Definition at line 187 of file ShallowAuxContainer.h.
|
staticconstexpr |
Flag that we should not use the xAOD aux store pool converter for this type.
Definition at line 35 of file ShallowAuxInfo.h.