Mantid
Loading...
Searching...
No Matches
MultiDomainCreator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
13#include "MantidCurveFitting/DllConfig.h"
14
15namespace Mantid {
16
17namespace CurveFitting {
24class MANTID_CURVEFITTING_DLL MultiDomainCreator : public API::IDomainCreator {
26 // friend class Fit;
27public:
29 MultiDomainCreator(Kernel::IPropertyManager *fit, const std::vector<std::string> &workspacePropertyNames)
30 : API::IDomainCreator(fit, workspacePropertyNames), m_creators(workspacePropertyNames.size()) {}
31
33 void createDomain(std::shared_ptr<API::FunctionDomain> &domain, std::shared_ptr<API::FunctionValues> &ivalues,
34 size_t i0 = 0) override;
36 std::shared_ptr<API::Workspace> createOutputWorkspace(const std::string &baseName, API::IFunction_sptr function,
37 std::shared_ptr<API::FunctionDomain> domain,
38 std::shared_ptr<API::FunctionValues> values,
39 const std::string &outputWorkspacePropertyName) override;
40
42 size_t getDomainSize() const override { return 0; }
44 void setCreator(size_t i, API::IDomainCreator *creator);
45 bool hasCreator(size_t i) const;
47 size_t getNCreators() const { return m_creators.size(); }
49 void initFunction(API::IFunction_sptr function) override;
50
51protected:
53 std::vector<std::shared_ptr<API::IDomainCreator>> m_creators;
54};
55
56} // namespace CurveFitting
57} // namespace Mantid
An base class for domain creators for use in Fit.
MultiDomainCreator(Kernel::IPropertyManager *fit, const std::vector< std::string > &workspacePropertyNames)
A friend that can create instances of this class.
size_t getNCreators() const
Get number of creators.
size_t getDomainSize() const override
Return the size of the domain to be created.
std::vector< std::shared_ptr< API::IDomainCreator > > m_creators
Vector of creators.
Interface to PropertyManager.
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
Definition: IFunction.h:732
Helper class which provides the Collimation Length for SANS instruments.