File indexing completed on 2025-01-18 09:11:31
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/TrackFitting/GsfError.hpp"
0010
0011 #include <string>
0012
0013 namespace {
0014
0015 class GsfErrorCategory : public std::error_category {
0016 public:
0017
0018 const char* name() const noexcept final { return "GsfError"; }
0019
0020
0021 std::string message(int c) const final {
0022 using Acts::GsfError;
0023
0024 switch (static_cast<GsfError>(c)) {
0025 case GsfError::StartParametersHaveNoCovariance:
0026 return "Start parameters have no Covariance";
0027 case GsfError::NoMeasurementStatesCreatedForward:
0028 return "No measurement states found in the forward pass";
0029 case GsfError::NoMeasurementStatesCreatedBackward:
0030 return "No measurement states found in the backward pass";
0031 case GsfError::NoMeasurementStatesCreatedFinal:
0032 return "No measurement states in the final trajectory";
0033 default:
0034 return "unknown";
0035 }
0036 }
0037 };
0038
0039 }
0040
0041 std::error_code Acts::make_error_code(Acts::GsfError e) {
0042 static GsfErrorCategory c;
0043 return {static_cast<int>(e), c};
0044 }