|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Checks and resolves MARTY model classes in a model header. More...
#include <ModelFileChecker.h>
Public Member Functions | |
| ModelFileChecker (const std::string &filePath) | |
| Constructs a checker for a given file path. | |
| bool | isAnyModelTemplate () const |
| Tests whether the file contains any MARTY model template class. | |
| ModelClassInfo | resolveModelClass (const std::string &model) const |
| Resolve the concrete C++ class name for a user-provided model name. | |
Static Public Member Functions | |
| static std::vector< std::string > | modelClassCandidates (const std::string &model) |
| Return the exact candidate sequence used by resolveModelClass. | |
Checks and resolves MARTY model classes in a model header.
The resolver intentionally does not force the legacy _Model suffix. Given a model name such as THDM, it first looks for class THDM, then uppercase and lowercase variants, and only then tries the corresponding *_Model names. This keeps existing SM_Model / THDM_Model files working while allowing simpler class names in custom MARTY model headers.
Definition at line 36 of file ModelFileChecker.h.
| ModelFileChecker::ModelFileChecker | ( | const std::string & | filePath | ) |
Constructs a checker for a given file path.
| filePath | Path to the C++ source/header file to inspect. |
Definition at line 9 of file ModelFileChecker.cpp.
| bool ModelFileChecker::isAnyModelTemplate | ( | ) | const |
Tests whether the file contains any MARTY model template class.
This method is preserved for backwards compatibility. New code should prefer resolveModelClass.
Definition at line 22 of file ModelFileChecker.cpp.
|
static |
Return the exact candidate sequence used by resolveModelClass.
Definition at line 31 of file ModelFileChecker.cpp.
| ModelClassInfo ModelFileChecker::resolveModelClass | ( | const std::string & | model | ) | const |
Resolve the concrete C++ class name for a user-provided model name.
Candidate order for model is:
modelmodel)model)model_Modelmodel)_Modelmodel)_ModelDuplicate candidates are ignored. Both non-template and template class declarations are accepted.
| std::runtime_error | if no candidate is found or if the file cannot be opened. |
Definition at line 110 of file ModelFileChecker.cpp.