From 1ace19a48dfe21879aa50f20015e009e0517fef2 Mon Sep 17 00:00:00 2001 From: Paul Gessinger Date: Wed, 30 Oct 2024 10:10:32 +0100 Subject: [PATCH] fix: MeasSel error output, config check --- Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp | 2 +- Core/src/TrackFinding/MeasurementSelector.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp index 05e236e1e29..35acbc49feb 100644 --- a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp +++ b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp @@ -399,7 +399,7 @@ class CombinatorialKalmanFilter { measurementSelector(trackStateCandidates, isOutlier, logger); if (!selectorResult.ok()) { ACTS_ERROR("Selection of calibrated measurements failed: " - << selectorResult.error()); + << selectorResult.error().message()); resultTrackStateList = ResultTrackStateList::failure(selectorResult.error()); } else { diff --git a/Core/src/TrackFinding/MeasurementSelector.cpp b/Core/src/TrackFinding/MeasurementSelector.cpp index 130c8381536..f3de466f5df 100644 --- a/Core/src/TrackFinding/MeasurementSelector.cpp +++ b/Core/src/TrackFinding/MeasurementSelector.cpp @@ -29,6 +29,11 @@ MeasurementSelector::MeasurementSelector(const MeasurementSelectorCuts& cuts) : MeasurementSelector({{GeometryIdentifier(), cuts}}) {} MeasurementSelector::MeasurementSelector(const Config& config) { + if (config.empty()) { + throw std::invalid_argument( + "MeasurementSelector: Configuration must not be empty"); + } + std::vector tmp; tmp.reserve(config.size()); for (std::size_t i = 0; i < config.size(); ++i) {