Skip to content

Rework File IO

Simon Spannagel requested to merge output_dir into master

This MR reworks and unifies the input and output of files and paths. The following changes have been made:

  • ModuleManager and central Corryvreckan class are now independent (more of a structural than functional change)
  • All input paths are now taken relative to the configuration file. In modules, use config.getPath("myfile") instead of config.get<std::string>("myfile) as the latter will again be relative to the executing folder, not to the configuration file.
  • There are three new global parameters output_directory, deny_overwrite, purge_output_directory, described in the manual.
  • Output files created my modules should use
    auto path = createOutputFile(config.get<std::string>("output_file_name"));
    auto my_file = std::ofstream(path);
    in order to end up in the configured output directory
  • The global configuration is not anymore inherited by individual modules. This was very messy anyway.

This fixes #17 (closed)

Edited by Simon Spannagel

Merge request reports