SourceXtractorPlusPlus  0.18
SourceXtractor++, the next generation SExtractor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AssocModeTaskFactory.cpp
Go to the documentation of this file.
1 
20 #include "SEFramework/Task/Task.h"
24 #include <NdArray/NdArray.h>
25 #include <iostream>
26 #include <sstream>
27 
28 namespace SourceXtractor {
29 
31 
34 }
35 
37  auto config = manager.getConfiguration<AssocModeConfig>();
38 
39  m_catalogs = config.getCatalogs();
40  m_assoc_radius = config.getAssocRadius();
41  m_assoc_mode = config.getAssocMode();
42  m_add_property_instances = !config.getColumnsIdx().empty();
43 }
44 
46  if (property_id.getTypeId() == typeid(AssocMode)) {
47  return std::make_shared<AssocModeTask>(m_catalogs, m_assoc_mode, m_assoc_radius);
48  } else {
49  return nullptr;
50  }
51 }
52 
55 
57  return;
58  }
60  "assoc_values", [](const AssocMode& prop) { return prop.getAssocValues(); }, "", "Assoc catalog values");
61 }
62 
63 } // namespace SourceXtractor
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
Euclid::NdArray::NdArray< T > NdArray
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
std::vector< std::vector< AssocModeConfig::CatalogEntry > > m_catalogs
std::shared_ptr< Task > createTask(const PropertyId &property_id) const override
Returns a Task producing a Property corresponding to the given PropertyId.
Identifier used to set and retrieve properties.
Definition: PropertyId.h:40
std::type_index getTypeId() const
Definition: PropertyId.h:66
Euclid::NdArray::NdArray< T > NdArray
Definition: VignetPlugin.h:37
void registerPropertyInstances(OutputRegistry &registry) override
AssocModeConfig::AssocMode m_assoc_mode
void registerColumnConverter(std::string column_name, ColumnConverter< PropertyType, OutType > converter, std::string column_unit="", std::string column_description="")