|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Abstract base class for compilation and run strategies. More...
#include <CompilerStrategy.h>

Public Member Functions | |
| CompilerStrategy (std::string model, std::string wilson) | |
| Constructs a CompilerStrategy with a given model and Wilson label. | |
| virtual | ~CompilerStrategy ()=default |
| Virtual destructor. | |
| virtual void | compile_run (const std::string &sourceFile, const std::string &outputBinary)=0 |
| Compiles (if needed) and then runs the resulting binary. | |
| virtual void | compile (const std::string &sourceFile, const std::string &outputBinary)=0 |
| Compiles the given source file into an output binary. | |
| virtual bool | check_if_compile (const std::string &outputBinary) |
| Checks whether a compiled binary already exists and is non-empty. | |
Protected Attributes | |
| std::string | model |
| Model name. | |
| std::string | wilson |
| Wilson basis / label name. | |
Abstract base class for compilation and run strategies.
CompilerStrategy encapsulates how generated C++ code is compiled and/or executed. Concrete strategies can:
g++ directly (see GppCompilerStrategy),make-based build system (see MakeCompilerStrategy),Typical usage:
Definition at line 61 of file CompilerStrategy.h.
|
inline |
Constructs a CompilerStrategy with a given model and Wilson label.
| model | Name of the physics model (e.g. "SM", "SUSY"). |
| wilson | Name of the Wilson basis or identifier. |
Definition at line 69 of file CompilerStrategy.h.
|
virtualdefault |
Virtual destructor.
|
virtual |
Checks whether a compiled binary already exists and is non-empty.
This is used to avoid recompiling unchanged binaries on repeated calls.
| outputBinary | Path to the binary. |
true if the file exists and has non-zero size, false otherwise. Definition at line 33 of file CompilerStrategy.cpp.
|
pure virtual |
Compiles the given source file into an output binary.
Each concrete strategy is responsible for building the appropriate compiler command (e.g. g++, make, etc.) and calling executeCommand().
| sourceFile | Path to the generated C++ source. |
| outputBinary | Path/name of the binary to produce. |
Implemented in GppCompilerStrategy, and MakeCompilerStrategy.
|
pure virtual |
Compiles (if needed) and then runs the resulting binary.
The typical implementation:
| sourceFile | Path to the generated C++ source. |
| outputBinary | Path/name of the binary to produce and run. |
Implemented in GppCompilerStrategy, and MakeCompilerStrategy.
|
protected |
Model name.
Definition at line 110 of file CompilerStrategy.h.
|
protected |
Wilson basis / label name.
Definition at line 112 of file CompilerStrategy.h.