13 m_parser = std::make_unique<MaCh3ArgumentParser>(
"smear",
"1.0", argparse::default_arguments::help);
14 m_parser->add_description(
"Tool for smearing MCMC chains.");
15 m_parser->add_argument(
"mcmc-output")
16 .help(
"MCMC chain root file.")
17 .metavar(
"MCMC_CHAIN")
32 auto Processor = std::make_unique<MCMCProcessor>(inputFile);
33 Processor->SetOutputSuffix(
"_Smear_MCMC");
34 Processor->Initialise();
36 const auto& Smear = Settings[
"SmearChain"];
38 std::vector<std::string> Names = Get<std::vector<std::string>>(Smear[
"Smear"][0], __FILE__, __LINE__);
39 std::vector<double> ErrorValue = Get<std::vector<double>>(Smear[
"Smear"][1], __FILE__, __LINE__);
41 bool SaveUnsmearedBranch = GetFromManager<bool>(Smear[
"SaveUnsmearedBranch"],
false, __FILE__ , __LINE__);
42 Processor->SmearChain(Names, ErrorValue, SaveUnsmearedBranch);
48 std::string filename =
m_parser->get<std::string>(
"mcmc-output");
49 std::string config =
m_parser->get<std::string>(
"config");
73 void SmearChain(
const std::string& inputFile,
const std::string& config)
80 auto Processor = std::make_unique<MCMCProcessor>(inputFile);
81 Processor->SetOutputSuffix(
"_Smear_MCMC");
82 Processor->Initialise();
84 const auto& Smear = Settings[
"SmearChain"];
86 std::vector<std::string> Names = Get<std::vector<std::string>>(Smear[
"Smear"][0], __FILE__, __LINE__);
87 std::vector<double> ErrorValue = Get<std::vector<double>>(Smear[
"Smear"][1], __FILE__, __LINE__);
89 bool SaveUnsmearedBranch = GetFromManager<bool>(Smear[
"SaveUnsmearedBranch"],
false, __FILE__ , __LINE__);
90 Processor->SmearChain(Names, ErrorValue, SaveUnsmearedBranch);
93 int main(
int argc,
char *argv[]) {
101 std::string filename = argv[1];
102 std::string config = argv[2];
void SetMaCh3LoggerFormat()
Set messaging format of the logger.
int main(int argc, char *argv[])
void SmearChain(const std::string &inputFile, const std::string &config)
Allows you to smear contour. For example after performing sets of study one finds out that used sets ...
#define M3OpenConfig(filename)
Macro to simplify calling LoadYaml with file and line info.
Extended ArgumentParser with MaCh3-specific functionality.
std::unique_ptr< MaCh3ArgumentParser > m_parser
Argument parser for this plugin.
int Run() override
Execute the MCMC diagnostics.
virtual ~SmearModule()
Destructor.
MaCh3ArgumentParser * get_parser() override
Get the argument parser for this module.
void SmearChain(const std::string &inputFile, const std::string &config)
Custom exception class used throughout MaCh3.
Main namespace for MaCh3 software.