Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::SurfaceJsonConverter Namespace Reference

Classes

struct  Options
 

Functions

nlohmann::json toJson (const GeometryContext &gctx, const Surface &surface, const Options &options=Options{})
 
nlohmann::json toJsonDetray (const GeometryContext &gctx, const Surface &surface, const Options &options=Options{})
 
std::shared_ptr< SurfacefromJson (const nlohmann::json &jSurface)
 The Surface converter from json.
 

Function Documentation

std::shared_ptr< Acts::Surface > Acts::SurfaceJsonConverter::fromJson ( const nlohmann::json &  jVolumeBounds)

The Surface converter from json.

Parameters
jSurfacethe surface json object
Returns
a shared object created from json input

The Surface converter from json.

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

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

The Surface converter from json.

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

Conversion to volume bounds from json

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

Parameters
jVolumeBoundsthe read-in json object
Returns
a unique_ptr to a volume bounds object for type polymorphism

Conversion to volume bounds from json

Parameters
jVolumeBoundsthe read-in json object
Returns
a unique_ptr to a volume bounds object for type polymorphism

Unroll the types

Definition at line 57 of file SurfaceJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 57 of file SurfaceJsonConverter.cpp

References Acts::from_json(), Acts::Transform3JsonConverter::fromJson(), j, throw_assert, and to_string().

Referenced by BOOST_AUTO_TEST_CASE(), and ActsExamples::JsonSurfacesReader::read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

nlohmann::json Acts::SurfaceJsonConverter::toJson ( const GeometryContext &  gctx,
const Surface surface,
const Options options = Options{} 
)

Contextual conversion of a surface

Parameters
gctxthe geometry context for this
surfacethe surface to be converted
optionsthe writing options for the surfaces
Returns
a json object representing the surface

Definition at line 145 of file SurfaceJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 145 of file SurfaceJsonConverter.cpp

References Acts::Surface::bounds(), Acts::GeometryObject::geometryId(), sTransform, Acts::Surface::surfaceMaterial(), Acts::Transform3JsonConverter::toJson(), Acts::Surface::transform(), Acts::SurfaceJsonConverter::Options::transformOptions, Acts::Surface::type(), Acts::GeometryIdentifier::value(), and Acts::SurfaceJsonConverter::Options::writeMaterial.

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

nlohmann::json Acts::SurfaceJsonConverter::toJsonDetray ( const GeometryContext &  gctx,
const Surface surface,
const Options options = Options{} 
)

Contextual conversion of a surface - Detray export

Parameters
gctxthe geometry context for this
surfacethe surface to be converted
optionsthe writing options for the surfaces
Note
reading back detray json is not supported and will fail
Returns
a json object representing the surface

Definition at line 164 of file SurfaceJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 164 of file SurfaceJsonConverter.cpp

References Acts::Surface::bounds(), Acts::GeometryObject::geometryId(), Acts::SurfaceJsonConverter::Options::portal, Acts::GeometryIdentifier::sensitive(), sTransform, Acts::Transform3JsonConverter::toJson(), Acts::DetectorJsonConverter::toJsonDetray(), Acts::Surface::transform(), Acts::SurfaceJsonConverter::Options::transformOptions, physmon_ckf_tracking::u, and Acts::GeometryIdentifier::value().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: