30namespace po = boost::program_options;
33namespace Configuration {
41 declareDependency<CatalogConfig>();
45 return {{
"Input catalog options",
47 "The name of the column representing the spectroscopic redshift"},
49 "The 1-based index of the column representing the spectroscopic redshift"},
51 "The name of the column representing spectroscopic redshift error"},
53 "The 1-based index of the column representing the spectroscopic redshift error"}}}};
59 <<
" are mutually exclusive";
71 <<
" are mutually exclusive";
83 if (column_info.
find(name) ==
nullptr) {
85 <<
" SpecZ column with name " << name;
90 if (index > column_info.
size()) {
102 if (column_info.
find(name) ==
nullptr) {
104 <<
" SpecZ error column with name " << name;
109 if (index > column_info.
size()) {
111 << column_info.
size() <<
")";
118 auto column_info = getDependency<CatalogConfig>().getColumnInfo();
131 getDependency<CatalogConfig>().addAttributeHandler(handler_ptr);
Superclass of all configuration classes.
void preInitialize(const UserValues &args) override
Checks that all the options are valid. See the exceptions thrown for a detailed list of the checks.
void initialize(const UserValues &args) override
Adds the SpectroscopicRedshiftAttributeFromRow handler to the CatalogCnofig.
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Returns the program options defined by the SpecZCatalogConfig.
SpecZCatalogConfig(long manager_id)
Constructs a new SpecZCatalogConfig object.
Implementation of the AttributeFromRow for a SpectroscopicRedshift attribute. This class implements t...
Provides information about the columns of a Table.
std::unique_ptr< std::size_t > find(const std::string &name) const
Returns the index of a column, given the name of it, or nullptr if there is no column with this name.
const ColumnDescription & getDescription(std::size_t index) const
Returns the description of the column with the given index or throws an exception if the index is big...
std::size_t size() const
Returns the number of columns represented by this ColumnInfo.
static const std::string SPECZ_COLUMN_NAME
static const std::string SPECZ_ERR_COLUMN_NAME
static std::string getFluxColumnFromOptions(const Configuration::UserValues &args, const Table::ColumnInfo &column_info)
static std::string getErrColumnFromOptions(const Configuration::UserValues &args, const Table::ColumnInfo &column_info)
static const std::string SPECZ_COLUMN_INDEX
static const std::string SPECZ_ERR_COLUMN_INDEX