File GridJsonConverter.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

namespace AxisJsonConverter

Functions

nlohmann::json toJson(const IAxis &ia)

Convert an axis to json.

Parameters

ia – the axis

Returns

a json object to represent the axis

namespace GridJsonConverter

Functions

template<typename axis_generator_type>
auto fromJson(const nlohmann::json &jGrid, const axis_generator_type &aGenerator)

Templated grid conversion from json.

Note

the axis generator also defines the grid dimension

Template Parameters

axis_generator_type – the type of the axis generator which determines the grid type

Parameters
  • jGrid – the json object to represent the grid

  • aGenerator – the axis generator

Returns

a grid object

template<typename grid_type>
nlohmann::json toJson(const grid_type &grid)

Templated grid conversion to json.

Template Parameters

grid_type – the type of the grid

Parameters

grid – the grid object

Returns

a json object to represent the grid