30 namespace po = boost::program_options;
33 namespace 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"}
89 if (column_info.
find(name) ==
nullptr) {
91 <<
" SpecZ column with name " << name;
96 if (index > column_info.
size()) {
98 <<
") is out of range (" << column_info.
size() <<
")";
108 if (column_info.
find(name) ==
nullptr) {
110 <<
" SpecZ error column with name " << name;
115 if (index > column_info.
size()) {
117 <<
") is out of range (" << column_info.
size() <<
")";
124 auto column_info = getDependency<CatalogConfig>().getColumnInfo();
138 getDependency<CatalogConfig>().addAttributeHandler(handler_ptr);
static const std::string SPECZ_COLUMN_INDEX
static const std::string SPECZ_ERR_COLUMN_NAME
Superclass of all configuration classes.
std::size_t size() const
Returns the number of columns represented by this ColumnInfo.
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...
Implementation of the AttributeFromRow for a SpectroscopicRedshift attribute. This class implements t...
static const std::string SPECZ_ERR_COLUMN_INDEX
static std::string getFluxColumnFromOptions(const Configuration::UserValues &args, const Table::ColumnInfo &column_info)
Provides information about the columns of a Table.
static std::string getErrColumnFromOptions(const Configuration::UserValues &args, const Table::ColumnInfo &column_info)
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Returns the program options defined by the SpecZCatalogConfig.
SpecZCatalogConfig(long manager_id)
Constructs a new SpecZCatalogConfig object.
static const std::string SPECZ_COLUMN_NAME
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...
void initialize(const UserValues &args) override
Adds the SpectroscopicRedshiftAttributeFromRow handler to the CatalogCnofig.
void preInitialize(const UserValues &args) override
Checks that all the options are valid. See the exceptions thrown for a detailed list of the checks...