Mantid
Loading...
Searching...
No Matches
IFunctionMW.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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//----------------------------------------------------------------------
12#include "MantidAPI/IFunction.h"
14
15#ifndef Q_MOC_RUN
16#include <memory>
17#endif
18
19namespace Mantid {
20
21namespace API {
22
29class MANTID_API_DLL IFunctionMW : public virtual IFunction {
30public:
32 void setMatrixWorkspace(std::shared_ptr<const API::MatrixWorkspace> workspace, size_t wi, double startX,
33 double endX) override;
35 std::shared_ptr<const API::MatrixWorkspace> getMatrixWorkspace() const;
37 size_t getWorkspaceIndex() const { return m_workspaceIndex; }
38
39protected:
41 std::weak_ptr<const API::MatrixWorkspace> m_workspace;
43 size_t m_workspaceIndex = 0;
44};
45
46} // namespace API
47} // namespace Mantid
IPeaksWorkspace_sptr workspace
This is a specialization of IFunction for functions defined on a MatrixWorkspace.
Definition IFunctionMW.h:29
size_t getWorkspaceIndex() const
Get the workspace index.
Definition IFunctionMW.h:37
std::weak_ptr< const API::MatrixWorkspace > m_workspace
Keep a weak pointer to the workspace.
Definition IFunctionMW.h:41
This is an interface to a fitting function - a semi-abstarct class.
Definition IFunction.h:167
Helper class which provides the Collimation Length for SANS instruments.