![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Internal data container for private store.
More...
|
const SG::IConstAuxStore * | getConstStore () const |
| Return the current store, as a const interface. More...
|
|
const DataLink< SG::IConstAuxStore > | getConstStoreLink () const |
| Return the data link to the current store, as a const interface. More...
|
|
SG::IAuxStore * | getStore () |
| Return the current store, as a non-const interface. More...
|
|
const SG::IAuxStore * | getStore () const |
| Return the current store, as a non-const interface. More...
|
|
bool | hasStore () const |
| Return true if this object has an associated store. More...
|
|
bool | hasNonConstStore () const |
| Return true if this object has an associated non-const store. More...
|
|
bool | setOption (auxid_t id, const AuxDataOption &option) |
| Set an option for an auxiliary data variable. More...
|
|
bool | setOption (const std::string &name, const AuxDataOption &option) |
| Set an option for an auxiliary data variable. More...
|
|
bool | setOption (const std::string &name, const std::string &clsname, const AuxDataOption &option) |
| Set an option for an auxiliary data variable. More...
|
|
template<class T > |
bool | setOption (auxid_t id, const std::string &optname, T arg) |
| Set an option for an auxiliary data variable. More...
|
|
bool | setOption (const std::string &name, const std::string &optname, int arg) |
| Set an option for an auxiliary data variable. More...
|
|
bool | setOption (const std::string &name, const std::string &optname, float arg) |
|
bool | setOption (const std::string &name, const std::string &optname, double arg) |
|
template<class T > |
bool | setOption (const std::string &name, const std::string &clsname, const std::string &optname, T arg) |
| Set an option for an auxiliary data variable. More...
|
|
void | setStore (SG::IAuxStore *store) |
| Set the store associated with this object. More...
|
|
void | setStore (const SG::IConstAuxStore *store) |
| Set the store associated with this object. More...
|
|
void | setStore (const DataLink< SG::IConstAuxStore > &store) |
| Set the store associated with this object. More...
|
|
void | setNonConstStore (SG::IAuxStore *store) |
| Set the store associated with this object. More...
|
|
|
Cache m_cache | ATLAS_THREAD_SAFE |
| Cached pointers to the start of aux data vectors, non-const. More...
|
|
Cache m_constCache | ATLAS_THREAD_SAFE |
| Cached pointers to the start of aux data vectors, const. More...
|
|
Cache m_decorCache | ATLAS_THREAD_SAFE |
| Cached pointers to the start of aux data vectors, decorations. More...
|
|
const SG::IConstAuxStore * | m_constStore |
| Associated store, const. More...
|
|
DataLink< SG::IConstAuxStore > | m_constStoreLink |
| Associated store link, const. More...
|
|
mutex_t | m_mutex |
|
void | swap (AuxVectorData &other) |
| Swap this instance with another. More...
|
|
void | clearCache () |
| Clear the cached aux data pointers. More...
|
|
void | clearDecorCache (SG::auxid_t auxid) |
| Clear the cached decoration pointer for a single variable. More...
|
|
virtual void | lock () override |
| Lock the container. More...
|
|
bool | clearDecorations () const |
| Clear all decorations. More...
|
|
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 |
|
static const SG::auxid_set_t | s_emptySet |
| Empty auxid set, used for a return value when we have no associated store. More...
|
|
void | setCache (SG::auxid_t auxid, void *ptr) |
| Explicitly set a cache pointer. More...
|
|
void | setCache (SG::auxid_t auxid, const void *ptr) |
| Explicitly set a cache pointer. More...
|
|
bool | isAvailableOol (auxid_t id) const |
| Out-of-line portion of isAvailable. More...
|
|
bool | isAvailableWritableOol (auxid_t id) |
| Out-of-line portion of isAvailableWritable. More...
|
|
bool | isAvailableWritableAsDecorationOol (auxid_t id) const |
| Out-of-line portion of isAvailableWritableAsDecoration. More...
|
|
void * | getDataOol (SG::auxid_t auxid, bool allowMissing) |
| Out-of-line portion of data access. More...
|
|
const void * | getDataOol (SG::auxid_t auxid, bool allowMissing) const |
| Out-of-line portion of data access (const version). More...
|
|
void * | getDecorationOol (SG::auxid_t auxid) const |
| Out-of-line portion of data access (decorator version). More...
|
|
Internal data container for private store.
This is used when we have a private aux store. It contains an embedded store object.
Definition at line 43 of file AuxElement.cxx.
◆ guard_t
◆ mutex_t
Mutex used to synchronize modifications to the cache vector.
Definition at line 911 of file AuxVectorData.h.
◆ AuxElementPrivateData()
SG::AuxElementPrivateData::AuxElementPrivateData |
( |
| ) |
|
|
inline |
◆ capacity_v()
virtual size_t SG::AuxElementData::capacity_v |
( |
| ) |
const |
|
inlinevirtualinherited |
Return the capacity of the container.
This is used when we need to create a new aux data vector.
Implements SG::AuxVectorData.
Definition at line 33 of file AuxElement.cxx.
◆ clearCache()
void SG::AuxVectorData::clearCache |
( |
| ) |
|
|
inherited |
Clear the cached aux data pointers.
You should call this any time something changes in the aux store that could invalidate the vector pointers.
◆ clearDecorations()
bool SG::AuxVectorData::clearDecorations |
( |
| ) |
const |
|
inherited |
Clear all decorations.
Erase all decorations from the store, restoring the state to when lock
was called.
Returns true if there were any decorations that were cleared, false if the store did not contain any decorations.
Definition at line 609 of file AuxVectorData.cxx.
617 m_constCache.clear();
618 m_decorCache.clear();
◆ clearDecorCache()
void SG::AuxVectorData::clearDecorCache |
( |
SG::auxid_t |
auxid | ) |
|
|
inherited |
Clear the cached decoration pointer for a single variable.
- Parameters
-
auxid | ID of the variable to clear. |
Not really safe to use if another thread may be accessing the same decoration.
Definition at line 576 of file AuxVectorData.cxx.
579 m_decorCache.clear (auxid);
◆ getAuxIDs()
Return a set of identifiers for existing data items in store associated with this object.
This will include identifiers for all items, const and non-const. If no store is associated with this object, this will return an empty set.
Definition at line 201 of file AuxVectorData.cxx.
◆ getConstStore()
Return the current store, as a const interface.
This will be non-zero if either a const or non-const store is associated with this object.
◆ getConstStoreLink()
Return the data link to the current store, as a const interface.
This is set by persistency when reading an object, but it may be overridden by setting the store pointer directly.
◆ getData() [1/2]
Return reference to an aux data item.
- Parameters
-
auxid | The desired aux data item. |
ndx | Index of the element to return. |
This will return a reference to element ndx
of aux data item auxid
. If the aux data item does not exist, it will be created. Errors are signaled by raising an exception.
Warning: no type checking is done. You should usually access the data via Accessor
or ConstAccessor
.
◆ getData() [2/2]
Return const reference to an aux data item.
- Parameters
-
auxid | The desired aux data item. |
ndx | Index of the element to return. |
This will return a reference to element ndx
of aux data item auxid
. Errors are signaled by raising an exception.
Warning: no type checking is done. You should usually access the data via Accessor
or ConstAccessor
.
◆ getDataArray() [1/2]
void* SG::AuxVectorData::getDataArray |
( |
SG::auxid_t |
auxid | ) |
|
|
inherited |
Return a pointer to the start of an aux data vector.
- Parameters
-
auxid | The desired aux data item. |
This will return a pointer to the start of the data for aux data item auxid
. If the item doesn't exist, it will be created. Errors are signaled by raising an exception.
◆ getDataArray() [2/2]
Return a const pointer to the start of an aux data vector.
- Parameters
-
auxid | The desired aux data item. |
This will return a pointer to the start of the data for aux data item auxid
. Errors are signaled by raising an exception.
◆ getDataArrayAllowMissing()
const void* SG::AuxVectorData::getDataArrayAllowMissing |
( |
SG::auxid_t |
auxid | ) |
const |
|
inherited |
Return a const pointer to the start of an aux data vector.
- Parameters
-
auxid | The desired aux data item. |
This will return a pointer to the start of the data for aux data item auxid
. If the item does not exist, this will return nullptr rather than raising an exception.
◆ getDataOol() [1/2]
void * SG::AuxVectorData::getDataOol |
( |
SG::auxid_t |
auxid, |
|
|
bool |
allowMissing |
|
) |
| |
|
privateinherited |
Out-of-line portion of data access.
- Parameters
-
auxid | aux data item being accessed. |
allowMissing | If true, then return nullptr if the variable is missing rather than throwing an exception. |
When this function returns, the cache entry m_cache
[auxid] will be valid. That entry is also returned. If there's an error, the function will throw an exception rather than returning.
Definition at line 294 of file AuxVectorData.cxx.
316 m_cache.store (auxid, ptr);
319 m_constCache.store (auxid, ptr);
320 m_decorCache.store (auxid, ptr);
322 else if (!allowMissing)
◆ getDataOol() [2/2]
const void * SG::AuxVectorData::getDataOol |
( |
SG::auxid_t |
auxid, |
|
|
bool |
allowMissing |
|
) |
| const |
|
privateinherited |
Out-of-line portion of data access (const version).
- Parameters
-
auxid | aux data item being accessed. |
allowMissing | If true, then return nullptr if the variable is missing rather than throwing an exception. |
When this function returns, the cache entry m_constCache
[auxid] will be valid. That entry is also returned. If there's an error, the function will throw an exception rather than returning.
Definition at line 339 of file AuxVectorData.cxx.
359 m_constCache.store (auxid, vp);
361 else if (!allowMissing)
◆ getDecoration()
Return reference to an aux decoration item.
- Parameters
-
auxid | The desired aux decoration item. |
ndx | Index of the element to return. |
This will return a reference to element ndx
of aux decoration item auxid
. If the aux data item does not exist, it will be created. Errors are signaled by raising an exception.
Warning: no type checking is done. You should usually access the data via Decorator
.
The difference between getDecoration
and getData
is that getDecoration
takes a const container as input, but returns a non-const reference. This will only succeed if either the container is not locked or the item was first accessed as a decoration.
◆ getDecorationArray()
void* SG::AuxVectorData::getDecorationArray |
( |
SG::auxid_t |
auxid | ) |
const |
|
inherited |
Return a pointer to the start of an aux data vector for a decoration.
- Parameters
-
auxid | The desired aux data item. |
This will return a pointer to the start of the data for aux data item auxid
. If the item doesn't exist, it will be created. Errors are signaled by raising an exception.
The difference between getDecorationArray
and getDataArray
is that getDecorationArray
takes a const container as input, but returns a non-const pointer. This will only succeed if either the container is not locked or the item was first accessed as a decoration.
◆ getDecorationOol()
void * SG::AuxVectorData::getDecorationOol |
( |
SG::auxid_t |
auxid | ) |
const |
|
privateinherited |
Out-of-line portion of data access (decorator version).
- Parameters
-
auxid | aux data item being accessed. |
When this function returns, the cache entry m_cache
[auxid] will be valid. That entry is also returned. If there's an error, the function will throw an exception rather than returning.
The difference between getDecorationOol
and getDataOol
is that getDecorationOol
takes a const container as input, but returns a non-const pointer. This will only succeed if either the container is not locked or the item was first accessed as a decoration.
Definition at line 382 of file AuxVectorData.cxx.
393 ptr =
store->getDecoration (auxid, 0, 0);
407 ptr =
store->getDecoration (auxid, 0, 0);
420 m_decorCache.store (auxid, ptr);
423 m_constCache.store (auxid, ptr);
◆ getStore() [1/2]
Return the current store, as a non-const interface.
This will be non-zero if a non-const store is associated with this object.
◆ getStore() [2/2]
Return the current store, as a non-const interface.
This will be non-zero if a non-const store is associated with this object.
◆ getWritableAuxIDs()
Return a set of identifiers for writable data items in this store.
This will include only non-const identifiers. If no store is associated with this object, this will return an empty set.
Definition at line 217 of file AuxVectorData.cxx.
◆ hasNonConstStore()
bool SG::AuxVectorData::hasNonConstStore |
( |
| ) |
const |
|
inherited |
Return true if this object has an associated non-const store.
◆ hasStore()
bool SG::AuxVectorData::hasStore |
( |
| ) |
const |
|
inherited |
Return true if this object has an associated store.
◆ isAvailable()
bool SG::AuxVectorData::isAvailable |
( |
auxid_t |
id | ) |
const |
|
inherited |
Test to see if a variable exists in the store.
- Parameters
-
◆ isAvailableOol()
bool SG::AuxVectorData::isAvailableOol |
( |
auxid_t |
id | ) |
const |
|
privateinherited |
Out-of-line portion of isAvailable.
- Parameters
-
Definition at line 229 of file AuxVectorData.cxx.
234 if (!
store)
return false;
238 const void* ptr =
store->getData (
id);
245 m_constCache.store (
id, vp);
◆ isAvailableWritable()
bool SG::AuxVectorData::isAvailableWritable |
( |
auxid_t |
id | ) |
|
|
inherited |
Test to see if a variable is available for writing.
- Parameters
-
◆ isAvailableWritableAsDecoration()
bool SG::AuxVectorData::isAvailableWritableAsDecoration |
( |
auxid_t |
id | ) |
const |
|
inherited |
Test to see if a variable is available for writing as a decoration.
- Parameters
-
◆ isAvailableWritableAsDecorationOol()
bool SG::AuxVectorData::isAvailableWritableAsDecorationOol |
( |
auxid_t |
id | ) |
const |
|
privateinherited |
Out-of-line portion of isAvailableWritableAsDecoration.
- Parameters
-
Definition at line 268 of file AuxVectorData.cxx.
◆ isAvailableWritableOol()
bool SG::AuxVectorData::isAvailableWritableOol |
( |
auxid_t |
id | ) |
|
|
privateinherited |
Out-of-line portion of isAvailableWritable.
- Parameters
-
Definition at line 256 of file AuxVectorData.cxx.
259 if (!
store)
return false;
260 return store->getWritableAuxIDs().test(
id);
◆ lock()
void SG::AuxVectorData::lock |
( |
| ) |
|
|
overridevirtualinherited |
Lock the container.
After this, only decorations can be changed/modified. If the container is already locked, this is a no-op.
Implements ILockable.
Definition at line 589 of file AuxVectorData.cxx.
◆ setCache() [1/2]
Explicitly set a cache pointer.
- Parameters
-
auxid | Variable ID to set. |
ptr | Pointer to which the cache entry should be set. |
For internal use; do not use from user code. This does not acquire the lock — it's mostly meant to be used from a constructor.
◆ setCache() [2/2]
void SG::AuxVectorData::setCache |
( |
SG::auxid_t |
auxid, |
|
|
void * |
ptr |
|
) |
| |
|
protectedinherited |
Explicitly set a cache pointer.
- Parameters
-
auxid | Variable ID to set. |
ptr | Pointer to which the cache entry should be set. |
For internal use; do not use from user code. This does not acquire the lock — it's mostly meant to be used from a constructor.
◆ setNonConstStore()
void SG::AuxVectorData::setNonConstStore |
( |
SG::IAuxStore * |
store | ) |
|
|
protectedinherited |
Set the store associated with this object.
- Parameters
-
This will set both the const and non-const store pointers, and also clear the cache. This is the same as setStore() above with the same signature. It exists so that it can be called from python; pyroot would not be able to call the non-const overload of setStore due to its simplistic overload resolution.
◆ setOption() [1/8]
Set an option for an auxiliary data variable.
- Parameters
-
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.
Definition at line 148 of file AuxVectorData.cxx.
150 if (
id == null_auxid)
return false;
152 if (!
store)
return false;
153 return store->setOption (
id, option);
◆ setOption() [2/8]
template<class T >
bool SG::AuxVectorData::setOption |
( |
auxid_t |
id, |
|
|
const std::string & |
optname, |
|
|
T |
arg |
|
) |
| |
|
inherited |
Set an option for an auxiliary data variable.
- Parameters
-
id | The variable for which we want to set the option. |
optname | The name of the option to set. |
arg | The option value to set. |
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.
◆ setOption() [3/8]
Set an option for an auxiliary data variable.
- Parameters
-
name | The name of the variable. |
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.
Definition at line 166 of file AuxVectorData.cxx.
◆ setOption() [4/8]
Set an option for an auxiliary data variable.
- Parameters
-
name | The name of the variable. |
clsname | The name of the associated class. May be blank. |
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.
Definition at line 184 of file AuxVectorData.cxx.
◆ setOption() [5/8]
template<class T >
bool SG::AuxVectorData::setOption |
( |
const std::string & |
name, |
|
|
const std::string & |
clsname, |
|
|
const std::string & |
optname, |
|
|
T |
arg |
|
) |
| |
|
inherited |
Set an option for an auxiliary data variable.
- Parameters
-
name | The name of the variable. |
clsname | The name of the associated class. May be blank. |
optname | The name of the option to set. |
arg | The option value to set. |
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.
◆ setOption() [6/8]
bool SG::AuxVectorData::setOption |
( |
const std::string & |
name, |
|
|
const std::string & |
optname, |
|
|
double |
arg |
|
) |
| |
|
inherited |
◆ setOption() [7/8]
bool SG::AuxVectorData::setOption |
( |
const std::string & |
name, |
|
|
const std::string & |
optname, |
|
|
float |
arg |
|
) |
| |
|
inherited |
◆ setOption() [8/8]
bool SG::AuxVectorData::setOption |
( |
const std::string & |
name, |
|
|
const std::string & |
optname, |
|
|
int |
arg |
|
) |
| |
|
inherited |
Set an option for an auxiliary data variable.
- Parameters
-
name | The name of the variable. |
optname | The name of the option to set. |
arg | The option value to set. |
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.
◆ setStore() [1/3]
Set the store associated with this object.
- Parameters
-
This will clear the non-const store pointer, and also clear the cache.
- Parameters
-
This will clear the non-const store pointer, and also clear the cache.
Definition at line 130 of file AuxVectorData.cxx.
◆ setStore() [2/3]
Set the store associated with this object.
- Parameters
-
This will clear the non-const store pointer, and also clear the cache.
- Parameters
-
This will clear the non-const store pointer, and also clear the cache.
Definition at line 98 of file AuxVectorData.cxx.
◆ setStore() [3/3]
Set the store associated with this object.
- Parameters
-
This will set both the const and non-const store pointers, and also clear the cache.
nb. List the non-const overload before the const one; otherwise, we can't call the const one from python.
- Parameters
-
This will set both the const and non-const store pointers, and also clear the cache.
Definition at line 114 of file AuxVectorData.cxx.
◆ size_v()
virtual size_t SG::AuxElementData::size_v |
( |
| ) |
const |
|
inlinevirtualinherited |
Return the size of the container.
This is used when we need to create a new aux data vector.
Implements SG::AuxVectorData.
Definition at line 32 of file AuxElement.cxx.
◆ swap()
Swap this instance with another.
- Parameters
-
other | The other instance with which to swap. |
◆ ATLAS_THREAD_SAFE [1/4]
size_t s_minCacheLen SG::AuxVectorData::ATLAS_THREAD_SAFE |
|
staticprotectedinherited |
Minimum length to use for the cache vector.
Only changed by unit tests.
Definition at line 571 of file AuxVectorData.h.
◆ ATLAS_THREAD_SAFE [2/4]
Cache m_cache SG::AuxVectorData::ATLAS_THREAD_SAFE |
|
mutableprivateinherited |
Cached pointers to the start of aux data vectors, non-const.
Definition at line 889 of file AuxVectorData.h.
◆ ATLAS_THREAD_SAFE [3/4]
Cache m_constCache SG::AuxVectorData::ATLAS_THREAD_SAFE |
|
mutableprivateinherited |
Cached pointers to the start of aux data vectors, const.
Definition at line 892 of file AuxVectorData.h.
◆ ATLAS_THREAD_SAFE [4/4]
Cache m_decorCache SG::AuxVectorData::ATLAS_THREAD_SAFE |
|
mutableprivateinherited |
Cached pointers to the start of aux data vectors, decorations.
Definition at line 895 of file AuxVectorData.h.
◆ m_constStore
◆ m_constStoreLink
◆ m_mutex
◆ m_store
◆ s_emptySet
Empty auxid set, used for a return value when we have no associated store.
Definition at line 916 of file AuxVectorData.h.
The documentation for this class was generated from the following file:
const SG::IConstAuxStore * getConstStore() const
Return the current store, as a const interface.
bool isAvailableOol(auxid_t id) const
Out-of-line portion of isAvailable.
virtual const void * getData(SG::auxid_t auxid) const =0
Return the data vector for one aux data item.
DataLink< SG::IConstAuxStore > m_constStoreLink
Associated store link, const.
static size_t s_minCacheLen ATLAS_THREAD_SAFE
Minimum length to use for the cache vector.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
void clear()
Clear the link (make it null).
SG::auxid_t findAuxID(const std::string &name, const std::string &clsname="") const
Look up a name -> auxid_t mapping.
AthContainers_detail::lock_guard< mutex_t > guard_t
Exception — Attempted to modify auxiliary data in a locked store.
Exception — Non-const operation performed on const aux data.
void * getDecorationArray(SG::auxid_t auxid) const
Return a pointer to the start of an aux data vector for a decoration.
const SG::IConstAuxStore * m_constStore
Associated store, const.
void setStore(SG::IAuxStore *store)
Set the store associated with this object.
size_t auxid_t
Identifier for a particular aux data item.
static const SG::auxid_set_t s_emptySet
Empty auxid set, used for a return value when we have no associated store.
AuxStoreStandalone m_store
Exception — Attempt to retrieve nonexistent aux data item.
SG::IAuxStore * getStore()
Return the current store, as a non-const interface.
bool isLinked(SG::auxid_t auxid) const
Test whether this is a linked variable.
void clearCache()
Clear the cached aux data pointers.
SG::IAuxStore * m_store
Associated store, non-const.
virtual const SG::auxid_set_t & getWritableAuxIDs() const =0
Return a set of identifiers for writable data items in this store.
Interface for non-const operations on an auxiliary store.
virtual void * getData(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data item.
virtual void lock()=0
Lock the container.
Interface for const operations on an auxiliary store.
Exception — Aux data requested from object with no store.
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
virtual size_t capacity_v() const =0
Return the capacity of the container.
virtual size_t size_v() const =0
Return the size of the container.
bool setOption(auxid_t id, const AuxDataOption &option)
Set an option for an auxiliary data variable.