BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The ParameterTreeBuilder contains helper functions to create container with ParameterItems. The ParameterItem appears in RealTimeView and provides real time tuning of MultiLayerItem and InstrumentItem.
Definition at line 42 of file ParameterTreeUtils.h.
Public Member Functions | |
ParameterTreeBuilder (JobItem *jobItem, bool recreateBackupValues) | |
void | build () |
Private Member Functions | |
void | addBackground (ParameterLabelItem *instrumentLabel, BackgroundItem *backgroundItem) |
void | addBeamDistribution (ParameterLabelItem *parentLabel, BeamDistributionItem *distributionItem, const QString &label, bool withMean=true) |
void | addDetector (ParameterLabelItem *parentLabel, DetectorItem *detector) |
void | addInstrument () |
void | addInterference (ParameterLabelItem *layoutLabel, const ParticleLayoutItem *layout) |
void | addLattice (ParameterLabelItem *parentLabel, const Interference2DAbstractLatticeItem *itf) |
void | addMaterials () |
add the job's materials More... | |
void | addParameterItem (ParameterLabelItem *parent, const DoubleDescriptor &d, const QString &label=QString()) |
void | addParameterItem (ParameterLabelItem *parent, const std::variant< VectorDescriptor, DoubleDescriptor > &v) |
void | addParameterItem (ParameterLabelItem *parent, const VectorDescriptor &d) |
ParameterLabelItem * | addParticle (ParameterLabelItem *parentLabel, ItemWithParticles *p, bool enableAbundance, bool enablePosition=true) |
Returns the top label which was created for the particle. More... | |
void | addPolarization (ParameterLabelItem *instrumentLabel, const InstrumentItem *instrument) |
void | addRotation (ParameterLabelItem *parentLabel, ItemWithParticles *p) |
void | addSample () |
add the job's sample More... | |
bool | allowMagneticFields () const |
ParameterContainerItem * | parameterContainer () |
Private Attributes | |
JobItem * | m_jobItem |
bool | m_recreateBackupValues |
ParameterTreeBuilder::ParameterTreeBuilder | ( | JobItem * | jobItem, |
bool | recreateBackupValues | ||
) |
Definition at line 75 of file ParameterTreeUtils.cpp.
|
private |
Definition at line 405 of file ParameterTreeUtils.cpp.
References addParameterItem(), and GUI::Util::labelWithUnit().
Referenced by addInstrument().
|
private |
Definition at line 355 of file ParameterTreeUtils.cpp.
References addParameterItem(), BeamDistributionItem::distribution(), DistributionItemCatalog::UiInfo::menuEntry, GUI::RealSpace::Particles::name(), DistributionItemCatalog::type(), and DistributionItemCatalog::uiInfo().
Referenced by addInstrument().
|
private |
Definition at line 373 of file ParameterTreeUtils.cpp.
References addParameterItem(), degree, DetectorItem::resolutionFunctionSelection(), and unitAsString().
Referenced by addInstrument().
|
private |
Definition at line 314 of file ParameterTreeUtils.cpp.
References addBackground(), addBeamDistribution(), addDetector(), addParameterItem(), addPolarization(), JobItem::instrumentItem(), m_jobItem, and parameterContainer().
Referenced by build().
|
private |
Definition at line 178 of file ParameterTreeUtils.cpp.
References addLattice(), addParameterItem(), ParticleLayoutItem::interference(), InterferenceItemCatalog::UiInfo::menuEntry, Profile2DItemCatalog::type(), InterferenceItemCatalog::type(), and InterferenceItemCatalog::uiInfo().
Referenced by addSample().
|
private |
Definition at line 294 of file ParameterTreeUtils.cpp.
References addParameterItem(), Interference2DAbstractLatticeItem::latticeType(), and Interference2DAbstractLatticeItem::xiIntegration().
Referenced by addInterference().
|
private |
add the job's materials
Definition at line 88 of file ParameterTreeUtils.cpp.
References addParameterItem(), allowMagneticFields(), m_jobItem, MultiLayerItem::materialItems(), MaterialItems::materialItems(), parameterContainer(), and JobItem::sampleItem().
Referenced by build().
|
private |
Definition at line 142 of file ParameterTreeUtils.cpp.
References DoubleDescriptor::get, DoubleDescriptor::label, GUI::Util::labelWithUnit(), m_jobItem, m_recreateBackupValues, JobItem::parameterContainerItem(), ParameterContainerItem::setBackupValue(), and DoubleDescriptor::unit.
Referenced by addBackground(), addBeamDistribution(), addDetector(), addInstrument(), addInterference(), addLattice(), addMaterials(), addParameterItem(), addParticle(), addPolarization(), addRotation(), and addSample().
|
private |
Definition at line 161 of file ParameterTreeUtils.cpp.
References addParameterItem().
|
private |
Definition at line 152 of file ParameterTreeUtils.cpp.
References addParameterItem(), VectorDescriptor::label, VectorDescriptor::x, VectorDescriptor::y, and VectorDescriptor::z.
|
private |
Returns the top label which was created for the particle.
Definition at line 252 of file ParameterTreeUtils.cpp.
References ItemWithParticles::abundance(), addParameterItem(), addRotation(), and ItemWithParticles::positionVector().
Referenced by addSample().
|
private |
Definition at line 413 of file ParameterTreeUtils.cpp.
References addParameterItem(), and InstrumentItem::withPolarizerAnalyzer().
Referenced by addInstrument().
|
private |
Definition at line 303 of file ParameterTreeUtils.cpp.
References addParameterItem(), and ItemWithParticles::rotation().
Referenced by addParticle().
|
private |
add the job's sample
Definition at line 107 of file ParameterTreeUtils.cpp.
References addInterference(), addParameterItem(), addParticle(), allowMagneticFields(), MultiLayerItem::crossCorrLength(), MultiLayerItem::externalFieldVector(), MultiLayerItem::layers(), m_jobItem, parameterContainer(), and JobItem::sampleItem().
Referenced by build().
|
private |
Definition at line 172 of file ParameterTreeUtils.cpp.
References JobItem::isSpecularJob(), and m_jobItem.
Referenced by addMaterials(), and addSample().
void ParameterTreeBuilder::build | ( | ) |
Definition at line 81 of file ParameterTreeUtils.cpp.
References addInstrument(), addMaterials(), and addSample().
Referenced by JobModel::addJob(), and JobModel::readFrom().
|
private |
Definition at line 167 of file ParameterTreeUtils.cpp.
References m_jobItem, and JobItem::parameterContainerItem().
Referenced by addInstrument(), addMaterials(), and addSample().
|
private |
Definition at line 80 of file ParameterTreeUtils.h.
Referenced by addInstrument(), addMaterials(), addParameterItem(), addSample(), allowMagneticFields(), and parameterContainer().
|
private |
Definition at line 81 of file ParameterTreeUtils.h.
Referenced by addParameterItem().