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

High-level interface to initialize and monitor the main framework configuration. More...

#include <HyperisoMaster.h>

Inheritance diagram for HyperisoMaster:
Collaboration diagram for HyperisoMaster:

Public Member Functions

void init (const std::string &lhaFile, HyperisoConfig config)
 Initializes Hyperiso using a LHA file and a full Config object.
 
void pre_init_add_block (BlockName blockName, size_t itemCount=2, size_t valueIdx=1, int scaleIdx=-1, int rgIdx=-1, int binIdx=-1, bool globalScale=false)
 Registers one additional LHA block prototype before init().
 
void pre_init_add_blocks (const std::vector< LhaPrototypeSpec > &prototypes)
 Registers several additional LHA block prototypes before init().
 
void pre_init_set_marty_path (const std::string &martyInstallPath)
 Registers an existing MARTY installation before init().
 
void pre_init_set_softsusy_path (const std::string &softsusyPath)
 Registers a SOFTSUSY executable or installation directory before init().
 
void pre_init_set_paths (const std::map< APIPath, std::string > &pathOverrides)
 Overrides selected HyperISO filesystem paths before init().
 
void pre_init_set_marty_cache_dir (const std::string &cacheDir)
 Sets the writable MARTY generated-code/cache directory before init().
 
void pre_init_set_spectrum_cache_dir (const std::string &cacheDir)
 Sets the writable spectrum cache directory before init().
 
void init (const std::string &lhaFile)
 Initializes Hyperiso with only the LHA file, using default config.
 
bool check_flag (ExternalFlag flag)
 Checks if a specific external flag is active.
 
Model get_model ()
 Retrieves the current model type used by Hyperiso.
 
void switch_lha (const std::string &lhaFile, HyperisoConfig config)
 Switches the LHA file and applies a new configuration.
 
- Public Member Functions inherited from IMonitor< ExternalFlag >
virtual ~IMonitor ()=default
 Virtual destructor for proper polymorphic use.
 

Detailed Description

High-level interface to initialize and monitor the main framework configuration.

This class is a convenience façade over the low-level infrastructure:

  • It sets up a MemoryManager with concrete loaders and path providers.
  • It initializes Hyperiso from an LHA file and configuration.
  • It exposes monitoring/inspection utilities for external flags and the active model.

Typical usage:

Config config;
config.model = Model::SM;
master.init("input.lha", config);
// ...
}
Model active_model = master.get_model();
@ IS_LHA_SPECTRUM
Input LHA file already contains a spectrum.
Model
High-level interface to initialize and monitor the main framework configuration.
void init(const std::string &lhaFile, HyperisoConfig config)
Initializes Hyperiso using a LHA file and a full Config object.
bool check_flag(ExternalFlag flag)
Checks if a specific external flag is active.
Model get_model()
Retrieves the current model type used by Hyperiso.
See also
MemoryManager
ParamBlockLoader
CorrelationLoader
SpectrumCalculator
DefaultPathsProvider
Examples
examples/monitoring_system_example.cpp.

Definition at line 61 of file HyperisoMaster.h.

Member Function Documentation

◆ check_flag()

bool HyperisoMaster::check_flag ( ExternalFlag  flag)
virtual

Checks if a specific external flag is active.

Delegates to the MemoryManager::getMemoryCache().config.flags map.

Parameters
flagThe flag to check.
Returns
True if active, false otherwise.

Implements IMonitor< ExternalFlag >.

Examples
examples/monitoring_system_example.cpp.

Definition at line 303 of file HyperisoMaster.cpp.

◆ get_model()

Model HyperisoMaster::get_model ( )

Retrieves the current model type used by Hyperiso.

Delegates to MemoryManager::getMemoryCache().config.model.

Returns
The active model.

Definition at line 307 of file HyperisoMaster.cpp.

◆ init() [1/2]

void HyperisoMaster::init ( const std::string &  lhaFile)

Initializes Hyperiso with only the LHA file, using default config.

Equivalent to calling:

Config cfg; // default constructed (SM, no special flags)
master.init(lhaFile, cfg);
Parameters
lhaFilePath to the LHA input file.

Definition at line 299 of file HyperisoMaster.cpp.

◆ init() [2/2]

void HyperisoMaster::init ( const std::string &  lhaFile,
HyperisoConfig  config 
)

Initializes Hyperiso using a LHA file and a full Config object.

Internally:

Parameters
lhaFilePath to the LHA input file.
configConfiguration settings to drive initialization.
Examples
examples/monitoring_system_example.cpp.

Definition at line 185 of file HyperisoMaster.cpp.

◆ pre_init_add_block()

void HyperisoMaster::pre_init_add_block ( BlockName  blockName,
size_t  itemCount = 2,
size_t  valueIdx = 1,
int  scaleIdx = -1,
int  rgIdx = -1,
int  binIdx = -1,
bool  globalScale = false 
)

Registers one additional LHA block prototype before init().

Must be called before init() to affect the first LHA parsing.

Definition at line 195 of file HyperisoMaster.cpp.

◆ pre_init_add_blocks()

void HyperisoMaster::pre_init_add_blocks ( const std::vector< LhaPrototypeSpec > &  prototypes)

Registers several additional LHA block prototypes before init().

Definition at line 213 of file HyperisoMaster.cpp.

◆ pre_init_set_marty_cache_dir()

void HyperisoMaster::pre_init_set_marty_cache_dir ( const std::string &  cacheDir)

Sets the writable MARTY generated-code/cache directory before init().

The directory is created if it does not exist.

Definition at line 289 of file HyperisoMaster.cpp.

◆ pre_init_set_marty_path()

void HyperisoMaster::pre_init_set_marty_path ( const std::string &  martyInstallPath)

Registers an existing MARTY installation before init().

The path may point to the MARTY install prefix itself, or to a nearby include/, lib/, MARTY_INSTALL/, install/, marty.h, or libmarty file. The normalized installation is validated immediately and reused by the MARTY code-generation layer instead of the bundled Third_party/MARTY path.

Definition at line 225 of file HyperisoMaster.cpp.

◆ pre_init_set_paths()

void HyperisoMaster::pre_init_set_paths ( const std::map< APIPath, std::string > &  pathOverrides)

Overrides selected HyperISO filesystem paths before init().

Each entry is validated before being installed: default input files must exist and use the .json extension, user input files must exist and use .yaml or .yml, and directory entries must exist as directories. LHA_PATH is intentionally excluded because the active LHA file is provided directly to init() or switch_lha().

Calling this after init() is supported only for future reload/switch operations and emits a warning.

Parameters
pathOverridesMap from APIPath values to replacement filesystem paths.

Definition at line 252 of file HyperisoMaster.cpp.

◆ pre_init_set_softsusy_path()

void HyperisoMaster::pre_init_set_softsusy_path ( const std::string &  softsusyPath)

Registers a SOFTSUSY executable or installation directory before init().

The path may point directly to softpoint.x, or to a directory containing softpoint.x, bin/softpoint.x, or src/SOFTSUSY/softpoint.x. This runtime path is used even when Hyperiso was not built with BUILD_WITH_SOFTSUSY.

Definition at line 243 of file HyperisoMaster.cpp.

◆ pre_init_set_spectrum_cache_dir()

void HyperisoMaster::pre_init_set_spectrum_cache_dir ( const std::string &  cacheDir)

Sets the writable spectrum cache directory before init().

The directory is created if it does not exist.

Definition at line 294 of file HyperisoMaster.cpp.

◆ switch_lha()

void HyperisoMaster::switch_lha ( const std::string &  lhaFile,
HyperisoConfig  config 
)

Switches the LHA file and applies a new configuration.

Internally calls MemoryManager::switch_lha(lhaFile, config), which:

  • Restores the default cache snapshot,
  • Re-reads spectrum / LHA data,
  • Updates the internal Config and flags.
Parameters
lhaFilePath to the LHA input file.
configConfiguration to use for Hyperiso.

Definition at line 311 of file HyperisoMaster.cpp.


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