File indexing completed on 2025-01-18 09:11:31
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/TrackFitting/KalmanFitterError.hpp"
0010
0011 #include <string>
0012
0013 namespace {
0014
0015 class KalmanFitterErrorCategory : public std::error_category {
0016 public:
0017
0018 const char* name() const noexcept final { return "KalmanFitterError"; }
0019
0020
0021 std::string message(int c) const final {
0022 using Acts::KalmanFitterError;
0023
0024 switch (static_cast<KalmanFitterError>(c)) {
0025 case KalmanFitterError::UpdateFailed:
0026 return "Kalman update failed";
0027 case KalmanFitterError::SmoothFailed:
0028 return "Kalman smooth failed";
0029 case KalmanFitterError::OutputConversionFailed:
0030 return "Kalman output conversion failed";
0031 case KalmanFitterError::NoMeasurementFound:
0032 return "No measurement detected during the propagation";
0033 case KalmanFitterError::ReversePropagationFailed:
0034 return "Reverse propagation failed";
0035 default:
0036 return "unknown";
0037 }
0038 }
0039 };
0040
0041 }
0042
0043 std::error_code Acts::make_error_code(Acts::KalmanFitterError e) {
0044 static KalmanFitterErrorCategory c;
0045 return {static_cast<int>(e), c};
0046 }