ATLAS Offline Software
Loading...
Searching...
No Matches
ConstAccessor.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_CONSTACCESSOR_H
18#define ATHCONTAINERS_CONSTACCESSOR_H
19
20
26#include <string>
27#include <typeinfo>
28
29
30namespace SG {
31
32
53template <class T, class ALLOC = AuxAllocator_t<T> >
55{
56public:
59
63
67
70
71
78 ConstAccessor (const std::string& name);
79
80
88 ConstAccessor (const std::string& name, const std::string& clsname);
89
90
98
99
104 template <IsConstAuxElement ELT>
106
107
119
120
129 template <IsConstAuxElement ELT>
130 const_reference_type withDefault (const ELT& e, const T& deflt) const;
131
132
145 withDefault (const AuxVectorData& container, size_t index, const T& deflt) const;
146
147
154
155
162
163
168 template <IsConstAuxElement ELT>
169 bool isAvailable (const ELT& e) const;
170
171
176 bool isAvailable (const AuxVectorData& c) const;
177
178
183
184
185protected:
194 ConstAccessor (const std::string& name,
195 const std::string& clsname,
196 const SG::AuxVarFlags flags);
197
198
207 const SG::AuxVarFlags flags);
208
209
212};
213
214
215} // namespace SG
216
217
219
220
221#endif // not ATHCONTAINERS_CONSTACCESSOR_H
Handle mappings between names and auxid_t.
Basic definitions for auxiliary types.
Manage lookup of vectors of auxiliary data.
Flag that a class may have auxiliary data associated with it.
const element_type & const_reference_type
CxxUtils::span< const container_value_type > const_span
T element_type
The type the user sees.
typename vector_type::const_pointer const_container_pointer_type
Manage lookup of vectors of auxiliary data.
const_container_pointer_type getDataArray(const AuxVectorData &container) const
const_reference_type withDefault(const AuxVectorData &container, size_t index, const T &deflt) const
bool isAvailable(const ELT &e) const
const_span getDataSpan(const AuxVectorData &container) const
typename AuxDataTraits< T, ALLOC >::const_container_pointer_type const_container_pointer_type
const_reference_type withDefault(const ELT &e, const T &deflt) const
ConstAccessor(const std::string &name, const std::string &clsname)
ConstAccessor(const SG::auxid_t auxid)
typename AuxDataTraits< T, ALLOC >::const_reference_type const_reference_type
ConstAccessor(const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
ConstAccessor(const std::string &name)
Constructor.
ConstAccessor(const SG::auxid_t auxid, const SG::AuxVarFlags flags)
typename AuxDataTraits< T, ALLOC >::element_type element_type
const_reference_type operator()(const ELT &e) const
Fetch the variable for one element, as a const reference.
bool isAvailable(const AuxVectorData &c) const
typename AuxDataTraits< T, ALLOC >::const_span const_span
Forward declaration.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
Definition AuxTypes.h:58
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27
Definition index.py:1