Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Euclid::Configuration::SpecZCatalogConfig Class Reference

Configuration class for enabling SpecZ catalog input. More...

#include <SpecZCatalogConfig.h>

Inheritance diagram for Euclid::Configuration::SpecZCatalogConfig:
Inheritance graph
[legend]
Collaboration diagram for Euclid::Configuration::SpecZCatalogConfig:
Collaboration graph
[legend]

Public Member Functions

 SpecZCatalogConfig (long manager_id)
 Constructs a new SpecZCatalogConfig object.
 
virtual ~SpecZCatalogConfig ()=default
 Destructor.
 
std::map< std::string, OptionDescriptionListgetProgramOptions () 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.
 
- Public Member Functions inherited from Euclid::Configuration::Configuration
 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.
 
StategetCurrentState ()
 Returns the current state of the configuration.
 
State getCurrentState () const
 Returns the current state of the configuration.
 

Additional Inherited Members

- Public Types inherited from Euclid::Configuration::Configuration
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 >
 
- Protected Member Functions inherited from Euclid::Configuration::Configuration
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
 

Detailed Description

Configuration class for enabling SpecZ catalog input.

Definition at line 39 of file SpecZCatalogConfig.h.

Constructor & Destructor Documentation

◆ SpecZCatalogConfig()

Euclid::Configuration::SpecZCatalogConfig::SpecZCatalogConfig ( long  manager_id)
explicit

Constructs a new SpecZCatalogConfig object.

Definition at line 40 of file SpecZCatalogConfig.cpp.

◆ ~SpecZCatalogConfig()

virtual Euclid::Configuration::SpecZCatalogConfig::~SpecZCatalogConfig ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getProgramOptions()

auto Euclid::Configuration::SpecZCatalogConfig::getProgramOptions ( )
overridevirtual

Returns the program options defined by the SpecZCatalogConfig.

These options are:

  • spec-z-column-name : The name of the column containing the SpecZ
  • spec-z-column-index : The index (1-based) of the column containing the SpecZ
  • spec-z-err-column-name : The name of the column containing the SpecZ error
  • spec-z-err-column-index : The index (1-based) of the column containing the SpecZ error

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".

Returns
The map with the option descriptions

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.

Here is the call graph for this function:

◆ initialize()

void Euclid::Configuration::SpecZCatalogConfig::initialize ( const UserValues args)
overridevirtual

Adds the SpectroscopicRedshiftAttributeFromRow handler to the CatalogCnofig.

Parameters
argsThe user parameters
Exceptions
Elements::ExceptionIf the defined SpecZ column does not exist
Elements::ExceptionIf 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.

Here is the call graph for this function:

◆ preInitialize()

void Euclid::Configuration::SpecZCatalogConfig::preInitialize ( const UserValues args)
overridevirtual

Checks that all the options are valid. See the exceptions thrown for a detailed list of the checks.

Parameters
argsThe user parameters
Exceptions
Elements::ExceptionIf both the spec-z-column-name and spec-z-column-index are given
Elements::ExceptionIf none of the spec-z-column-name and spec-z-column-index are given
Elements::ExceptionIf the spec-z-column-index is an invalid one-based index (less than 1)
Elements::ExceptionIf both the spec-z-err-column-name and spec-z-err-column-index are given
Elements::ExceptionIf 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.

Here is the call graph for this function:

The documentation for this class was generated from the following files: