ATLAS Offline Software
Loading...
Searching...
No Matches
AuxDataSpan.h File Reference

Describe a range over an auxiliary variable, for low-overhead access. More...

#include "CxxUtils/throw_out_of_range.h"
#include <cstddef>
#include <stdexcept>
Include dependency graph for AuxDataSpan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SG::AuxDataSpanBase
 Minimal span-like object describing the range of an auxiliary variable. More...
class  SG::detail::AuxDataSpan< T >
 Auxiliary variable span wrapper. More...
class  SG::detail::AuxDataConstSpan< T >
 Auxiliary variable span wrapper (const). More...

Namespaces

namespace  SG
 Forward declaration.
namespace  SG::detail

Detailed Description

Describe a range over an auxiliary variable, for low-overhead access.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Jun, 2024

Auxiliary variables are maintained by objects implementing IAuxTypeVector. This provides virtual functions to obtain the start and size of the vector. However, in some cases, we would like to be able to obtain this without the overhead of the virtual function calls. We do this using the minimal span-like object AuxDataSpanBase. A IAuxTypeVector holds an instance of this object and provides a non-virtual function to return a reference to it. Further, it is updated when the vector changes. Thus, clients can hold a reference to it and implicitly see any updates. Besides this minimal object, a couple more user-friendly wrappers are also defined.

Definition in file AuxDataSpan.h.