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

Factory and dispatcher for spectrum calculators and commands. More...

#include <Interface.h>

Static Public Member Functions

static std::shared_ptr< ICalculatorcreateCalculator (CalculatorType type)
 Creates a concrete calculator for a given type.
 
static void executeCommand (CalculatorType type, const std::string &commandName, const std::string &inputFilePath, const std::string &outputFilePath)
 Executes a named command on a chosen calculator type.
 

Detailed Description

Factory and dispatcher for spectrum calculators and commands.

GeneralCalculatorFactory is responsible for:

It is the main integration point between higher-level code (e.g. SpectrumCalculator, MemoryManager) and the low-level calculator backends.

Definition at line 150 of file Interface.h.

Member Function Documentation

◆ createCalculator()

std::shared_ptr< ICalculator > GeneralCalculatorFactory::createCalculator ( CalculatorType  type)
static

Creates a concrete calculator for a given type.

This method hides the compile-time conditional availability of calculators (e.g. SOFTSUSY, 2HDMC) behind a single entry point.

Parameters
typeThe requested calculator type.
Returns
Shared pointer to a concrete ICalculator instance.
Exceptions
std::invalid_argumentif type is invalid or unsupported.

Definition at line 8 of file Interface.cpp.

◆ executeCommand()

void GeneralCalculatorFactory::executeCommand ( CalculatorType  type,
const std::string &  commandName,
const std::string &  inputFilePath,
const std::string &  outputFilePath 
)
static

Executes a named command on a chosen calculator type.

Currently supported commandName values:

Parameters
typeCalculator type to use.
commandNameName of the command (e.g. "calculateSpectrum").
inputFilePathPath to the input file.
outputFilePathPath to the output file.

If the command name is unknown, an error message is printed to stderr.

Definition at line 19 of file Interface.cpp.


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