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

Emits C++ helper code to handle CLI, IO and Wilson output. More...

#include <MartyFileWriter.h>

Public Member Functions

 MartyFileWriter (const std::string &wilson, const std::string &model, bool bsm_split_generation=false, bool full_target_generation=false)
 Constructs a MartyFileWriter for a given (wilson, model) pair.
 
void add_output_writer (std::ofstream &outputFile)
 Writes C++ code that handles writing Wilson coefficients to a CSV.
 
void add_argpars (std::ofstream &outputFile)
 Writes C++ code to parse command-line arguments.
 
void add_input_reader (std::ofstream &outputFile)
 Writes C++ code to read numerical parameters from disk.
 

Detailed Description

Emits C++ helper code to handle CLI, IO and Wilson output.

MartyFileWriter writes small C++ snippets into a given std::ofstream, tailored for a specific (wilson, model) combination. It does not own the stream; the caller is responsible for opening and closing the file.

Definition at line 30 of file MartyFileWriter.h.

Constructor & Destructor Documentation

◆ MartyFileWriter()

MartyFileWriter::MartyFileWriter ( const std::string &  wilson,
const std::string &  model,
bool  bsm_split_generation = false,
bool  full_target_generation = false 
)

Constructs a MartyFileWriter for a given (wilson, model) pair.

Parameters
wilsonWilson basis or identifier (used in filenames and in code).
modelPhysics model name (used in filenames and in code).

Definition at line 30 of file MartyFileWriter.cpp.

Member Function Documentation

◆ add_argpars()

void MartyFileWriter::add_argpars ( std::ofstream &  outputFile)

Writes C++ code to parse command-line arguments.

The generated code processes arguments like:

  • --Q_match / -Q to override the matching scale,
  • --help / -h to print a small usage message and exit.
Parameters
outputFileStream representing the generated C++ file.

Definition at line 141 of file MartyFileWriter.cpp.

◆ add_input_reader()

void MartyFileWriter::add_input_reader ( std::ofstream &  outputFile)

Writes C++ code to read numerical parameters from disk.

The generated code:

  • builds the parameter file path via FileNameManager,
  • opens the file,
  • calls readParams(ParamFile, param.realParams, param.complexParams); on a param_t object.
Parameters
outputFileStream representing the generated C++ file.

Definition at line 169 of file MartyFileWriter.cpp.

◆ add_output_writer()

void MartyFileWriter::add_output_writer ( std::ofstream &  outputFile)

Writes C++ code that handles writing Wilson coefficients to a CSV.

The generated code typically:

  • computes the output path via FileNameManager,
  • calls setMu(Q_match),
  • calls writeWilsonCoefficients(...) with the proper arguments.
Parameters
outputFileStream representing the generated C++ file.

Definition at line 43 of file MartyFileWriter.cpp.


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