12#include "detray/io/frontend/definitions.hpp"
106 out <<
"\nDetector writer\n"
107 <<
"----------------------------\n"
108 <<
" Path : " << cfg.
path() <<
"\n"
109 <<
" Write grids : " << std::boolalpha << cfg.
write_grids()
113 if (cfg.
format() == detray::io::format::json) {
117 out << std::noboolalpha;
The following enums are global for all detectors.
Definition concepts.hpp:18
format
Supported serialization formats.
Definition definitions.hpp:30
config struct for detector writing.
Definition detector_writer_config.hpp:21
friend std::ostream & operator<<(std::ostream &out, const detector_writer_config &cfg)
Print the detector writer configuration.
Definition detector_writer_config.hpp:104
bool write_grids() const
Return whether accelerator grids are written.
Definition detector_writer_config.hpp:54
bool write_material() const
Return whether material data is written.
Definition detector_writer_config.hpp:51
std::string m_path
The path to the output files.
Definition detector_writer_config.hpp:23
bool m_write_grids
Whether to write the accelerator grids to file.
Definition detector_writer_config.hpp:33
detector_writer_config & compactify_json(bool flag)
Configure whether to compactify JSON output.
Definition detector_writer_config.hpp:83
bool m_write_material
Whether to write the material to file.
Definition detector_writer_config.hpp:31
bool m_replace
Replace files in case they already exists.
Definition detector_writer_config.hpp:27
detector_writer_config & write_grids(bool flag)
Configure whether to include accelerator-grid data.
Definition detector_writer_config.hpp:97
bool m_compact_io
Compactify json output, if not json format this flag does nothing.
Definition detector_writer_config.hpp:29
detray::io::format m_format
The output file format.
Definition detector_writer_config.hpp:25
detray::io::format format() const
Return the selected output format.
Definition detector_writer_config.hpp:42
detector_writer_config & path(std::string p)
SettersSet the output directory.
Definition detector_writer_config.hpp:62
bool compactify_json() const
Return whether JSON output is compacted.
Definition detector_writer_config.hpp:48
detector_writer_config & format(detray::io::format f)
Select the serialization format.
Definition detector_writer_config.hpp:69
detector_writer_config & replace_files(bool flag)
Configure whether to replace existing files.
Definition detector_writer_config.hpp:76
bool replace_files() const
Return whether existing output files are replaced.
Definition detector_writer_config.hpp:45
const std::string & path() const
GettersReturn the output directory used for detector files.
Definition detector_writer_config.hpp:39
detector_writer_config & write_material(bool flag)
Configure whether to include material data.
Definition detector_writer_config.hpp:90