File indexing completed on 2025-01-18 09:11:33
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Vertexing/VertexingError.hpp"
0010
0011 #include <string>
0012
0013 namespace {
0014
0015 class VertexingErrorCategory : 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::VertexingError;
0023
0024 switch (static_cast<VertexingError>(c)) {
0025 case VertexingError::NumericFailure:
0026 return "Numeric failure in calculation.";
0027 case VertexingError::EmptyInput:
0028 return "Empty input provided.";
0029 case VertexingError::SeedingError:
0030 return "Error while finding vertex seed.";
0031 case VertexingError::NotConverged:
0032 return "Unable to converge.";
0033 case VertexingError::ElementNotFound:
0034 return "Unable to find element.";
0035 case VertexingError::NoCovariance:
0036 return "No covariance provided.";
0037 case VertexingError::SingularMatrix:
0038 return "Encountered non-invertible matrix.";
0039 case VertexingError::NonPositiveVariance:
0040 return "Encountered negative or zero variance.";
0041 case VertexingError::MatrixNotPositiveDefinite:
0042 return "Encountered a matrix that is not positive definite.";
0043 case VertexingError::InvalidInput:
0044 return "Invalid input provided.";
0045 default:
0046 return "unknown";
0047 }
0048 }
0049 };
0050
0051 }
0052
0053 std::error_code Acts::make_error_code(Acts::VertexingError e) {
0054 static VertexingErrorCategory c;
0055 return {static_cast<int>(e), c};
0056 }