From 0b8e768046d494624d0e191eea8183988e4c9ab7 Mon Sep 17 00:00:00 2001 From: Carlo Varni <75478407+CarloVarni@users.noreply.github.com> Date: Tue, 29 Oct 2024 20:52:12 +0100 Subject: [PATCH] fix: Do not use requires in class EDM definition (#3731) It looks like this is creating issues in Athena with ```console In file included from libActsEventDict dictionary payload:146: In file included from /cvmfs/atlas-nightlies.cern.ch/repo/sw/main--ACTS_Athena_x86_64-el9-gcc13-opt/2024-10-09T2101/Athena/25.0.20/InstallArea/x86_64-el9-gcc13-opt/include/ActsEvent/Seed.h:8: /cvmfs/atlas-nightlies.cern.ch/repo/sw/main--ACTS_Athena_x86_64-el9-gcc13-opt/2024-10-09T2101/AthenaExternals/25.0.20/InstallArea/x86_64-el9-gcc13-opt/include/Acts/Acts/EventData/Seed.hpp:17:11: error: requires clause differs in template redeclaration requires(N >= 3ul) ^ Forward declarations from /cvmfs/atlas-nightlies.cern.ch/repo/sw/main--ACTS_Athena_x86_64-el9-gcc13-opt/2024-10-09T2101/Athena/25.0.20/InstallArea/x86_64-el9-gcc13-opt/lib/Athena.rootmap:773:18: note: previous template declaration is here namespace Acts { template class Seed; } ``` /cc @krasznaa @Ragansu and @Corentin-Allaire managed to make it work by: > removed requires(N >= 3ul) in Seed.h and Seed.ipp and recompiled ACTS > commented out parts in CxxUtils.h which delt with std::range when __cling__ is enabled. and recompiled Athena with a modified Package Filter. Quoting: > For information I think part of the issue might be that Cling doesn't like the requiere in the seed definition: > The other issue seem to be that athena redefine the std::range::end function when Cling is used (in CxxUtils/range). Probably because it was not implemented before, but now this create a conflict with newer root version I guess ? See: https://atlas-art-data.web.cern.ch/atlas-art-data/grid-output/main/Athena/x86_64-el9-gcc13-opt/2024-10-08T2101/InDetPhysValMonitoring/test_run4_acts_vertex_PU200/tarball_logs/payload.stdout Co-authored-by: Pierfrancesco Butti <25535240+pbutti@users.noreply.github.com> --- Core/include/Acts/EventData/Seed.hpp | 3 ++- Core/include/Acts/EventData/Seed.ipp | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Core/include/Acts/EventData/Seed.hpp b/Core/include/Acts/EventData/Seed.hpp index db93b319dcb..f3c6707b2e1 100644 --- a/Core/include/Acts/EventData/Seed.hpp +++ b/Core/include/Acts/EventData/Seed.hpp @@ -14,8 +14,9 @@ namespace Acts { template - requires(N >= 3ul) class Seed { + static_assert(N >= 3ul); + public: using value_type = external_spacepoint_t; static constexpr std::size_t DIM = N; diff --git a/Core/include/Acts/EventData/Seed.ipp b/Core/include/Acts/EventData/Seed.ipp index 74f2c0e4169..e977a3d67d7 100644 --- a/Core/include/Acts/EventData/Seed.ipp +++ b/Core/include/Acts/EventData/Seed.ipp @@ -9,7 +9,6 @@ namespace Acts { template - requires(N >= 3ul) template requires(sizeof...(args_t) == N) && (std::same_as && ...) @@ -17,32 +16,27 @@ Seed::Seed(const args_t&... points) : m_spacepoints({&points...}) {} template - requires(N >= 3ul) void Seed::setVertexZ(float vertex) { m_vertexZ = vertex; } template - requires(N >= 3ul) void Seed::setQuality(float seedQuality) { m_seedQuality = seedQuality; } template - requires(N >= 3ul) const std::array& Seed::sp() const { return m_spacepoints; } template - requires(N >= 3ul) float Seed::z() const { return m_vertexZ; } template - requires(N >= 3ul) float Seed::seedQuality() const { return m_seedQuality; }