ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::io::material_map_writer Class Reference

Material maps writer backend. More...

#include <detray/io/backend/material_map_writer.hpp>

Inheritance diagram for detray::io::material_map_writer:
[legend]
Collaboration diagram for detray::io::material_map_writer:
[legend]

Public Types

using payload_type
 Payload type that the reader processes.

Static Public Member Functions

template<class detector_t>
static auto header_to_payload (const detector_t &det, const std::string_view det_name)
 Convert the header information into its payload.
template<class detector_t>
static payload_type to_payload (const detector_t &det, const typename detector_t::name_map &)
 Convert the material description of a detector det into its io payload.

Static Public Attributes

static constexpr std::string_view tag = "material_maps"
 Tag the writer as "material_map".

Detailed Description

Material maps writer backend.

Fills a material detector_grids_payload from a detector instance

Member Typedef Documentation

◆ payload_type

Initial value:
A payload for the grid collections of a detector.
Definition payloads.hpp:344

Payload type that the reader processes.

Member Function Documentation

◆ header_to_payload()

template<class detector_t>
auto detray::io::material_map_writer::header_to_payload ( const detector_t & det,
const std::string_view det_name )
static

Convert the header information into its payload.

Template Parameters
detector_tDetector type to serialize.
Parameters
detDetector whose material grids are written.
det_nameName recorded in the serialized header.
Returns
Header payload describing the material grids.

◆ to_payload()

template<class detector_t>
payload_type detray::io::material_map_writer::to_payload ( const detector_t & det,
const typename detector_t::name_map &  )
static

Convert the material description of a detector det into its io payload.

Template Parameters
detector_tDetector type to serialize.
Parameters
detDetector whose material maps are serialized.
Returns
Payload containing material-grid entries grouped by volume.