51 std::string OutputFilename = std::string(OutputFile->GetName());
59 TTree *SaveBranch =
new TTree(
"Settings",
"Settings");
62 SaveBranch->Branch(
"Output", &OutputFilename);
66 bool cpu_mp_on =
true;
67 int n_cpus = omp_get_max_threads();
69 bool cpu_mp_on =
false;
79 SaveBranch->Branch(
"GPU", &gpu_on);
80 SaveBranch->Branch(
"CPUMP", &cpu_mp_on);
81 SaveBranch->Branch(
"nCPUs", &n_cpus);
101 if (
config[
"LikelihoodOptions"])
103 auto likelihood = GetFromManager<std::string>(
config[
"LikelihoodOptions"][
"TestStatistic"],
"Barlow-Beeston", __FILE__ , __LINE__);
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
#define _MaCh3_Safe_Include_End_
KS: Restore warning checking after including external headers.
void SetMaCh3LoggerFormat()
Set messaging format of the logger.
std::string TestStatistic_ToString(const TestStatistic TestStat)
Convert a LLH type to a string.
TestStatistic
Make an enum of the test statistic that we're using.
@ kNTestStatistics
Number of test statistics.
@ kPoisson
Standard Poisson likelihood .
TMacro YAMLtoTMacro(const YAML::Node &yaml_node, const std::string &name)
Convert a YAML node to a ROOT TMacro object.
#define M3OpenConfig(filename)
Macro to simplify calling LoadYaml with file and line info.
Custom exception class used throughout MaCh3.
void Initialise()
Common inialiser for both constructors.
int GetMCStatLLH() const
Get likelihood type defined in the config.
virtual ~Manager()
Destroys the manager object.
YAML::Node config
The YAML node containing the configuration data.
Manager(std::string const &filename)
Constructs a manager object with the specified file name.
void SaveSettings(TFile *const OutputFile) const
Add manager useful information's to TFile, in most cases to Fitter.
std::string FileName
The name of the configuration file.
void Print() const
Print currently used config.
void PrintConfig(const YAML::Node &node)
KS: Print Yaml config using logger.
void MaCh3Welcome()
KS: Prints welcome message with MaCh3 logo.