Skip to content

Commit

Permalink
fix error code; more sugar
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Apr 2, 2024
1 parent 662b34f commit 924bd14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/TrackHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Result<void> smoothTracks(
template <typename track_proxy_t>
Result<std::pair<typename track_proxy_t::ConstTrackStateProxy, double>>
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)) {
Expand Down
3 changes: 2 additions & 1 deletion Core/src/Utilities/TrackHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ class TrackExtrapolationErrorCategory : public std::error_category {
} // namespace

std::error_code Acts::make_error_code(Acts::TrackExtrapolationError e) {
return {static_cast<int>(e), TrackExtrapolationErrorCategory()};
static TrackExtrapolationErrorCategory c;
return {static_cast<int>(e), c};
}
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,15 @@ 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;
}

if (!m_trackSelector.has_value() ||
m_trackSelector->isValidTrack(secondTrack)) {
auto destProxy = tracks.getTrack(tracks.addTrack());
auto destProxy = tracks.makeTrack();
destProxy.copyFrom(secondTrack, true);
}

Expand All @@ -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);
}
}
Expand Down

0 comments on commit 924bd14

Please sign in to comment.