SourceXtractorPlusPlus  0.19
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"
25 #include <NdArray/NdArray.h>
26 #include <iostream>
27 #include <sstream>
28 
29 namespace SourceXtractor {
30 
32 
35 }
36 
38  auto config = manager.getConfiguration<AssocModeConfig>();
39 
40  m_catalogs = config.getCatalogs();
41  m_assoc_radius = config.getAssocRadius();
42  m_assoc_mode = config.getAssocMode();
43  m_add_property_instances = !config.getColumnsIdx().empty();
44 }
45 
47  if (property_id.getTypeId() == typeid(AssocMode)) {
48  if (m_catalogs.empty()) {
49  return std::make_shared<AssocModeDummyTask>();
50  } else {
51  return std::make_shared<AssocModeTask>(m_catalogs, m_assoc_mode, m_assoc_radius);
52  }
53  } else {
54  return nullptr;
55  }
56 }
57 
60 
62  return;
63  }
65  "assoc_values", [](const AssocMode& prop) { return prop.getAssocValues(); }, "", "Assoc catalog values");
66 }
67 
68 } // 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="")