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.
TestStatistic
Make an enum of the test statistic that we're using.
@ kNTestStatistics
Number of test statistics.
@ kPoisson
Standard Poisson likelihood .
std::string TestStatistic_ToString(TestStatistic i)
Convert a LLH type to a string.
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 for MaCh3 errors.
void SaveSettings(TFile *const OutputFile)
Add manager useful information's to TFile, in most cases to Fitter.
std::string FileName
The name of the configuration file.
void Print()
Print currently used config.
int GetMCStatLLH()
Get likelihood type defined in the config.
manager(std::string const &filename)
Constructs a manager object with the specified file name.
YAML::Node config
The YAML node containing the configuration data.
void Initialise()
Common inialiser for both constructors.
virtual ~manager()
Destroys the manager object.
void PrintConfig(const YAML::Node &node)
KS: Print Yaml config using logger.
void MaCh3Welcome()
KS: Prints welcome message with MaCh3 logo.