File indexing completed on 2025-02-22 09:35:01
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Plugins/GeoModel/GeoModelConversionError.hpp"
0010
0011 #include <string>
0012
0013 namespace {
0014
0015 class GeoModelConversionErrorCategory : public std::error_category {
0016 public:
0017
0018 const char* name() const noexcept final { return "GeoModelConversionError"; }
0019
0020
0021 std::string message(int c) const final {
0022 using Acts::GeoModelConversionError;
0023
0024 switch (static_cast<GeoModelConversionError>(c)) {
0025 case GeoModelConversionError::WrongShapeForConverter:
0026 return "Wrong shape provided for this converter";
0027 case GeoModelConversionError::InvalidShapeParameters:
0028 return "Shape parameters can not be converted to Surface "
0029 "representation";
0030 case GeoModelConversionError::UnkownShape:
0031 return "Unknown Shape provided, no converter available";
0032 case GeoModelConversionError::MissingLogicalVolume:
0033 return "No logical volume found for the shape";
0034 default:
0035 return "unknown";
0036 }
0037 }
0038 };
0039
0040 }
0041
0042 std::error_code Acts::make_error_code(Acts::GeoModelConversionError e) {
0043 static GeoModelConversionErrorCategory c;
0044 return {static_cast<int>(e), c};
0045 }