BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Controls all activity related to the single fitting task for JobItem. Provides interaction between FitSessionWidget and fit observers.
Definition at line 31 of file FitSessionController.h.
Public Slots | |
void | onStartFittingRequest () |
void | onStopFittingRequest () |
Signals | |
void | fittingError (const QString &message) |
void | fittingFinished () |
void | fittingStarted () |
Public Member Functions | |
FitSessionController (QObject *parent=nullptr) | |
~FitSessionController () override | |
FitLog * | fitLog () |
void | setItem (JobItem *item) |
Private Slots | |
void | onFittingError (const QString &text) |
void | onFittingFinished () |
void | onFittingStarted () |
void | onObserverUpdate () |
void | updateFitParameterValues (const FitProgressInfo &info) |
void | updateIterationCount (const FitProgressInfo &info) |
void | updateLog (const FitProgressInfo &info) |
Private Attributes | |
bool | m_block_progress_update |
std::unique_ptr< FitLog > | m_fitlog |
JobItem * | m_jobItem |
std::shared_ptr< FitObjectiveBuilder > | m_objectiveBuilder |
std::shared_ptr< GUIFitObserver > | m_observer |
FitWorkerLauncher * | m_runFitManager |
FitSessionController::FitSessionController | ( | QObject * | parent = nullptr | ) |
Definition at line 33 of file FitSessionController.cpp.
References FitWorkerLauncher::fittingError(), FitWorkerLauncher::fittingFinished(), FitWorkerLauncher::fittingStarted(), m_observer, m_runFitManager, onFittingError(), onFittingFinished(), onFittingStarted(), onObserverUpdate(), and GUIFitObserver::updateReady().
|
overridedefault |
FitLog * FitSessionController::fitLog | ( | ) |
Definition at line 92 of file FitSessionController.cpp.
References m_fitlog.
Referenced by FitActivityPanel::setItem().
|
signal |
Referenced by onFittingError(), onStartFittingRequest(), and FitSessionWidget::setSessionController().
|
signal |
Referenced by onFittingFinished().
|
signal |
Referenced by onFittingStarted().
|
privateslot |
Definition at line 145 of file FitSessionController.cpp.
References Error, FitWorkerLauncher::fitEnd(), fittingError(), m_fitlog, m_jobItem, m_runFitManager, and JobItem::setEndTime().
Referenced by FitSessionController().
|
privateslot |
Definition at line 132 of file FitSessionController.cpp.
References Completed, Failed, FitWorkerLauncher::fitEnd(), fittingFinished(), JobItem::getStatus(), JobItem::isCompleted(), m_fitlog, m_jobItem, m_runFitManager, JobItem::setEndTime(), JobItem::setProgress(), JobItem::setStatus(), and Success.
Referenced by FitSessionController().
|
privateslot |
Definition at line 120 of file FitSessionController.cpp.
References FitWorkerLauncher::fitStart(), Fitting, fittingStarted(), m_fitlog, m_jobItem, m_runFitManager, JobItem::setBeginTime(), JobItem::setEndTime(), JobItem::setProgress(), and JobItem::setStatus().
Referenced by FitSessionController().
|
privateslot |
Definition at line 102 of file FitSessionController.cpp.
References JobItem::dataItem(), Default, m_fitlog, m_jobItem, m_observer, DataItem::setRawDataVector(), updateFitParameterValues(), updateIterationCount(), and updateLog().
Referenced by FitSessionController().
|
slot |
Definition at line 74 of file FitSessionController.cpp.
References Error, Failed, JobItem::fitSuiteItem(), fittingError(), m_fitlog, m_jobItem, m_objectiveBuilder, m_observer, m_runFitManager, FitWorkerLauncher::runFitting(), JobItem::setStatus(), and FitSuiteItem::updateInterval().
Referenced by FitSessionWidget::setSessionController().
|
slot |
Definition at line 97 of file FitSessionController.cpp.
References FitWorkerLauncher::interruptFitting(), and m_runFitManager.
Referenced by FitSessionWidget::setSessionController().
void FitSessionController::setItem | ( | JobItem * | item | ) |
Definition at line 54 of file FitSessionController.cpp.
References Error, JobItem::fitSuiteItem(), FitSuiteItem::isUpdateIntervalPropertyName(), m_jobItem, m_observer, SessionItem::mapper(), GUI::RealSpace::Particles::name(), ModelMapper::setOnPropertyChange(), and FitSuiteItem::updateInterval().
|
privateslot |
Definition at line 165 of file FitSessionController.cpp.
References JobItem::fitParameterContainerItem(), m_jobItem, JobItem::parameterContainerItem(), FitProgressInfo::parValues(), and FitParameterContainerItem::setValuesInParameterContainer().
Referenced by onObserverUpdate().
|
privateslot |
Definition at line 156 of file FitSessionController.cpp.
References FitProgressInfo::chi2(), JobItem::fitSuiteItem(), FitProgressInfo::iterationCount(), m_jobItem, FitSuiteItem::setChi2(), and FitSuiteItem::setIterationCount().
Referenced by onObserverUpdate().
|
privateslot |
Definition at line 172 of file FitSessionController.cpp.
References FitProgressInfo::chi2(), Default, JobItem::fitParameterContainerItem(), FitParameterContainerItem::fitParameterItems(), FitProgressInfo::iterationCount(), m_fitlog, m_jobItem, and FitProgressInfo::parValues().
Referenced by onObserverUpdate().
|
private |
Definition at line 65 of file FitSessionController.h.
|
private |
Definition at line 63 of file FitSessionController.h.
Referenced by fitLog(), onFittingError(), onFittingFinished(), onFittingStarted(), onObserverUpdate(), onStartFittingRequest(), and updateLog().
|
private |
Definition at line 60 of file FitSessionController.h.
Referenced by onFittingError(), onFittingFinished(), onFittingStarted(), onObserverUpdate(), onStartFittingRequest(), setItem(), updateFitParameterValues(), updateIterationCount(), and updateLog().
|
private |
Definition at line 64 of file FitSessionController.h.
Referenced by onStartFittingRequest().
|
private |
Definition at line 62 of file FitSessionController.h.
Referenced by FitSessionController(), onObserverUpdate(), onStartFittingRequest(), and setItem().
|
private |
Definition at line 61 of file FitSessionController.h.
Referenced by FitSessionController(), onFittingError(), onFittingFinished(), onFittingStarted(), onStartFittingRequest(), and onStopFittingRequest().