BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
JobModelFunctions.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Models/JobModelFunctions.h
6 //! @brief Defines auxiliary functions in JobModelFunctions namespace.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_COREGUI_MODELS_JOBMODELFUNCTIONS_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_JOBMODELFUNCTIONS_H
17 
18 class InstrumentItem;
19 class JobItem;
20 class MultiLayerItem;
21 class RealDataItem;
22 class SessionItem;
23 
24 //! Contains set of functions to extend JobModel functionality.
25 //! Handles setup of JobItem in fitting context.
26 
27 namespace JobModelFunctions {
28 //! Initializes Data1DViewItem and assigns it to the passed JobItem
29 void initDataView(JobItem* jobItem);
30 
31 //! Properly copies sample and materials into JobItem
32 void setupJobItemSampleData(JobItem* jobItem, const MultiLayerItem* sampleItem);
33 
34 //! Properly copies instrument into job item
35 void setupJobItemInstrument(JobItem* jobItem, const InstrumentItem* from);
36 
37 void setupJobItemOutput(JobItem* jobItem);
38 
39 void setupJobItemForFit(JobItem* jobItem, const RealDataItem* realDataItem);
40 
41 void muteMagnetizationData(JobItem* jobItem);
42 
43 //! Copy RealDataItem to jobItem intended for fitting.
44 void copyRealDataItem(JobItem* jobItem, const RealDataItem* realDataItem);
45 
46 //! Determines parenting JobItem of a given SessionItem. Returns nullptr, if there
47 //! is no parent of JobItem type
48 
49 const JobItem* findJobItem(const SessionItem* item);
50 } // namespace JobModelFunctions
51 
52 #endif // BORNAGAIN_GUI_COREGUI_MODELS_JOBMODELFUNCTIONS_H
The RealDataItem class represents intensity data imported from file and intended for fitting.
Definition: RealDataItem.h:35
Contains set of functions to extend JobModel functionality.
void setupJobItemForFit(JobItem *jobItem, const RealDataItem *realDataItem)
Setups JobItem for fit.
void setupJobItemInstrument(JobItem *jobItem, const InstrumentItem *from)
Properly copies instrument into job item.
void setupJobItemSampleData(JobItem *jobItem, const MultiLayerItem *sampleItem)
Properly copies sample and materials into JobItem.
const JobItem * findJobItem(const SessionItem *item)
Determines parenting JobItem of a given SessionItem.
void muteMagnetizationData(JobItem *jobItem)
void copyRealDataItem(JobItem *jobItem, const RealDataItem *realDataItem)
Copy RealDataItem to jobItem intended for fitting.
void initDataView(JobItem *jobItem)
Initializes Data1DViewItem and assigns it to the passed JobItem.
void setupJobItemOutput(JobItem *jobItem)
Setup items intended for storing results of the job.