19#include "MantidCrystal/DllConfig.h"
36 std::string
name()
const override {
return std::string(
"PeakHKLErrors"); };
38 virtual int version()
const {
return 1; };
40 const std::string
category()
const override {
return "Calibration"; };
42 void function1D(
double *out,
const double *xValues,
const size_t nData)
const override;
75 std::vector<std::string>
getAttributeNames()
const override {
return {
"OptRuns",
"PeakWorkspaceName"}; }
78 if (attName ==
"OptRuns")
81 if (attName ==
"PeakWorkspaceName")
84 throw std::invalid_argument(
"Not a valid attribute name");
88 if (attName ==
"OptRuns") {
89 OptRuns =
value.asString();
94 if (OptRuns.at(0) !=
'/')
95 OptRuns =
"/" + OptRuns;
97 if (OptRuns.at(OptRuns.size() - 1) !=
'/')
103 }
else if (initMode == 2)
104 throw std::invalid_argument(
"OptRuns can only be set once");
109 if (attName ==
"PeakWorkspaceName") {
110 PeakWorkspaceName =
value.asString();
114 throw std::invalid_argument(
"Not a valid attribute name");
118 if (attName ==
"OptRuns")
121 if (attName ==
"PeakWorkspaceName")
double value
The value of the point.
This is a specialization of IFunction for functions of one real argument.
Attribute is a non-fitting parameter.
Represents the Jacobian in IFitFunction::functionDeriv.
Implements the part of IFunction interface dealing with parameters.
size_t nAttributes() const override
Returns the number of attributes associated with the function.
std::string PeakWorkspaceName
std::vector< std::string > getAttributeNames() const override
Returns a list of attribute names.
std::string name() const override
Returns the function's name.
IFunction::Attribute getAttribute(const std::string &attName) const override
Return a value of attribute attName.
virtual int version() const
bool hasAttribute(const std::string &attName) const override
Check if attribute attName exists.
const std::string category() const override
The categories the Fit function belong to.
void setAttribute(const std::string &attName, const IFunction::Attribute &value) override
Set a value to attribute attName.
Structure describing a single-crystal peak.
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
Helper class which provides the Collimation Length for SANS instruments.