Skip to content

Commit

Permalink
fix: Add check in TrackFitterPerformanceWriter (#1686)
Browse files Browse the repository at this point in the history
Check if we have a valid trajectory before trying to access it and emit a warning.
  • Loading branch information
benjaminhuth committed Nov 22, 2022
1 parent 75d8e2b commit 3f799e9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ ActsExamples::ProcessCode ActsExamples::TrackFitterPerformanceWriter::writeT(
const auto& trackTips = traj.tips();
const auto& mj = traj.multiTrajectory();

if (trackTips.empty()) {
ACTS_WARNING("No trajectory found for entry " << itraj);
continue;
}

// Check the size of the trajectory entry indices. For track fitting, there
// should be at most one trajectory
if (trackTips.size() > 1) {
Expand Down

0 comments on commit 3f799e9

Please sign in to comment.