|
ACTS
Experiment-independent tracking
|
Type-safe representation of TGeo surface axes. More...
#include <ActsPlugins/Root/TGeoAxes.hpp>
Public Member Functions | |
| consteval | TGeoAxes (const char(&s)[4]) |
| Construct from a 3-character string literal. | |
| std::string_view | value () const |
| Return the axes string as a 3-character string view. | |
Static Public Member Functions | |
| static TGeoAxes | parse (std::string_view s) |
| Construct from a runtime string. | |
Type-safe representation of TGeo surface axes.
The axes string encodes which TGeo coordinate axes map to the local X and Y directions of an Acts surface, with case controlling the sign:
Valid values are all 3-character permutations of {X,x}, {Y,y}, {Z,z} with no axis letter repeated (e.g. "XYZ", "XZY", "xYz").
String literals are validated at compile time via the consteval constructor — invalid characters or repeated axes are a compile error. Runtime construction is available via parse().
|
consteval |
Construct from a 3-character string literal.
The parameter type const char (&)[4] only binds to exactly 3-character string literals; wrong lengths are a type error. Invalid characters or repeated axis letters cause a compile error.
| s | A 3-character axes string literal, e.g. "XYZ" |
|
static |
Construct from a runtime string.
Throws on invalid input.
| s | A string of exactly 3 characters from [XxYyZz] with no repeated axis letter. |
| std::invalid_argument | if the string is not a valid axes encoding. |
| std::string_view ActsPlugins::TGeoAxes::value | ( | ) | const |
Return the axes string as a 3-character string view.