diff --git a/Core/include/Acts/Utilities/GridAccessHelpers.hpp b/Core/include/Acts/Utilities/GridAccessHelpers.hpp index fbaf7f3acbd..df8f46ed39b 100644 --- a/Core/include/Acts/Utilities/GridAccessHelpers.hpp +++ b/Core/include/Acts/Utilities/GridAccessHelpers.hpp @@ -212,7 +212,7 @@ class LocalSubspace : public IBoundToGridLocal { } }; -class BoundCylinderToZPhi final : public IBoundToGridLocal { +class BoundCylinderToZPhi : public IBoundToGridLocal { public: double radius = 1.; double shift = 0.; diff --git a/Plugins/Json/src/GridJsonConverter.cpp b/Plugins/Json/src/GridJsonConverter.cpp index 7b0bab73675..478224bc163 100644 --- a/Plugins/Json/src/GridJsonConverter.cpp +++ b/Plugins/Json/src/GridJsonConverter.cpp @@ -439,6 +439,11 @@ nlohmann::json Acts::GridAccessJsonConverter::toJson( jBoundToGridLocal["shift"] = boundCylinderToZPhi->shift; } + if (jBoundToGridLocal.empty()) { + throw std::invalid_argument( + "GridAccessJsonConverter: boundToGridLocal type not supported."); + } + return jBoundToGridLocal; }