Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
Configuration class for enabling SpecZ catalog input. More...
#include <SpecZCatalogConfig.h>
Public Member Functions | |
SpecZCatalogConfig (long manager_id) | |
Constructs a new SpecZCatalogConfig object. | |
virtual | ~SpecZCatalogConfig ()=default |
Destructor. | |
std::map< std::string, OptionDescriptionList > | getProgramOptions () override |
Returns the program options defined by the SpecZCatalogConfig. | |
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. | |
![]() | |
Configuration (long manager_id) | |
Constructs a new Configuration instance. | |
virtual | ~Configuration ()=default |
Destructor. | |
virtual void | postInitialize (const UserValues &args) |
Method which is called after the initialization phase. | |
const std::set< std::type_index > & | getDependencies () |
Returns the dependencies of the configuration. | |
State & | getCurrentState () |
Returns the current state of the configuration. | |
State | getCurrentState () const |
Returns the current state of the configuration. | |
Additional Inherited Members | |
![]() | |
enum class | State { CONSTRUCTED , PRE_INITIALIZED , INITIALIZED , FINAL } |
Defines the different states the configuration object can be in. More... | |
using | OptionDescriptionList = std::vector< boost::program_options::option_description > |
using | UserValues = std::map< std::string, boost::program_options::variable_value > |
![]() | |
template<typename T > | |
void | declareDependency () |
Declares a Configuration as dependency. | |
template<typename T > | |
T & | getDependency () |
Returns a dependency. | |
template<typename T > | |
const T & | getDependency () const |
Configuration class for enabling SpecZ catalog input.
Definition at line 39 of file SpecZCatalogConfig.h.
|
explicit |
Constructs a new SpecZCatalogConfig object.
Definition at line 40 of file SpecZCatalogConfig.cpp.
|
virtualdefault |
Destructor.
|
overridevirtual |
Returns the program options defined by the SpecZCatalogConfig.
These options are:
Either the name or the column index can be provided but not both. The SpecZ column information is mandatory while the error is optional (the error is set to 0 if not provided)
All options are in a group called "Input catalog options".
Reimplemented from Euclid::Configuration::Configuration.
Definition at line 44 of file SpecZCatalogConfig.cpp.
References std::string::c_str(), Euclid::Configuration::SPECZ_COLUMN_INDEX, Euclid::Configuration::SPECZ_COLUMN_NAME, Euclid::Configuration::SPECZ_ERR_COLUMN_INDEX, and Euclid::Configuration::SPECZ_ERR_COLUMN_NAME.
|
overridevirtual |
Adds the SpectroscopicRedshiftAttributeFromRow handler to the CatalogCnofig.
args | The user parameters |
Elements::Exception | If the defined SpecZ column does not exist |
Elements::Exception | If the defined SpecZ error column does not exist |
Reimplemented from Euclid::Configuration::Configuration.
Definition at line 117 of file SpecZCatalogConfig.cpp.
References std::map< K, T >::end(), std::map< K, T >::find(), Euclid::Configuration::getErrColumnFromOptions(), Euclid::Configuration::getFluxColumnFromOptions(), std::shared_ptr< T >::reset(), Euclid::Configuration::SPECZ_ERR_COLUMN_INDEX, and Euclid::Configuration::SPECZ_ERR_COLUMN_NAME.
|
overridevirtual |
Checks that all the options are valid. See the exceptions thrown for a detailed list of the checks.
args | The user parameters |
Elements::Exception | If both the spec-z-column-name and spec-z-column-index are given |
Elements::Exception | If none of the spec-z-column-name and spec-z-column-index are given |
Elements::Exception | If the spec-z-column-index is an invalid one-based index (less than 1) |
Elements::Exception | If both the spec-z-err-column-name and spec-z-err-column-index are given |
Elements::Exception | If the spec-z-err-column-index is an invalid one-based index (less than 1) |
Reimplemented from Euclid::Configuration::Configuration.
Definition at line 56 of file SpecZCatalogConfig.cpp.
References std::map< K, T >::at(), std::map< K, T >::end(), std::map< K, T >::find(), Euclid::Configuration::SPECZ_COLUMN_INDEX, Euclid::Configuration::SPECZ_COLUMN_NAME, Euclid::Configuration::SPECZ_ERR_COLUMN_INDEX, and Euclid::Configuration::SPECZ_ERR_COLUMN_NAME.