1#ifndef HYPERISO_BANNER_H
2#define HYPERISO_BANNER_H
18#ifndef HYPERISO_AUTHORS
19#define HYPERISO_AUTHORS "Theo Reymermier, Niels Fardeau and the Hyperiso contributors"
36 const std::string lha_path = resolve_lha_path(lha_file, assets_root);
40 std::cout <<
" H Y P E R I S O v" << project_version <<
"\n";
41 std::cout <<
" High-energy flavour observables and Wilson coefficient engine\n";
45 print_section(
"Session");
46 print_kv(
"Model", model_name(config.
model));
47 print_kv(
"LHA input", lha_path);
48 print_kv(
"Assets root", assets_root);
50 print_section(
"Read-only defaults");
57 print_section(
"Input overrides / packaged templates");
66 print_section(
"Writable runtime directories");
70 if (uses_marty(config)) {
71 print_section(
"MARTY backend");
78 print_kv(
"Wilson CSV", marty_wilson_csv_path(mm, config));
82 std::cout << std::endl;
86 static constexpr int key_width = 24;
87 static constexpr int banner_width = 92;
89 static void print_rule(
char c)
91 std::cout << std::string(banner_width, c) <<
"\n";
94 static void print_section(
const std::string& name)
96 std::cout <<
"\n[" <<
name <<
"]\n";
99 static void print_kv(
const std::string& key,
const std::string& value)
101 std::cout <<
" " << std::left << std::setw(key_width) << key <<
" : " << value <<
"\n";
108 }
catch (
const std::exception& e) {
109 return std::string(
"<unavailable: ") + e.what() +
">";
111 return "<unavailable>";
115 static std::string path_join(
const std::string& lhs,
const std::string& rhs)
120 return (std::filesystem::path(lhs) / rhs).string();
123 static std::string resolve_lha_path(
const std::string& lha_file,
const std::string& assets_root)
125 const std::filesystem::path input(lha_file);
126 if (input.is_absolute()) {
127 return input.string();
129 return (std::filesystem::path(assets_root) / input).string();
132 static std::string optional_string(
const std::optional<std::string>& value)
134 return value.has_value() ? value.value() : std::string(
"<not set>");
137 static std::string optional_path(
const std::optional<std::filesystem::path>& value)
139 return value.has_value() ? value.value().string() : std::string(
"<not set>");
150 static std::string model_name(
Model model)
157 std::ostringstream oss;
158 oss <<
"Model(" <<
static_cast<int>(model) <<
")";
APIPath
Enumerates the filesystem paths exposed through the public API.
@ USER_OBS_VALUES
YAML/YML file containing user observable overrides.
@ DEFAULT_NUISANCES
JSON file containing default nuisance definitions.
@ USER_OBS_CORR
YAML/YML file containing user observable correlation overrides.
@ USER_NUISANCES
YAML/YML file containing user nuisance overrides.
@ TEMPLATE_DIR
Read-only directory containing generated-code templates.
@ DEFAULT_OBS_CORR
JSON file containing default observable correlations.
@ USER_PARAM_CORR
YAML/YML file containing user parameter correlation overrides.
@ DEFAULT_PARAM_VALUES
JSON file containing default parameter values.
@ USER_SM_PARAMS
YAML/YML file containing user SM parameter overrides.
@ DEFAULT_OBS_VALUES
JSON file containing default observable values.
@ MARTY_TEMP_DIR
Writable cache directory used for generated MARTY files.
@ PARAM_MAPPING_DIR
Read-only directory containing MARTY/Hyperiso parameter mappings.
@ SPECTRUM_DIR
Writable cache directory used for generated spectrum files.
@ USER_FLAVOR_PARAMS
YAML/YML file containing user flavor parameter overrides.
@ ASSETS_ROOT
Root directory for HyperISO read-only assets.
@ DEFAULT_PARAM_CORR
JSON file containing default parameter correlations.
@ USER_DECAY_PARAMS
YAML/YML file containing user decay parameter overrides.
Manages memory caching, parameter blocks, and LHA reader instances.
Pretty startup banner for Hyperiso sessions.
static void print_startup(const std::string &lha_file, const HyperisoConfig &config)
Singleton class responsible for initializing and managing memory, input files, and parameter blocks.
static MemoryManager * GetInstance()
Retrieves the singleton instance of MemoryManager.
fs::path get_path(APIPath path_name)
Retrieves a public API path from the runtime cache or path provider.
Configuration object controlling model, input flags and optional MARTY resources.
std::optional< fs::path > mty_bsm_mapping_path
Optional user-provided BSM mapping JSON.
std::optional< fs::path > mty_model_path
Path to the MARTY model file, if needed.
std::optional< std::string > mty_model_name
MARTY model class name, if needed.
Model model
Current model.