SourceXtractorPlusPlus  0.15
Please provide a description of the project.
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 
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
std::string
STL class.
SourceXtractor::GrowthCurveConfig::m_nsamples
int m_nsamples
Definition: GrowthCurveConfig.h:43
Euclid::Configuration
SourceXtractor
Definition: Aperture.h:30
std::map::at
T at(T... args)
std::string::c_str
T c_str(T... args)
SourceXtractor::GROWTH_NSAMPLES
static const std::string GROWTH_NSAMPLES
Definition: GrowthCurveConfig.cpp:26
Elements::Exception
std::map
STL class.
SourceXtractor::GrowthCurveConfig::initialize
void initialize(const UserValues &args) override
Definition: GrowthCurveConfig.cpp:36
SourceXtractor::GrowthCurveConfig::getProgramOptions
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Definition: GrowthCurveConfig.cpp:30
std::map::count
T count(T... args)
Euclid::Configuration::Configuration
GrowthCurveConfig.h