SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SourceXtractor::OutputRegistry Class Reference

#include <OutputRegistry.h>

Collaboration diagram for SourceXtractor::OutputRegistry:

Classes

class  ColumnFromSource
struct  ColInfo

Public Types

template<typename PropertyType, typename OutType>
using ColumnConverter = std::function<OutType(const PropertyType&)>
using SourceToRowConverter = std::function<Euclid::Table::Row(const SourceInterface&)>

Public Member Functions

template<typename PropertyType, typename OutType>
void registerColumnConverter (std::string column_name, ColumnConverter< PropertyType, OutType > converter, std::string column_unit="", std::string column_description="")
template<typename PropertyType>
void registerPropertyInstances (const std::vector< std::pair< std::string, unsigned int > > &instance_names)
template<typename PropertyType>
void registerPropertyInstances (const std::string &current_name, const std::vector< std::pair< std::string, unsigned int > > &instance_names)
template<typename PropertyType>
void enableOutput (std::string alias_name, bool configurable_output=false)
std::set< std::stringgetOutputPropertyNames ()
SourceToRowConverter getSourceToRowConverter (const std::vector< std::string > &enabled_optional)
void printPropertyColumnMap (const std::vector< std::string > &properties={})

Private Attributes

std::map< std::type_index, std::vector< std::string > > m_property_to_names_map {}
std::map< std::string, std::pair< std::type_index, ColumnFromSource > > m_name_to_converter_map {}
std::map< std::string, ColInfom_name_to_col_info_map {}
std::multimap< std::string, std::type_indexm_output_properties {}

Detailed Description

Definition at line 37 of file OutputRegistry.h.

Member Typedef Documentation

◆ ColumnConverter

template<typename PropertyType, typename OutType>
using SourceXtractor::OutputRegistry::ColumnConverter = std::function<OutType(const PropertyType&)>

Definition at line 42 of file OutputRegistry.h.

◆ SourceToRowConverter

Member Function Documentation

◆ enableOutput()

template<typename PropertyType>
void SourceXtractor::OutputRegistry::enableOutput ( std::string alias_name,
bool configurable_output = false )
inline

Register into the registry the output alias so PropertyType can be serialized into the output catalog

Template Parameters
PropertyTypeThe property holder
Parameters
alias_nameThe alias that will be added as an option to "output-properties"
configurable_outputBy default, OutputRegistry verifies that there are column converters registered for PropertyType. If this option is set to true, the check will be skipped, and it will be assumed that the output columns will be added during the configuration of the plugin

Definition at line 142 of file OutputRegistry.h.

References m_output_properties, and m_property_to_names_map.

Referenced by SourceXtractor::AperturePhotometryPlugin::registerPlugin(), SourceXtractor::AssocModePlugin::registerPlugin(), SourceXtractor::AutoPhotometryPlugin::registerPlugin(), SourceXtractor::CoreThresholdPartitionPlugin::registerPlugin(), SourceXtractor::DetectionFrameGroupStampPlugin::registerPlugin(), SourceXtractor::ErrorEllipsePlugin::registerPlugin(), SourceXtractor::ExternalFlagPlugin::registerPlugin(), SourceXtractor::FlexibleModelFittingPlugin::registerPlugin(), SourceXtractor::FluxRadiusPlugin::registerPlugin(), SourceXtractor::GroupInfoPlugin::registerPlugin(), SourceXtractor::GrowthCurvePlugin::registerPlugin(), SourceXtractor::HduNumberPlugin::registerPlugin(), SourceXtractor::IsophotalFluxPlugin::registerPlugin(), SourceXtractor::KronRadiusPlugin::registerPlugin(), SourceXtractor::MoffatModelFittingPlugin::registerPlugin(), SourceXtractor::NDetectedPixelsPlugin::registerPlugin(), SourceXtractor::OnnxPlugin::registerPlugin(), SourceXtractor::PeakValuePlugin::registerPlugin(), SourceXtractor::PixelBoundariesPlugin::registerPlugin(), SourceXtractor::PixelCentroidPlugin::registerPlugin(), SourceXtractor::ShapeParametersPlugin::registerPlugin(), SourceXtractor::SNRRatioPlugin::registerPlugin(), SourceXtractor::SourceFlagsPlugin::registerPlugin(), SourceXtractor::SourceIDsPlugin::registerPlugin(), SourceXtractor::VignetPlugin::registerPlugin(), and SourceXtractor::WorldCentroidPlugin::registerPlugin().

◆ getOutputPropertyNames()

std::set< std::string > SourceXtractor::OutputRegistry::getOutputPropertyNames ( )
inline

Definition at line 150 of file OutputRegistry.h.

References std::set< K >::emplace(), and m_output_properties.

Here is the call graph for this function:

◆ getSourceToRowConverter()

auto SourceXtractor::OutputRegistry::getSourceToRowConverter ( const std::vector< std::string > & enabled_optional)

◆ printPropertyColumnMap()

void SourceXtractor::OutputRegistry::printPropertyColumnMap ( const std::vector< std::string > & properties = {})

◆ registerColumnConverter()

template<typename PropertyType, typename OutType>
void SourceXtractor::OutputRegistry::registerColumnConverter ( std::string column_name,
ColumnConverter< PropertyType, OutType > converter,
std::string column_unit = "",
std::string column_description = "" )
inline

Definition at line 47 of file OutputRegistry.h.

References m_name_to_col_info_map, m_name_to_converter_map, and m_property_to_names_map.

Referenced by SourceXtractor::registerColumnConverter(), SourceXtractor::AperturePhotometryPlugin::registerPlugin(), SourceXtractor::AssocModePlugin::registerPlugin(), SourceXtractor::AutoPhotometryPlugin::registerPlugin(), SourceXtractor::CoreThresholdPartitionPlugin::registerPlugin(), SourceXtractor::DetectionFrameGroupStampPlugin::registerPlugin(), SourceXtractor::ErrorEllipsePlugin::registerPlugin(), SourceXtractor::ExternalFlagPlugin::registerPlugin(), SourceXtractor::FlexibleModelFittingPlugin::registerPlugin(), SourceXtractor::FluxRadiusPlugin::registerPlugin(), SourceXtractor::GroupInfoPlugin::registerPlugin(), SourceXtractor::GrowthCurvePlugin::registerPlugin(), SourceXtractor::HduNumberPlugin::registerPlugin(), SourceXtractor::IsophotalFluxPlugin::registerPlugin(), SourceXtractor::KronRadiusPlugin::registerPlugin(), SourceXtractor::MoffatModelFittingPlugin::registerPlugin(), SourceXtractor::NDetectedPixelsPlugin::registerPlugin(), SourceXtractor::OnnxPlugin::registerPlugin(), SourceXtractor::PeakValuePlugin::registerPlugin(), SourceXtractor::PixelBoundariesPlugin::registerPlugin(), SourceXtractor::PixelCentroidPlugin::registerPlugin(), SourceXtractor::ShapeParametersPlugin::registerPlugin(), SourceXtractor::SNRRatioPlugin::registerPlugin(), SourceXtractor::SourceFlagsPlugin::registerPlugin(), SourceXtractor::SourceIDsPlugin::registerPlugin(), SourceXtractor::VignetPlugin::registerPlugin(), SourceXtractor::WorldCentroidPlugin::registerPlugin(), SourceXtractor::AssocModeTaskFactory::registerPropertyInstances(), and SourceXtractor::FlexibleModelFittingTaskFactory::registerPropertyInstances().

◆ registerPropertyInstances() [1/2]

template<typename PropertyType>
void SourceXtractor::OutputRegistry::registerPropertyInstances ( const std::string & current_name,
const std::vector< std::pair< std::string, unsigned int > > & instance_names )
inline

When there are multiple instances of a given property, generate one column output with the given name for each instance replacing an existing registered name

Template Parameters
PropertyType
Parameters
current_name
instance_names

Definition at line 100 of file OutputRegistry.h.

References std::back_inserter(), std::vector< T >::begin(), std::copy(), std::vector< T >::end(), std::find(), m_name_to_col_info_map, m_name_to_converter_map, m_property_to_names_map, and std::vector< T >::push_back().

Here is the call graph for this function:

◆ registerPropertyInstances() [2/2]

template<typename PropertyType>
void SourceXtractor::OutputRegistry::registerPropertyInstances ( const std::vector< std::pair< std::string, unsigned int > > & instance_names)
inline

When there are multiple instances of a given property, generate one column output with the given suffix for each instance

Template Parameters
PropertyType
Parameters
instance_names

Definition at line 64 of file OutputRegistry.h.

References m_name_to_col_info_map, m_name_to_converter_map, m_property_to_names_map, and std::vector< T >::push_back().

Referenced by SourceXtractor::AperturePhotometryTaskFactory::registerPropertyInstances(), SourceXtractor::AutoPhotometryTaskFactory::registerPropertyInstances(), and SourceXtractor::ExternalFlagTaskFactory::registerPropertyInstances().

Here is the call graph for this function:

Member Data Documentation

◆ m_name_to_col_info_map

std::map<std::string, ColInfo> SourceXtractor::OutputRegistry::m_name_to_col_info_map {}
private

◆ m_name_to_converter_map

std::map<std::string, std::pair<std::type_index, ColumnFromSource> > SourceXtractor::OutputRegistry::m_name_to_converter_map {}
private

◆ m_output_properties

std::multimap<std::string, std::type_index> SourceXtractor::OutputRegistry::m_output_properties {}
private

◆ m_property_to_names_map


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