ATLAS Offline Software
Loading...
Searching...
No Matches
Control/AthContainers/AthContainers/Accessor.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4 */
15
16
17#ifndef ATHCONTAINERS_ACCESSOR_H
18#define ATHCONTAINERS_ACCESSOR_H
19
20
27#include <string>
28#include <typeinfo>
29
30
31namespace SG {
32
33
65template <class T, class ALLOC = AuxAllocator_t<T> >
67 : public ConstAccessor<T, ALLOC>
68{
69public:
72
75
79
82
83 using ConstAccessor<T, ALLOC>::operator();
84 using ConstAccessor<T, ALLOC>::getDataArray;
85 using ConstAccessor<T, ALLOC>::getDataSpan;
86
87
94 Accessor (const std::string& name);
95
96
104 Accessor (const std::string& name, const std::string& clsname);
105
106
114
115
120 template <IsAuxElement ELT>
122
123
134
135
141 template <IsAuxElement ELT>
142 void set (ELT& e, const element_type& x) const;
143
144
150
151
156 span
158
159
164 template <IsAuxElement ELT>
165 bool isAvailableWritable (ELT& e) const;
166
167
173};
174
175
176} // namespace SG
177
178
180
181
182#endif // not ATHCONTAINERS_ACCESSOR_H
Handle mappings between names and auxid_t.
Basic definitions for auxiliary types.
Manage lookup of vectors of auxiliary data.
Helper class to provide constant type-safe access to aux data.
Flag that a class may have auxiliary data associated with it.
#define x
typename AuxDataTraits< T, ALLOC >::span span
A span over elements in the container.
span getDataSpan(AuxVectorData &container) const
Get a span over the auxilary data array.
Accessor(const SG::auxid_t auxid)
typename AuxDataTraits< T, ALLOC >::reference_type reference_type
Type referencing an item.
reference_type operator()(ELT &e) const
Fetch the variable for one element, as a non-const reference.
typename AuxDataTraits< T, ALLOC >::container_pointer_type container_pointer_type
Pointer into the container holding this item.
typename AuxDataTraits< T, ALLOC >::element_type element_type
Type the user sees.
container_pointer_type getDataArray(AuxVectorData &container) const
Get a pointer to the start of the auxiliary data array.
void set(ELT &e, const element_type &x) const
bool isAvailableWritable(ELT &e) const
Accessor(const std::string &name, const std::string &clsname)
Accessor(const std::string &name)
Constructor.
bool isAvailableWritable(AuxVectorData &c) const
typename vector_type::pointer container_pointer_type
Pointers to the data within the container.
CxxUtils::span< container_value_type > span
element_type & reference_type
Reference types returned by aux data accessors.
T element_type
The type the user sees.
Manage lookup of vectors of auxiliary data.
ConstAccessor(const std::string &name)
Constructor.
Forward declaration.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27
Definition index.py:1