ATLAS Offline Software
Classes | Namespaces
AtomicConstAccessor.h File Reference

Access an auxiliary variable atomically. More...

#include "AthContainers/AuxElement.h"
#include "AthContainers/ConstAccessor.h"
#include "AthContainers/tools/AuxDataTraits.h"
#include <atomic>
#include <type_traits>
#include "AthContainers/tools/AtomicConstAccessor.icc"
Include dependency graph for AtomicConstAccessor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SG::AtomicConstAccessor< T, ALLOC >
 Access an auxiliary variable atomically. More...
 

Namespaces

 SG
 Forward declaration.
 

Detailed Description

Access an auxiliary variable atomically.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Apr, 2018 This is like SG::ConstAccessor, except that accesses to the underlying T variable are cast to std::atomic<T>. This will generally work only for fundamental integer types or for pointers.

This is the way to access variables that were declared with Flags::Atomic . Be aware, however, that it is still possible to have non-atomic accesses to such variables via either the implicit operations provided by AuxTypeRegistry or by explicit access to the value vector. Therefore, this is not recommended for general use. Contact core software before using this for new code.

Definition in file AtomicConstAccessor.h.