Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ParamWriter.cpp
Go to the documentation of this file.
1#include "ParamWriter.h"
2
3#include <iomanip>
4
5void ParamWriter::writeParams(std::ofstream& outputFile, const std::unordered_map<std::string, double>& params) {
6 // Keep the historical MARTY parameter-file representation. C9 in the
7 // THDM is a small cancellation-sensitive quantity, and changing the CSV
8 // serialization from the legacy six significant digits to full binary
9 // precision changes the established numerical result even though the
10 // analytical Wilson expression is identical.
11 outputFile << std::defaultfloat << std::setprecision(6);
12
13 for (const auto& [name, value] : params) {
14 std::string real_name = name;
15 outputFile << real_name << "," << value << "\n";
16 }
17
18}
Declares a small helper to write parameter maps to CSV files.
void writeParams(std::ofstream &outputFile, const std::unordered_map< std::string, double > &params)
Writes a map of parameters to an output stream.