SourceXtractorPlusPlus
0.15
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
src
lib
Plugin
GrowthCurve
GrowthCurveConfig.cpp
Go to the documentation of this file.
1
18
#include <boost/program_options.hpp>
19
#include "
SEImplementation/Plugin/GrowthCurve/GrowthCurveConfig.h
"
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
30
auto
GrowthCurveConfig::getProgramOptions
() ->
std::map<std::string, OptionDescriptionList>
{
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
Euclid::Configuration::Configuration
SourceXtractor::GrowthCurveConfig::initialize
void initialize(const UserValues &args) override
Definition:
GrowthCurveConfig.cpp:36
std::map
STL class.
std::string
STL class.
SourceXtractor::GrowthCurveConfig::getProgramOptions
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Definition:
GrowthCurveConfig.cpp:30
SourceXtractor::GROWTH_NSAMPLES
static const std::string GROWTH_NSAMPLES
Definition:
GrowthCurveConfig.cpp:26
Elements::Exception
std::string::c_str
T c_str(T...args)
GrowthCurveConfig.h
SourceXtractor::GrowthCurveConfig::m_nsamples
int m_nsamples
Definition:
GrowthCurveConfig.h:43
Generated by
1.8.5