SourceXtractorPlusPlus  0.8
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MoffatModelFittingTaskFactory.cpp
Go to the documentation of this file.
1 
17 /*
18  * MoffatModelFittingTaskFactory.cpp
19  *
20  * Created on: May 17, 2017
21  * Author: mschefer
22  */
23 
24 #include <iostream>
25 
32 
33 namespace SourceXtractor {
34 
36  if (property_id == PropertyId::create<MoffatModelFitting>()) {
37  return std::make_shared<MoffatModelFittingTask>(m_least_squares_engine, m_max_iterations);
38  } else if (property_id == PropertyId::create<MoffatModelEvaluator>()) {
39  return std::make_shared<MoffatModelEvaluatorTask>();
40  } else {
41  return nullptr;
42  }
43 }
44 
47 }
48 
50  auto& model_fitting_config = manager.getConfiguration<LegacyModelFittingConfig>();
51  m_max_iterations = model_fitting_config.getMaxIterations();
52  m_least_squares_engine = model_fitting_config.getLeastSquaresEngine();
53 }
54 
55 }
56 
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
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