MaCh3  2.8.0
Reference Guide
GetPenaltyTerm.cpp
Go to the documentation of this file.
1 #include "Manager/MaCh3Logger.h"
3 
4 int main(int argc, char const* argv[]){
5  MACH3LOG_WARN("Deprecation Warning: Use of the standalone executable will be deprecated in future releases.");
6  MACH3LOG_WARN(" : you can use 'mach3 penaltyterm' as a direct replacement instead.");
7  argv[0] = "penaltyterm";
9  M3::MaCh3ArgumentParser* parser = proc.get_parser();
10 
11  // add compatibility layer for old binaries which have config file after input
12  // ////////////////////////////////////////////////////////////////////////////
13  if(argc > 2){
14  std::string arg1 = argv[1];
15  std::string arg2 = argv[2];
16  if(arg1.size() > 5 && arg1.substr(arg1.size() - 5) == ".root" &&
17  ((arg2.size() > 5 && arg2.substr(arg2.size() - 5) == ".yaml") ||
18  (arg2.size() > 4 && arg2.substr(arg2.size() - 4) == ".yml"))){
19  std::swap(argv[1], argv[2]);
20  }
21  }
22  // ////////////////////////////////////////////////////////////////////////////
23  parser->parse_args(argc, argv);
24  proc.Run();
25  MACH3LOG_WARN("Deprecation Warning: Use of the standalone executable will be deprecated in future releases.");
26  MACH3LOG_WARN(" : you can use 'mach3 penaltyterm' as a direct replacement instead.");
27  return 0;
28 }
Module for extracting penalty terms from systematic chains.
int main(int argc, char const *argv[])
MaCh3 Logging utilities built on top of SPDLOG.
#define MACH3LOG_WARN
Definition: MaCh3Logger.h:36
Module for extracting specific penalty terms from MCMC chains.
MaCh3ArgumentParser * get_parser() override
Get the argument parser for this module.
int Run() override
Execute the penalty term extraction.
Extended ArgumentParser with MaCh3-specific functionality.
Definition: m3argparse.hpp:17