ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::SurfaceBoundsJsonConverter Namespace Reference

Functions

template<typename bounds_t>
std::shared_ptr< const bounds_t > fromJson (const nlohmann::json &j)
 Conversion to surfaceBounds from json.
nlohmann::json toJson (const SurfaceBounds &bounds)
 Interface with detray conversion option.
nlohmann::json toJsonDetray (const SurfaceBounds &bounds, bool portal=false)
 Interface with detray conversion option.

Function Documentation

◆ fromJson()

template<typename bounds_t>
std::shared_ptr< const bounds_t > Acts::SurfaceBoundsJsonConverter::fromJson ( const nlohmann::json & j)

Conversion to surfaceBounds from json.

The type is given as a template argument in order to be able to construct the correct fitting types for surfaces.

Parameters
jthe read-in json object
Returns
a shared_ptr to a surface object for type polymorphism

◆ toJson()

nlohmann::json Acts::SurfaceBoundsJsonConverter::toJson ( const SurfaceBounds & bounds)

Interface with detray conversion option.

Parameters
boundsis the bounds object
Returns
the json object

◆ toJsonDetray()

nlohmann::json Acts::SurfaceBoundsJsonConverter::toJsonDetray ( const SurfaceBounds & bounds,
bool portal = false )

Interface with detray conversion option.

Parameters
boundsis the bounds object
portalis the flag for conversion into detray portal format
Note
reading back detray json format to Acts is not supported
Returns
the json object