SourceXtractorPlusPlus  0.13
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GrowthCurveConfig.cpp
Go to the documentation of this file.
1 
18 #include <boost/program_options.hpp>
20 
21 namespace po = boost::program_options;
22 using namespace Euclid::Configuration;
23 
24 namespace SourceXtractor {
25 
26 const static std::string GROWTH_NSAMPLES{"flux-growth-samples"};
27 
28 GrowthCurveConfig::GrowthCurveConfig(long managerId) : Configuration(managerId), m_nsamples{0} {}
29 
31  return {{"Growth curve", {
32  {GROWTH_NSAMPLES.c_str(), po::value<int>()->default_value(64), "Number of samples to take from the growth curve"}
33  }}};
34 }
35 
36 void GrowthCurveConfig::initialize(const Configuration::UserValues& args) {
37  if (args.count(GROWTH_NSAMPLES)) {
38  m_nsamples = args.at(GROWTH_NSAMPLES).as<int>();
39  if (m_nsamples <= 0) {
40  throw Elements::Exception() << GROWTH_NSAMPLES << " must be greater than 0";
41  }
42  }
43 }
44 
45 } // end of namespace SourceXtractor
void initialize(const UserValues &args) override
STL class.
STL class.
std::map< std::string, OptionDescriptionList > getProgramOptions() override
static const std::string GROWTH_NSAMPLES
T c_str(T...args)