|
ATLAS Offline Software
|
Go to the documentation of this file.
25 #ifndef ATHCONTAINERS_ATOMICDECORATOR_H
26 #define ATHCONTAINERS_ATOMICDECORATOR_H
32 #include <type_traits>
41 template <
class T,
class ALLOC = AuxAllocator_t<T> >
61 "Bad type for AtomicDecorator");
63 "Bad type for AtomicDecorator");
66 "Bad type for AtomicDecorator");
68 "Bad type for AtomicDecorator");
69 static_assert (
sizeof(T) ==
sizeof(std::atomic<T>),
70 "Bad type for AtomicDecorator");
71 static_assert (std::atomic<T>::is_always_lock_free,
72 "Bad type for AtomicDecorator");
163 #include "AthContainers/tools/AtomicDecorator.icc"
166 #endif // not ATHCONTAINERS_ATOMICDECORATOR_H
Base class for elements of a container that can have aux data.
#define ATH_REQUIRES(...)
bool const RAWDATA *ch2 const
AtomicDecorator(const std::string &name)
Constructor.
SG::auxid_t auxid() const
Return the aux id for this variable.
const_container_pointer_type getDataArray(const AuxVectorData &container) const
Get a pointer to the start of the auxiliary data array.
size_t auxid_t
Identifier for a particular aux data item.
Helper class to provide type-safe access to aux data.
Allow customizing how aux data types are treated.
container_pointer_type getDecorationArray(const AuxVectorData &container) const
Get a pointer to the start of the auxiliary data array.
T element_type
The type the user sees.
AtomicDecorator(const SG::auxid_t auxid)
Constructor taking an auxid directly.
const std::atomic< T > * const_container_pointer_type
std::atomic< T > & reference_type
Type referencing an item.
void set(const AuxElement &e, const element_type &x) const
Set the variable for one element.
Manage lookup of vectors of auxiliary data.
Access an auxiliary variable atomically.
AtomicDecorator(const std::string &name, const std::string &clsname)
Constructor.
typename AuxDataTraits< T, ALLOC >::element_type element_type
Type the user sees.
std::atomic< T > * container_pointer_type
Pointer into the container holding this item.
Base class for elements of a container that can have aux data.