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#include "MantidKernel/Unit.h"
15
16#ifndef Q_MOC_RUN
17#include <memory>
18#endif
19
20namespace Mantid {
21
22namespace API {
23
30class MANTID_API_DLL IFunctionMW : public virtual IFunction {
31public:
33 void setMatrixWorkspace(std::shared_ptr<const API::MatrixWorkspace> workspace, size_t wi, double startX,
34 double endX) override;
36 std::shared_ptr<const API::MatrixWorkspace> getMatrixWorkspace() const;
38 size_t getWorkspaceIndex() const { return m_workspaceIndex; }
39
40protected:
42 std::weak_ptr<const API::MatrixWorkspace> m_workspace;
44 size_t m_workspaceIndex = 0;
45};
46
47} // namespace API
48} // namespace Mantid
IPeaksWorkspace_sptr workspace
This is a specialization of IFunction for functions defined on a MatrixWorkspace.
Definition IFunctionMW.h:30
size_t getWorkspaceIndex() const
Get the workspace index.
Definition IFunctionMW.h:38
std::weak_ptr< const API::MatrixWorkspace > m_workspace
Keep a weak pointer to the workspace.
Definition IFunctionMW.h:42
This is an interface to a fitting function - a semi-abstarct class.
Definition IFunction.h:166
Helper class which provides the Collimation Length for SANS instruments.