Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef COLUMNAR_CORE_COLUMN_ACCESSOR_H
9 #define COLUMNAR_CORE_COLUMN_ACCESSOR_H
20 #include <type_traits>
81 template<ContainerId CI,
typename CT,ColumnAccessMode CAM,
typename CM>
class AccessorTemplate;
94 template<
typename CT,
typename CM>
103 template<
typename CT,
typename CM>
104 requires ((std::is_integral_v<CT> || std::is_floating_point_v<CT>) && !std::is_same_v<CT,bool>)
108 static constexpr
bool isNativeType =
true;
109 static constexpr
bool useConvertInput =
false;
110 static constexpr
bool useConvertWithDataInput =
false;
121 template<
typename CT,
typename CM>
139 static_assert (!std::is_const_v<CT>,
"CT must not be const");
140 static_assert (!std::is_const_v<UT>,
"UT must not be const");
143 template<
typename UT,
typename CT,
typename CM>
158 template<ContainerId OT,
typename CT,
typename CM>
185 return m_base.isAvailable (
id);
190 if (
m_base.isAvailable (
id))
211 template<ContainerId CI,
typename CT,ColumnAccessMode CAM,
typename CM>
214 accessor = AccessorTemplate<CI,CT,CAM,CM> (columnBase,
name, std::move (
info));
const InDetSimData * getData(const InDetSimDataCollection &coll, const Identifier &id)
AccessorTemplate< OT, ColumnType, ColumnAccessMode::input, CM > m_base
static constexpr bool useConvertWithDataInput
static constexpr bool useConvertInput
a type wrapper to make AccessorTemplate convert the underlying column type to a different type
static ColumnInfo & updateColumnInfo(ColumnarTool< CM > &, ColumnInfo &info)
bool const RAWDATA *ch2 const
static UT convertInput(const CT &value)
a struct that contains meta-information about each column that's needed to interface the column with ...
AccessorTemplate()=default
static ColumnInfo & updateColumnInfo(ColumnarTool< CM > &, ColumnInfo &info)
std::optional< UserType > getOptional(ObjectId< OT, CM > id) const
ColumnAccessMode
an enum for the different access modes for a column
static constexpr bool isNativeType
requires((std::is_integral_v< CT >||std::is_floating_point_v< CT >) &&!std::is_same_v< CT, bool >) struct ColumnTypeTraits< CT
a class representing a single object (electron, muons, etc.)
a type wrapper to force AccessorTemplate to treat the type as native
Helper class to provide type-safe access to aux data.
decltype(auto) operator()(ObjectId< OT, CM > id) const noexcept
static ColumnInfo & updateColumnInfo(ColumnarTool< CM > &, ColumnInfo &info)
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
bool isAvailable(ObjectId< OT, CM > id) const noexcept
a trait class to provide information about the column type
the raw column accessor template class
Helper class to provide constant type-safe access to aux data.
void resetAccessor(AccessorTemplate< CI, CT, CAM, CM > &accessor, ColumnarTool< CM > &columnBase, const std::string &name, ColumnInfo &&info={})
reset a column accessor to point to a new column
typename ColumnTypeTraits< CT, CM >::UserType UserType
Helper class to provide type-safe access to aux data.
typename ColumnTypeTraits< CT, CM >::ColumnType ColumnType