Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
FileWriter Class Reference

#include <FileWriter.h>

Inheritance diagram for FileWriter:
Collaboration diagram for FileWriter:

Public Member Functions

void write (const std::string &dest, std::shared_ptr< BlockAccessor > src=nullptr) override
 Export all blocks from an accessor or from the current database.
 
void write_blocks (const std::string &dest, const std::vector< BlockName > &block_names, std::shared_ptr< BlockAccessor > src=nullptr)
 Export only the requested blocks.
 
void write_parameters (const std::string &dest, const std::vector< ParamId > &parameter_ids, std::shared_ptr< BlockAccessor > src=nullptr)
 Export only the requested block/id parameters.
 
- Public Member Functions inherited from IDataWriter< const std::string &, std::shared_ptr< BlockAccessor > >
virtual ~IDataWriter ()=default
 Virtual destructor.
 

Detailed Description

Definition at line 26 of file FileWriter.h.

Member Function Documentation

◆ write()

void FileWriter::write ( const std::string &  dest,
std::shared_ptr< BlockAccessor src = nullptr 
)
overridevirtual

Export all blocks from an accessor or from the current database.

Parameters
destDestination filename. Its suffix selects the output format.
srcOptional source accessor. When null, the current database is used.
Exceptions
std::logic_errorIf the current database is requested before initialization.
std::invalid_argumentIf the destination suffix is unsupported.
std::runtime_errorIf the destination cannot be written.

Implements IDataWriter< const std::string &, std::shared_ptr< BlockAccessor > >.

Definition at line 115 of file FileWriter.cpp.

◆ write_blocks()

void FileWriter::write_blocks ( const std::string &  dest,
const std::vector< BlockName > &  block_names,
std::shared_ptr< BlockAccessor src = nullptr 
)

Export only the requested blocks.

Parameters
destDestination filename.
block_namesBlock names or aliases to export.
srcOptional source accessor. When null, the current database is used.
Exceptions
std::invalid_argumentIf a requested block does not exist.

Definition at line 119 of file FileWriter.cpp.

◆ write_parameters()

void FileWriter::write_parameters ( const std::string &  dest,
const std::vector< ParamId > &  parameter_ids,
std::shared_ptr< BlockAccessor src = nullptr 
)

Export only the requested block/id parameters.

ParameterType, when present in a ParamId, is used to resolve the source Parameters repository. Untyped identifiers are resolved from the supplied accessor or from the merged current database.

Parameters
destDestination filename.
parameter_idsParameter identifiers to export.
srcOptional source accessor used for untyped identifiers.
Exceptions
std::invalid_argumentIf a requested parameter does not exist.

Definition at line 143 of file FileWriter.cpp.


The documentation for this class was generated from the following files: