Go to the source code of this file.
◆ DiagMCMC()
void DiagMCMC |
( |
const std::string & |
inputFile, |
|
|
const std::string & |
config |
|
) |
| |
Main function creating MCMCProcessor and calling MCMC Diagnostic.
- Parameters
-
inputFile | MCMC Chain |
config | Config file with settings |
Definition at line 8 of file DiagMCMC.cpp.
15 auto Processor = std::make_unique<MCMCProcessor>(inputFile);
16 Processor->SetOutputSuffix(
"_MCMC_Diag");
18 Processor->SetExcludedTypes(
GetFromManager<std::vector<std::string>>(Settings[
"DiagMCMC"][
"ExcludedTypes"], {}));
19 Processor->SetExcludedNames(
GetFromManager<std::vector<std::string>>(Settings[
"DiagMCMC"][
"ExcludedNames"], {}));
20 Processor->SetExcludedGroups(
GetFromManager<std::vector<std::string>>(Settings[
"DiagMCMC"][
"ExcludedGroups"], {}));
21 Processor->SetPlotRelativeToPrior(GetFromManager<bool>(Settings[
"DiagMCMC"][
"PlotRelativeToPrior"],
false));
23 Processor->SetnBatches(GetFromManager<int>(Settings[
"DiagMCMC"][
"nBatches"], 20));
24 Processor->SetnLags(GetFromManager<int>(Settings[
"DiagMCMC"][
"nLags"], 25000));
25 Processor->SetPrintToPDF(GetFromManager<bool>(Settings[
"PrintToPDF"],
true));
26 Processor->Initialise();
27 if(Settings[
"MaxEntries"]) {
28 Processor->SetEntries(Get<int>(Settings[
"MaxEntries"], __FILE__, __LINE__));
31 Processor->DiagMCMC();
Type GetFromManager(const YAML::Node &node, Type defval, const std::string File="", const int Line=1)
Get content of config file if node is not found take default value specified.
#define M3OpenConfig(filename)
Macro to simplify calling LoadYaml with file and line info.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 34 of file DiagMCMC.cpp.
42 std::string filename = argv[1];
43 std::string
config = argv[2];
void DiagMCMC(const std::string &inputFile, const std::string &config)
Main function creating MCMCProcessor and calling MCMC Diagnostic.
void SetMaCh3LoggerFormat()
Set messaging format of the logger.
Custom exception class for MaCh3 errors.