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

Implementation of the AttributeFromRow for a SpectroscopicRedshift attribute. This class implements the createAttribute method that must be used to create SpectroscopicRedshift objects. More...

#include <SpectroscopicRedshiftAttributeFromRow.h>

Inheritance diagram for Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow:
Inheritance graph
[legend]
Collaboration diagram for Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow:
Collaboration graph
[legend]

Public Member Functions

 SpectroscopicRedshiftAttributeFromRow (std::shared_ptr< Euclid::Table::ColumnInfo > column_info_ptr, const std::string &specz_value_column_name, const std::string &specz_error_column_name)
 Create a SpectroscopicRedshiftAttributeFromRow object.
 
 SpectroscopicRedshiftAttributeFromRow (std::shared_ptr< Euclid::Table::ColumnInfo > column_info_ptr, const std::string &specz_value_column_name)
 Create a SpectroscopicRedshiftAttributeFromRow object.
 
 ~SpectroscopicRedshiftAttributeFromRow () override=default
 
std::unique_ptr< AttributecreateAttribute (const Euclid::Table::Row &row) override
 Create a photometricAttribute from a Table row.
 
- Public Member Functions inherited from Euclid::SourceCatalog::AttributeFromRow
virtual ~AttributeFromRow ()=default
 

Private Attributes

size_t m_value_column_index
 
bool m_has_error_column
 
size_t m_error_column_index
 

Detailed Description

Implementation of the AttributeFromRow for a SpectroscopicRedshift attribute. This class implements the createAttribute method that must be used to create SpectroscopicRedshift objects.

Definition at line 52 of file SpectroscopicRedshiftAttributeFromRow.h.

Constructor & Destructor Documentation

◆ SpectroscopicRedshiftAttributeFromRow() [1/2]

Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow::SpectroscopicRedshiftAttributeFromRow ( std::shared_ptr< Euclid::Table::ColumnInfo column_info_ptr,
const std::string specz_value_column_name,
const std::string specz_error_column_name 
)
inline

Create a SpectroscopicRedshiftAttributeFromRow object.

Create a SpectroscopicRedshiftAttributeFromRow object, setting up the rule for building SpectroscopicRedshiftAttribute from table rows. The names provides the names used for the Table columns.

Parameters
column_info_ptrdescribes the columns of the Table, providing in particular the required column names
specz_value_column_namegive the name of the spectroscopic redshift value table column
specz_error_column_namegive the name of the spectroscopic redshift error table column, if this name is missing or the column not found, the error is defaulted to 0
Exceptions
Anexception is thrown if the names provided in the mapping are not present in the columnInfo.

Definition at line 74 of file SpectroscopicRedshiftAttributeFromRow.h.

References m_error_column_index, m_has_error_column, and m_value_column_index.

◆ SpectroscopicRedshiftAttributeFromRow() [2/2]

Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow::SpectroscopicRedshiftAttributeFromRow ( std::shared_ptr< Euclid::Table::ColumnInfo column_info_ptr,
const std::string specz_value_column_name 
)
inline

Create a SpectroscopicRedshiftAttributeFromRow object.

Create a SpectroscopicRedshiftAttributeFromRow object, setting up the rule for building SpectroscopicRedshiftAttribute from table rows. The names provides the names used for the Table columns. This constructor is used when there is no Z error column in the catalog

Parameters
column_info_ptrdescribes the columns of the Table, providing in particular the required column names
specz_value_column_namegive the name of the spectroscopic redshift value table column
Exceptions
Anexception is thrown if the names provided in the mapping are not present in the columnInfo.

Definition at line 110 of file SpectroscopicRedshiftAttributeFromRow.h.

References Euclid::SourceCatalog::logger, m_error_column_index, m_has_error_column, and m_value_column_index.

◆ ~SpectroscopicRedshiftAttributeFromRow()

Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow::~SpectroscopicRedshiftAttributeFromRow ( )
overridedefault

Member Function Documentation

◆ createAttribute()

std::unique_ptr< Attribute > Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow::createAttribute ( const Euclid::Table::Row row)
inlineoverridevirtual

Create a photometricAttribute from a Table row.

Create a photometricAttribute from a Table row using the mapping included in this object

Parameters
rowA Table row
Returns
A unique pointer to a (SpectroscopicRedshift) Attribute

Implements Euclid::SourceCatalog::AttributeFromRow.

Definition at line 134 of file SpectroscopicRedshiftAttributeFromRow.h.

References m_error_column_index, m_has_error_column, and m_value_column_index.

Member Data Documentation

◆ m_error_column_index

size_t Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow::m_error_column_index
private

◆ m_has_error_column

bool Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow::m_has_error_column
private

◆ m_value_column_index

size_t Euclid::SourceCatalog::SpectroscopicRedshiftAttributeFromRow::m_value_column_index
private

Indices of the spectroscopic redshift value and error columns in the table

Definition at line 147 of file SpectroscopicRedshiftAttributeFromRow.h.

Referenced by createAttribute(), SpectroscopicRedshiftAttributeFromRow(), and SpectroscopicRedshiftAttributeFromRow().


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