ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::io::detector_writer_config Struct Reference

config struct for detector writing. More...

#include <detray/io/frontend/detector_writer_config.hpp>

Collaboration diagram for detray::io::detector_writer_config:
[legend]

Public Member Functions

const std::string & path () const
 GettersReturn the output directory used for detector files.
detray::io::format format () const
 Return the selected output format.
bool replace_files () const
 Return whether existing output files are replaced.
bool compactify_json () const
 Return whether JSON output is compacted.
bool write_material () const
 Return whether material data is written.
bool write_grids () const
 Return whether accelerator grids are written.
detector_writer_config & path (std::string p)
 SettersSet the output directory.
detector_writer_config & format (detray::io::format f)
 Select the serialization format.
detector_writer_config & replace_files (bool flag)
 Configure whether to replace existing files.
detector_writer_config & compactify_json (bool flag)
 Configure whether to compactify JSON output.
detector_writer_config & write_material (bool flag)
 Configure whether to include material data.
detector_writer_config & write_grids (bool flag)
 Configure whether to include accelerator-grid data.

Public Attributes

bool m_compact_io = false
 Compactify json output, if not json format this flag does nothing.
detray::io::format m_format = detray::io::format::json
 The output file format.
std::string m_path {"./"}
 The path to the output files.
bool m_replace = false
 Replace files in case they already exists.
bool m_write_grids = true
 Whether to write the accelerator grids to file.
bool m_write_material = true
 Whether to write the material to file.

Detailed Description

config struct for detector writing.

Member Function Documentation

◆ compactify_json() [1/2]

bool detray::io::detector_writer_config::compactify_json ( ) const

Return whether JSON output is compacted.

Returns
whether JSON compaction is enabled

◆ compactify_json() [2/2]

detector_writer_config & detray::io::detector_writer_config::compactify_json ( bool flag)

Configure whether to compactify JSON output.

Parameters
flagwhether the option is enabled
Returns
this configuration for chaining

◆ format() [1/2]

detray::io::format detray::io::detector_writer_config::format ( ) const

Return the selected output format.

Returns
configured output format

◆ format() [2/2]

detector_writer_config & detray::io::detector_writer_config::format ( detray::io::format f)

Select the serialization format.

Parameters
frequested output format
Returns
this configuration for chaining

◆ path() [1/2]

const std::string & detray::io::detector_writer_config::path ( ) const

GettersReturn the output directory used for detector files.

Returns
output directory path

◆ path() [2/2]

detector_writer_config & detray::io::detector_writer_config::path ( std::string p)

SettersSet the output directory.

Parameters
pdestination directory
Returns
this configuration for chaining

◆ replace_files() [1/2]

bool detray::io::detector_writer_config::replace_files ( ) const

Return whether existing output files are replaced.

Returns
whether replacement is enabled

◆ replace_files() [2/2]

detector_writer_config & detray::io::detector_writer_config::replace_files ( bool flag)

Configure whether to replace existing files.

Parameters
flagwhether the option is enabled
Returns
this configuration for chaining

◆ write_grids() [1/2]

bool detray::io::detector_writer_config::write_grids ( ) const

Return whether accelerator grids are written.

Returns
whether grid output is enabled

◆ write_grids() [2/2]

detector_writer_config & detray::io::detector_writer_config::write_grids ( bool flag)

Configure whether to include accelerator-grid data.

Parameters
flagwhether the option is enabled
Returns
this configuration for chaining

◆ write_material() [1/2]

bool detray::io::detector_writer_config::write_material ( ) const

Return whether material data is written.

Returns
whether material output is enabled

◆ write_material() [2/2]

detector_writer_config & detray::io::detector_writer_config::write_material ( bool flag)

Configure whether to include material data.

Parameters
flagwhether the option is enabled
Returns
this configuration for chaining