ATLAS Offline Software
Loading...
Searching...
No Matches
Decorator.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_DECORATOR_H
18#define ATHCONTAINERS_DECORATOR_H
19
20
26#include <string>
27#include <typeinfo>
28
29
30namespace SG {
31
32
57template <class T, class ALLOC = AuxAllocator_t<T> >
59{
60public:
63
66
72
76
77
84 Decorator (const std::string& name);
85
86
94 Decorator (const std::string& name, const std::string& clsname);
95
96
104
105
114 template <IsConstAuxElement ELT>
115 reference_type operator() (const ELT& e) const;
116
117
133
134
140 template <IsConstAuxElement ELT>
141 void set (const ELT& e, const element_type& x) const;
142
143
149
150
160
161
168
169
178 span
180
181
186 template <IsConstAuxElement ELT>
187 bool isAvailable (const ELT& e) const;
188
189
194 template <IsConstAuxElement ELT>
195 bool isAvailableWritable (const ELT& e) const;
196
197
202 bool isAvailable (const AuxVectorData& c) const;
203
204
209 bool isAvailableWritable (const AuxVectorData& c) const;
210
211
216
217
218protected:
227 Decorator (const std::string& name,
228 const std::string& clsname,
229 const SG::AuxVarFlags flags);
230
231
240 const SG::AuxVarFlags flags);
241
242
243private:
246};
247
248
249} // namespace SG
250
251
253
254
255#endif // not ATHCONTAINERS_DECORATOR_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.
#define x
typename vector_type::pointer container_pointer_type
Pointers to the data within the container.
CxxUtils::span< container_value_type > span
CxxUtils::span< const container_value_type > const_span
element_type & reference_type
Reference types returned by aux data accessors.
T element_type
The type the user sees.
typename vector_type::const_pointer const_container_pointer_type
Manage lookup of vectors of auxiliary data.
bool isAvailableWritable(const AuxVectorData &c) const
const_container_pointer_type getDataArray(const AuxVectorData &container) const
typename AuxDataTraits< T, ALLOC >::span span
Definition Decorator.h:74
Decorator(const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
void set(const ELT &e, const element_type &x) const
span getDecorationSpan(const AuxVectorData &container) const
typename AuxDataTraits< T, ALLOC >::const_container_pointer_type const_container_pointer_type
Definition Decorator.h:70
Decorator(const SG::auxid_t auxid, const SG::AuxVarFlags flags)
bool isAvailable(const ELT &e) const
Decorator(const std::string &name)
Constructor.
Decorator(const std::string &name, const std::string &clsname)
bool isAvailable(const AuxVectorData &c) const
SG::auxid_t auxid() const
const_span getDataSpan(const AuxVectorData &container) const
bool isAvailableWritable(const ELT &e) const
typename AuxDataTraits< T, ALLOC >::element_type element_type
Definition Decorator.h:65
container_pointer_type getDecorationArray(const AuxVectorData &container) const
typename AuxDataTraits< T, ALLOC >::reference_type reference_type
Definition Decorator.h:62
typename AuxDataTraits< T, ALLOC >::const_span const_span
Definition Decorator.h:75
typename AuxDataTraits< T, ALLOC >::container_pointer_type container_pointer_type
Definition Decorator.h:68
reference_type operator()(const ELT &e) const
Fetch the variable for one element, as a non-const reference.
Decorator(const SG::auxid_t auxid)
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