Namespace Acts::IndexedSurfacesJsonConverter

namespace IndexedSurfacesJsonConverter

Functions

template<typename instance_type>
void convert(nlohmann::json &jIndexedSurfaces, const Experimental::SurfaceCandidatesUpdator &delegate, [[maybe_unused]] const instance_type &refInstance)

Convert the single delegate if it is of the type of the reference.

Note

It will do nothing if the type does not match

Parameters
  • jIndexedSurfaces – the json object to be filled

  • delegate – the delegate to be translated

  • refInstance – is a reference instance of potential type casting

template<typename index_grid>
nlohmann::json convertImpl(const index_grid &indexGrid)

The actual conversion method.

Experimental::SurfaceCandidatesUpdator fromJson(const nlohmann::json &jSurfaceNavigation)

Convert the single delegate if it is of the type of the reference.

Convert the single delegate if it is of the type of the reference.

The Transform converter from json.

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

Convert the single delegate if it is of the type of the reference.

The Transform converter from json.

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

Parameters
  • jSurfaceNavigation – the json file to read from

  • j – the read-in json object

  • jVolumeBounds – the read-in json object

  • jVolumeBounds – the read-in json object

Returns

the surface navigation delegate

Returns

a shared_ptr to a surface object for type polymorphism

Returns

a unique_ptr to a volume bounds object for type polymorphism

Returns

a unique_ptr to a volume bounds object for type polymorphism

static inline nlohmann::json toJson(const Experimental::SurfaceCandidatesUpdator &delegate)

Convert a surface array into needed constituents.

Note

this is the entry point of the conversion, i.e. top of the unrolling loop

Parameters

delegate – the delegate to be translated

Returns

a collection of proto surface object and a grid, and associations

template<typename tuple_type, std::size_t... I>
void unrollConvert(nlohmann::json &jIndexedSurfaces, const Experimental::SurfaceCandidatesUpdator &delegate, const tuple_type &axesTuple, std::index_sequence<I...>)

Unrolling function for catching the right instance.

Note

parameters are as of the convertImpl method

Parameters
  • jIndexedSurfaces – the json object to be filled

  • delegate – the delegate to be translated

  • axesTuple – the tuple of axes to be unrolled

Variables

static auto s_possibleAxes = std::tuple<EqBound, EqOpen, EqClosed, VarBound, VarOpen, VarClosed, EqBoundEqBound, EqBoundEqOpen, EqBoundEqClosed, EqOpenEqBound, EqOpenEqOpen, EqOpenEqClosed, EqClosedEqBound, EqClosedEqOpen, EqClosedEqClosed, EqBoundVarBound, EqBoundVarOpen, EqBoundVarClosed, EqOpenVarBound, EqOpenVarOpen, EqOpenVarClosed, EqClosedVarBound, EqClosedVarOpen, EqClosedVarClosed, VarBoundEqBound, VarBoundEqOpen, VarBoundEqClosed, VarOpenEqBound, VarOpenEqOpen, VarOpenEqClosed, VarClosedEqBound, VarClosedEqOpen, VarClosedEqClosed, VarBoundVarBound, VarBoundVarOpen, VarBoundVarClosed, VarOpenVarBound, VarOpenVarOpen, VarOpenVarClosed, VarClosedVarBound, VarClosedVarOpen, VarClosedVarClosed>{}