ATLAS Offline Software
Loading...
Searching...
No Matches
SoAColumn.h
Go to the documentation of this file.
1// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2#ifndef ATHDEVICEUTILS_SOACOLUMN_H
3#define ATHDEVICEUTILS_SOACOLUMN_H
4
5// System include(s).
6#include <concepts>
7#include <cstddef>
8#include <string_view>
9
10namespace AthDevice {
11
13template <std::size_t INDEX>
14struct SoAColumn {
16 std::string_view name;
18 static constexpr std::size_t index = INDEX;
19};
20
21namespace Concepts {
22
24template <typename T>
25concept SoAColumn = requires {
26 { T::name } -> std::convertible_to<std::string_view>;
27 { T::index } -> std::convertible_to<std::size_t>;
28};
29
30} // namespace Concepts
31
32} // namespace AthDevice
33
34// Check that the type and concept are correctly defined.
36 "Implementation error in AthDevice::Concepts::SoAColumn.");
37
38#endif // ATHDEVICEUTILS_SOACOLUMN_H
Concept for an SoA column.
Definition SoAColumn.h:25
Definition index.py:1
Description of a single SoA column.
Definition SoAColumn.h:14
std::string_view name
Name of the auxiliary variable in the xAOD ontainer.
Definition SoAColumn.h:16