File indexing completed on 2025-01-18 09:11:28
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Propagator/MultiStepperError.hpp"
0010
0011 #include <string>
0012
0013 namespace {
0014
0015 class MultiStepperErrorCategory : public std::error_category {
0016 public:
0017
0018 const char* name() const noexcept final { return "MultiStepperError"; }
0019
0020
0021 std::string message(int c) const final {
0022 using Acts::MultiStepperError;
0023
0024 switch (static_cast<MultiStepperError>(c)) {
0025 case MultiStepperError::ComponentNotOnSurface:
0026 return "Component is not on a surface";
0027 case MultiStepperError::StateOfMultipleComponentsRequested:
0028 return "The global BoundState/CurvilinearState can only be computed if "
0029 "only one component exists";
0030 case MultiStepperError::AverageTrackLeftCurrentVolume:
0031 return "The average track has left the current volume";
0032 case MultiStepperError::AllComponentsSteppingError:
0033 return "Stepping error occurred in all components";
0034 case MultiStepperError::AllComponentsConversionToBoundFailed:
0035 return "The conversion to the bound state failed for all components";
0036 case MultiStepperError::SomeComponentsConversionToBoundFailed:
0037 return "The conversion to the bound state failed for some components";
0038 default:
0039 return "unknown";
0040 }
0041 }
0042 };
0043
0044 }
0045
0046 std::error_code Acts::make_error_code(Acts::MultiStepperError e) {
0047 static MultiStepperErrorCategory c;
0048 return {static_cast<int>(e), c};
0049 }