|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
High-level helper for writing modified model code and parameter files. More...
#include <ModelWriter.h>
Public Member Functions | |
| ModelWriter (LineProcessor &lineProcessor, ParamWriter ¶mwriter) | |
| Constructs a ModelWriter with the given helpers. | |
| void | writeModel (std::ifstream &inputFile, std::ofstream &outputFile) |
| Processes the model source and writes the transformed file. | |
| void | writeParam (std::ofstream ¶mFile, const std::unordered_map< std::string, double > ¶ms) |
| Writes parameters to the parameter file. | |
High-level helper for writing modified model code and parameter files.
Definition at line 28 of file ModelWriter.h.
| ModelWriter::ModelWriter | ( | LineProcessor & | lineProcessor, |
| ParamWriter & | paramwriter | ||
| ) |
Constructs a ModelWriter with the given helpers.
| lineProcessor | Reference to a configured LineProcessor. |
| paramwriter | Reference to a ParamWriter instance. |
Definition at line 3 of file ModelWriter.cpp.
| void ModelWriter::writeModel | ( | std::ifstream & | inputFile, |
| std::ofstream & | outputFile | ||
| ) |
Processes the model source and writes the transformed file.
Reads inputFile line by line and forwards each line through LineProcessor::processLine, writing the result to outputFile.
| inputFile | Open input stream referring to the original model file. |
| outputFile | Open output stream where the modified code is written. |
Definition at line 5 of file ModelWriter.cpp.
| void ModelWriter::writeParam | ( | std::ofstream & | paramFile, |
| const std::unordered_map< std::string, double > & | params | ||
| ) |
Writes parameters to the parameter file.
Uses ParamWriter::writeParams to emit lines of the form name,value into paramFile.
| paramFile | Open output stream for the parameter file. |
| params | Map from parameter name to value. |
Definition at line 12 of file ModelWriter.cpp.