Mantid
|
Creates a composite domain. More...
#include <MultiDomainCreator.h>
Public Member Functions | |
void | createDomain (std::shared_ptr< API::FunctionDomain > &domain, std::shared_ptr< API::FunctionValues > &ivalues, size_t i0=0) override |
Create a domain from the input workspace. More... | |
std::shared_ptr< API::Workspace > | createOutputWorkspace (const std::string &baseName, API::IFunction_sptr function, std::shared_ptr< API::FunctionDomain > domain, std::shared_ptr< API::FunctionValues > values, const std::string &outputWorkspacePropertyName) override |
Create the output workspace. More... | |
size_t | getDomainSize () const override |
Return the size of the domain to be created. More... | |
size_t | getNCreators () const |
Get number of creators. More... | |
bool | hasCreator (size_t i) const |
Check if i-th creator has been set with setCreator. More... | |
void | initFunction (API::IFunction_sptr function) override |
Initialize the function. More... | |
MultiDomainCreator (Kernel::IPropertyManager *fit, const std::vector< std::string > &workspacePropertyNames) | |
A friend that can create instances of this class. More... | |
void | setCreator (size_t i, API::IDomainCreator *creator) |
Set ith creator. More... | |
Public Member Functions inherited from Mantid::API::IDomainCreator | |
virtual void | createDomain (std::shared_ptr< API::FunctionDomain > &domain, std::shared_ptr< API::FunctionValues > &values, size_t i0=0)=0 |
Create a domain and values from the input workspace. More... | |
virtual std::shared_ptr< API::Workspace > | createOutputWorkspace (const std::string &baseName, API::IFunction_sptr function, std::shared_ptr< API::FunctionDomain > domain, std::shared_ptr< API::FunctionValues > values, const std::string &outputWorkspacePropertyName="OutputWorkspace") |
Create an output workspace filled with data simulated with the fitting function. More... | |
virtual void | declareDatasetProperties (const std::string &suffix="", bool addProp=true) |
Declare properties that specify the dataset within the workspace to fit to. More... | |
virtual size_t | getDomainSize () const =0 |
Return the size of the domain to be created. More... | |
IDomainCreator (Kernel::IPropertyManager *manager, std::vector< std::string > workspacePropertyNames, DomainType domainType=Simple) | |
Constrcutor. More... | |
void | ignoreInvalidData (bool yes) |
Set to ignore invalid data. More... | |
virtual void | initFunction (API::IFunction_sptr function) |
Initialize the function. More... | |
virtual void | initialize (Kernel::IPropertyManager *, const std::string &, DomainType) |
Initialize. More... | |
void | separateCompositeMembersInOutput (const bool value, const bool conv=false) |
Toggle output of either just composite or composite + members. More... | |
virtual | ~IDomainCreator ()=default |
Virtual destructor. More... | |
Protected Attributes | |
std::vector< std::shared_ptr< API::IDomainCreator > > | m_creators |
Vector of creators. More... | |
Protected Attributes inherited from Mantid::API::IDomainCreator | |
bool | m_convolutionCompositeMembers |
Perform convolution of output composite components. More... | |
DomainType | m_domainType |
Domain type. More... | |
bool | m_ignoreInvalidData |
Flag to ignore nans, infinities and zero errors. More... | |
Kernel::IPropertyManager * | m_manager |
Pointer to a property manager. More... | |
bool | m_outputCompositeMembers |
Output separate composite function values. More... | |
std::vector< std::string > | m_workspacePropertyNames |
Property names for workspaces to get the data from. More... | |
Additional Inherited Members | |
Public Types inherited from Mantid::API::IDomainCreator | |
enum | DomainType { Simple = 0 , Sequential , Parallel } |
Type of domain to create. More... | |
Protected Member Functions inherited from Mantid::API::IDomainCreator | |
void | declareProperty (Kernel::Property *prop, const std::string &doc) |
Declare a property to the algorithm. More... | |
|
inline |
A friend that can create instances of this class.
Constructor
Definition at line 29 of file MultiDomainCreator.h.
|
overridevirtual |
Create a domain from the input workspace.
Implements Mantid::API::IDomainCreator.
Definition at line 39 of file MultiDomainCreator.cpp.
References Mantid::API::IDomainCreator::m_convolutionCompositeMembers, m_creators, Mantid::API::IDomainCreator::m_outputCompositeMembers, and Mantid::API::IDomainCreator::m_workspacePropertyNames.
|
overridevirtual |
Create the output workspace.
Create the output workspace group.
baseName | :: The base name for the output workspace. Suffix "Workspace" will be added to it. |
function | :: A function to calculate the values. Must be of the MultiDomainFunction type. |
domain | :: Domain created earlier with this creator (unused) |
values | :: Values created earlier with this creator (unused) |
outputWorkspacePropertyName | :: Name for the property to hold the output workspace. If empty the property won't be created. |
Reimplemented from Mantid::API::IDomainCreator.
Definition at line 104 of file MultiDomainCreator.cpp.
References Mantid::API::IDomainCreator::declareProperty(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_creators, Mantid::API::IDomainCreator::m_manager, Mantid::Kernel::Direction::Output, Mantid::Kernel::IPropertyManager::setProperty(), Mantid::Kernel::IPropertyManager::setPropertyValue(), std::to_string(), and UNUSED_ARG.
|
inlineoverridevirtual |
Return the size of the domain to be created.
Implements Mantid::API::IDomainCreator.
Definition at line 42 of file MultiDomainCreator.h.
|
inline |
Get number of creators.
Definition at line 47 of file MultiDomainCreator.h.
bool Mantid::CurveFitting::MultiDomainCreator::hasCreator | ( | size_t | i | ) | const |
Check if i-th creator has been set with setCreator.
i | :: Index of a creator, 0 < i < getNCreators() |
Definition at line 36 of file MultiDomainCreator.cpp.
References m_creators.
|
overridevirtual |
Initialize the function.
Initialize the function with the workspace(s).
function | :: A function to initialize. |
Reimplemented from Mantid::API::IDomainCreator.
Definition at line 66 of file MultiDomainCreator.cpp.
References Mantid::API::g_log, index, Mantid::API::IDomainCreator::initFunction(), m_creators, and Mantid::Kernel::Logger::warning().
void Mantid::CurveFitting::MultiDomainCreator::setCreator | ( | size_t | i, |
API::IDomainCreator * | creator | ||
) |
|
protected |
Vector of creators.
Definition at line 53 of file MultiDomainCreator.h.
Referenced by createDomain(), createOutputWorkspace(), hasCreator(), initFunction(), and setCreator().