From 924bd140f4be7089937fa8764cabdabfea072fa4 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Tue, 2 Apr 2024 14:35:14 +0200 Subject: [PATCH] fix error code; more sugar --- Core/include/Acts/Utilities/TrackHelpers.hpp | 2 +- Core/src/Utilities/TrackHelpers.cpp | 3 ++- .../Algorithms/TrackFinding/src/TrackFindingAlgorithm.cpp | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Core/include/Acts/Utilities/TrackHelpers.hpp b/Core/include/Acts/Utilities/TrackHelpers.hpp index c7ee69ce7ea..dd943332960 100644 --- a/Core/include/Acts/Utilities/TrackHelpers.hpp +++ b/Core/include/Acts/Utilities/TrackHelpers.hpp @@ -159,7 +159,7 @@ Result smoothTracks( template Result> findTrackStateForExtrapolation( - const GeometryContext &geoContext, track_proxy_t &track, + const GeometryContext &geoContext, const track_proxy_t &track, const Surface &referenceSurface, TrackExtrapolationStrategy strategy, const Logger &logger = *getDefaultLogger("TrackExtrapolation", Logging::INFO)) { diff --git a/Core/src/Utilities/TrackHelpers.cpp b/Core/src/Utilities/TrackHelpers.cpp index 7d09962224b..11a2dfd7eae 100644 --- a/Core/src/Utilities/TrackHelpers.cpp +++ b/Core/src/Utilities/TrackHelpers.cpp @@ -35,5 +35,6 @@ class TrackExtrapolationErrorCategory : public std::error_category { } // namespace std::error_code Acts::make_error_code(Acts::TrackExtrapolationError e) { - return {static_cast(e), TrackExtrapolationErrorCategory()}; + static TrackExtrapolationErrorCategory c; + return {static_cast(e), c}; } diff --git a/Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithm.cpp b/Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithm.cpp index ed1396377d5..35f1df8455d 100644 --- a/Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithm.cpp +++ b/Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithm.cpp @@ -256,7 +256,7 @@ ActsExamples::ProcessCode ActsExamples::TrackFindingAlgorithm::execute( if (!secondExtrapolationResult.ok()) { m_nFailedExtrapolation++; ACTS_ERROR("Second extrapolation for seed " - << iSeed << " and track " << firstTrack.index() + << iSeed << " and track " << secondTrack.index() << " failed with error " << secondExtrapolationResult.error()); continue; @@ -264,7 +264,7 @@ ActsExamples::ProcessCode ActsExamples::TrackFindingAlgorithm::execute( if (!m_trackSelector.has_value() || m_trackSelector->isValidTrack(secondTrack)) { - auto destProxy = tracks.getTrack(tracks.addTrack()); + auto destProxy = tracks.makeTrack(); destProxy.copyFrom(secondTrack, true); } @@ -290,7 +290,7 @@ ActsExamples::ProcessCode ActsExamples::TrackFindingAlgorithm::execute( if (!m_trackSelector.has_value() || m_trackSelector->isValidTrack(firstTrack)) { - auto destProxy = tracks.getTrack(tracks.addTrack()); + auto destProxy = tracks.makeTrack(); destProxy.copyFrom(firstTrack, true); } }