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

Compilation strategy using a make-based build system. More...

#include <MakeCompilerStrategy.h>

Inheritance diagram for MakeCompilerStrategy:
Collaboration diagram for MakeCompilerStrategy:

Public Member Functions

 MakeCompilerStrategy (std::string model, std::string wilson)
 Constructs a MakeCompilerStrategy for a given (model, wilson) pair.
 
void compile_run (const std::string &sourceFile, const std::string &outputBinary) override
 Compiles if necessary and then runs the resulting binary.
 
void compile (const std::string &sourceFile, const std::string &outputBinary) override
 Invokes make in the given source directory.
 
void set_Q_match (double Q_match)
 Sets the matching scale $Q_{\text{match}}$ passed to the binary.
 
void set_param_file (std::filesystem::path path)
 
void set_output_file (std::filesystem::path path)
 
- Public Member Functions inherited from CompilerStrategy
 CompilerStrategy (std::string model, std::string wilson)
 Constructs a CompilerStrategy with a given model and Wilson label.
 
virtual ~CompilerStrategy ()=default
 Virtual destructor.
 
virtual bool check_if_compile (const std::string &outputBinary)
 Checks whether a compiled binary already exists and is non-empty.
 

Public Attributes

double Q_match = 80.379
 Matching scale (default: 80.379 GeV, the physical W mass).
 

Additional Inherited Members

- Protected Attributes inherited from CompilerStrategy
std::string model
 Model name.
 
std::string wilson
 Wilson basis / label name.
 

Detailed Description

Compilation strategy using a make-based build system.

MakeCompilerStrategy assumes that:

  • sourceFile passed to compile() is a directory containing a Makefile,
  • running make in that directory builds the desired binary,
  • compile_run() can then execute the binary with a -Q option specifying a matching scale.

Definition at line 29 of file MakeCompilerStrategy.h.

Constructor & Destructor Documentation

◆ MakeCompilerStrategy()

MakeCompilerStrategy::MakeCompilerStrategy ( std::string  model,
std::string  wilson 
)
inline

Constructs a MakeCompilerStrategy for a given (model, wilson) pair.

Parameters
modelModel name (metadata only).
wilsonWilson basis / label (metadata only).

Definition at line 37 of file MakeCompilerStrategy.h.

Member Function Documentation

◆ compile()

void MakeCompilerStrategy::compile ( const std::string &  sourceFile,
const std::string &  outputBinary 
)
overridevirtual

Invokes make in the given source directory.

Parameters
sourceFileDirectory in which to run make.
outputBinaryUnused here except for consistency with interface; the Makefile determines the real output name.

Implements CompilerStrategy.

Definition at line 22 of file MakeCompilerStrategy.cpp.

◆ compile_run()

void MakeCompilerStrategy::compile_run ( const std::string &  sourceFile,
const std::string &  outputBinary 
)
overridevirtual

Compiles if necessary and then runs the resulting binary.

If check_if_compile() returns false, compile() is called first. The resulting binary is then run with: outputBinary -Q <Q_match>

Parameters
sourceFileDirectory containing the Makefile.
outputBinaryPath/name of the binary to run.

Implements CompilerStrategy.

Definition at line 7 of file MakeCompilerStrategy.cpp.

◆ set_output_file()

void MakeCompilerStrategy::set_output_file ( std::filesystem::path  path)
inline

Use an invocation-local Wilson CSV instead of the shared default.

Definition at line 74 of file MakeCompilerStrategy.h.

◆ set_param_file()

void MakeCompilerStrategy::set_param_file ( std::filesystem::path  path)
inline

Use an invocation-local parameter CSV instead of the shared default.

Definition at line 71 of file MakeCompilerStrategy.h.

◆ set_Q_match()

void MakeCompilerStrategy::set_Q_match ( double  Q_match)
inline

Sets the matching scale $Q_{\text{match}}$ passed to the binary.

The scale is used by compile_run() when executing: outputBinary -Q <Q_match>.

Parameters
Q_matchMatching scale in GeV.

Definition at line 68 of file MakeCompilerStrategy.h.

Member Data Documentation

◆ Q_match

double MakeCompilerStrategy::Q_match = 80.379

Matching scale (default: 80.379 GeV, the physical W mass).

Definition at line 77 of file MakeCompilerStrategy.h.


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