Facade class that manages writing data to various file formats.
More...
#include <FileWriter.hpp>
|
| | FileWriter (const correlation::analysis::DistributionFunctions &dists) |
| | Constructs a FileWriter linked to a DistributionFunctions object.
|
| void | write (const std::string &base_path, bool use_csv, bool use_hdf5, bool use_parquet, bool smoothing) const |
| | Writes the available histograms using specified formats.
|
| std::expected< void, std::string > | writeBundle (const std::string &zip_path, bool use_csv=true, bool use_hdf5=false, bool use_parquet=false, bool include_svg=true, bool smoothing=true, const std::vector< std::string > &selected_algorithms={}) const |
| | Writes a consolidated ZIP bundle containing plots, tables, and summary.
|
| std::expected< void, std::string > | writeFolder (const std::string &dest_dir, bool use_csv=true, bool use_hdf5=false, bool use_parquet=false, bool include_svg=true, bool smoothing=true, const std::vector< std::string > &selected_algorithms={}) const |
| | Writes analysis outputs into categorized subfolders within a destination folder.
|
Facade class that manages writing data to various file formats.
This class orchestrates the usage of specific writers (CSV, HDF5, Parquet) based on provided options.
◆ FileWriter()
Constructs a FileWriter linked to a DistributionFunctions object.
- Parameters
-
| dists | The DistributionFunctions object containing the data to be written. |
◆ write()
| void correlation::writers::FileWriter::write |
( |
const std::string & | base_path, |
|
|
bool | use_csv, |
|
|
bool | use_hdf5, |
|
|
bool | use_parquet, |
|
|
bool | smoothing ) const |
Writes the available histograms using specified formats.
- Parameters
-
| base_path | The base name for the output files (e.g., "output/my_sample"). |
| use_csv | Whether to write CSV files. |
| use_hdf5 | Whether to write an HDF5 file. |
| use_parquet | Whether to write Parquet files. |
| smoothing | Whether to include smoothed data. |
◆ writeBundle()
| std::expected< void, std::string > correlation::writers::FileWriter::writeBundle |
( |
const std::string & | zip_path, |
|
|
bool | use_csv = true, |
|
|
bool | use_hdf5 = false, |
|
|
bool | use_parquet = false, |
|
|
bool | include_svg = true, |
|
|
bool | smoothing = true, |
|
|
const std::vector< std::string > & | selected_algorithms = {} ) const |
Writes a consolidated ZIP bundle containing plots, tables, and summary.
- Parameters
-
| zip_path | The target path for the zip file (e.g., "output/bundle.zip"). |
| use_csv | Whether to include CSV tables. |
| use_hdf5 | Whether to include HDF5 data. |
| use_parquet | Whether to include Parquet data. |
| include_svg | Whether to include SVG plots. |
| smoothing | Whether to include smoothed curves. |
- Returns
- std::expected<void, std::string> Success or error message.
◆ writeFolder()
| std::expected< void, std::string > correlation::writers::FileWriter::writeFolder |
( |
const std::string & | dest_dir, |
|
|
bool | use_csv = true, |
|
|
bool | use_hdf5 = false, |
|
|
bool | use_parquet = false, |
|
|
bool | include_svg = true, |
|
|
bool | smoothing = true, |
|
|
const std::vector< std::string > & | selected_algorithms = {} ) const |
Writes analysis outputs into categorized subfolders within a destination folder.
- Parameters
-
| dest_dir | Destination directory path. |
| use_csv | Whether to include CSV tables in csv/. |
| use_hdf5 | Whether to include HDF5 data in hdf5/. |
| use_parquet | Whether to include Parquet data in arrow/. |
| include_svg | Whether to include SVG plots in plots/. |
| smoothing | Whether to include smoothed curves. |
| selected_algorithms | Optional filter list of algorithms to export (empty for all). |
- Returns
- std::expected<void, std::string> Success or error message.
◆ writeSummaryFile()
| void correlation::writers::FileWriter::writeSummaryFile |
( |
const std::string & | base_path | ) |
const |
|
private |
◆ df_
Pointer to the analysis data structure.
The documentation for this class was generated from the following files: