Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
25 #ifndef ATHCONTAINERS_ATOMICCONSTACCESSOR_H
26 #define ATHCONTAINERS_ATOMICCONSTACCESSOR_H
33 #include <type_traits>
42 template <
class T,
class ALLOC = AuxAllocator_t<T> >
61 "Bad type for AtomicConstAccessor");
63 "Bad type for AtomicConstAccessor");
66 "Bad type for AtomicConstAccessor");
67 static_assert (
sizeof(T) ==
sizeof(std::atomic<T>),
68 "Bad type for AtomicConstAccessor");
69 static_assert (std::atomic<T>::is_always_lock_free,
70 "Bad type for AtomicConstAccessor");
107 template <IsConstAuxElement ELT>
140 #endif // not ATHCONTAINERS_ATOMICCONSTACCESSOR_H
AtomicConstAccessor(const std::string &name, const std::string &clsname)
Constructor.
const std::atomic< T > & const_reference_type
Type referencing an item.
SG::auxid_t auxid() const
Return the aux id for this variable.
typename AuxDataTraits< T, ALLOC >::element_type element_type
Type the user sees.
Helper class to provide constant type-safe access to aux data.
const std::atomic< T > * const_container_pointer_type
Pointer into the container holding this item.
size_t auxid_t
Identifier for a particular aux data item.
const_container_pointer_type getDataArray(const AuxVectorData &container) const
Get a pointer to the start of the auxiliary data array.
Access an auxiliary variable atomically.
Allow customizing how aux data types are treated.
AtomicConstAccessor(const SG::auxid_t auxid)
Constructor taking an auxid directly.
AtomicConstAccessor(const std::string &name)
Constructor.
T element_type
The type the user sees.
T operator()(const ELT &e) const
Fetch the variable for one element, as a const reference.
Manage lookup of vectors of auxiliary data.
Helper class to provide constant type-safe access to aux data.
Base class for elements of a container that can have aux data.