File SurfaceJsonConverter.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
Functions
-
std::shared_ptr<Surface> surfaceFromJson(const nlohmann::json &j)
Conversion to Surface from jsonn.
- Parameters
j – the read-in json object
- Returns
a shared_ptr to a surface object for type polymorphism
Conversion to Surface from json in correct type.
The type is given as a template argument in order to be able to construct the correct fitting types for surfaces.
- Parameters
j – the read-in json object
- Returns
a shared_ptr to a typed surface object for type polymorphism
Non-contextual conversion of a surface.
Note
it will take the default context
-
void to_json(nlohmann::json &j, const Surface &surface)
Non-contextual conversion of a surface.
Note
it will take the default context
-
void to_json(nlohmann::json &j, const SurfaceAndMaterialWithContext &surface)
Conversion of a pair of surface and material used for the material mapping.
Contextual conversion of a surface.
- Parameters
j – the json to be filled
surface – the surface to be converted
gctx – the geometry context for this
-
namespace SurfaceJsonConverter
Functions
-
std::shared_ptr<Surface> fromJson(const nlohmann::json &jSurface)
The Surface converter from json.
- Parameters
jSurface – the surface json object
- Returns
a shared object created from json input
-
nlohmann::json toJson(const GeometryContext &gctx, const Surface &surface, const Options &options = Options{})
Contextual conversion of a surface.
- Parameters
gctx – the geometry context for this
surface – the surface to be converted
options – the writing options for the surfaces
- Returns
a json object representing the surface
-
nlohmann::json toJsonDetray(const GeometryContext &gctx, const Surface &surface, const Options &options = Options{})
Contextual conversion of a surface - Detray export.
Note
reading back detray json is not supported and will fail
- Parameters
gctx – the geometry context for this
surface – the surface to be converted
options – the writing options for the surfaces
- Returns
a json object representing the surface
-
struct Options
- #include <Acts/Plugins/Json/SurfaceJsonConverter.hpp>
Public Members
-
bool portal = false
-
Transform3JsonConverter::Options transformOptions = Transform3JsonConverter::Options{}
-
bool writeMaterial = true
-
bool portal = false
-
std::shared_ptr<Surface> fromJson(const nlohmann::json &jSurface)
-
std::shared_ptr<Surface> surfaceFromJson(const nlohmann::json &j)