KASKADE 7 development version
Classes | Namespaces | Functions
kaskopt.hh File Reference
#include <memory>
#include <string>
#include <boost/property_tree/ptree.hpp>

Go to the source code of this file.

Classes

class  Kaskade::Options
 

Namespaces

namespace  boost
 
namespace  boost::program_options
 
namespace  Kaskade
 
 

Functions

bool Kaskade::getKaskadeOptions (int argc, char **argv, Options const &options)
 Supports the extraction of program option values from command line arguments. More...
 
std::unique_ptr< boost::property_tree::ptree > getKaskadeOptions (int argc, char *argv[], int verbosity, bool dumpParameter)
 The parameters can be written to a log file named "run-<starttime>-<pid>.json" in JSON format. This is done if. More...
 
template<class TYPE >
TYPE getParameter (std::unique_ptr< boost::property_tree::ptree > const &pt, const std::string s, TYPE defaultValue)
 Extracts parameters from the parameter set. More...
 

Function Documentation

◆ getKaskadeOptions()

std::unique_ptr< boost::property_tree::ptree > getKaskadeOptions ( int  argc,
char *  argv[],
int  verbosity,
bool  dumpParameter 
)

The parameters can be written to a log file named "run-<starttime>-<pid>.json" in JSON format. This is done if.

  • dumpParameter is true. starttime and pid have to be provided by the run.starttime and run.pid parameters.
Parameters
argcfirst argument of main to be passed on
argvsecond argument of main to be passed on
verbosity
dumpParameterif true, the parameters are written to a log file

◆ getParameter()

template<class TYPE >
TYPE getParameter ( std::unique_ptr< boost::property_tree::ptree > const &  pt,
const std::string  s,
TYPE  defaultValue 
)

Extracts parameters from the parameter set.

Parameters
ptthe parameter set as obtained from getKaskadeOptions.
sthe name of the parameter
defaultValueis returned if the parameter is not found in the parameter set

Definition at line 91 of file kaskopt.hh.