15using namespace Algorithms;
19 const std::string &indexMaxPropertyName,
20 const std::string &indexRangePropertyName) {
24 auto mustBePositive = std::make_shared<Kernel::BoundedValidator<int>>();
25 mustBePositive->setLower(0);
33 "The last Workspace index to be included in the summing");
36 "A list of workspace indices as a string with ranges, for "
37 "example: 5-10,15,20-23. \n"
38 "Optional: if not specified, then the "
39 "Start/EndWorkspaceIndex fields are used alone. "
40 "If specified, the range and the list are combined (without "
41 "duplicating indices). For example, a range of 10 to 20 and "
42 "a list '12,15,26,28' gives '10-20,26,28'.");
53 auto numberOfSpectra =
workspace.getNumberHistograms();
56 return {numberOfSpectra};
62 if (indices_list.empty()) {
64 return {numberOfSpectra};
66 return {min, max, numberOfSpectra};
71 for (
int i = min; i <= max; i++)
72 indices_list.emplace_back(i);
74 return {indices_list, numberOfSpectra};
IPeaksWorkspace_sptr workspace
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
bool existsProperty(const std::string &name) const override
Checks whether the named property is already in the list of managed property.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
static bool isEmpty(const NumT toCheck)
checks that the value was not set by users, uses the value in empty double/int.
Base MatrixWorkspace Abstract Class.
void declareWorkspaceIndexSetProperties(const std::string &indexMinPropertyName="IndexMin", const std::string &indexMaxPropertyName="IndexMax", const std::string &indexRangePropertyName="WorkspaceIndexList")
Declare standard properties for defining ranges/lists of spectra.
void ifEventWorkspaceClearMRU(const WS &workspace)
Templated function used as 'compile-time conditional', together with specialization.
Kernel::IndexSet getWorkspaceIndexSet(const API::MatrixWorkspace &workspace) const
Returns a validated IndexSet refering to spectra in workspace.
std::string m_indexRangePropertyName
std::string m_indexMaxPropertyName
std::string m_indexMinPropertyName
This class is intended to fulfill the design specified in <https://github.com/mantidproject/documents...
Support for a property that holds an array of values.
IndexSet is a container that can be used to define and access a subset of elements in a larger contai...
Helper class which provides the Collimation Length for SANS instruments.
constexpr int EMPTY_INT() noexcept
Returns what we consider an "empty" integer within a property.