8#include "MantidAPI/Algorithm.tcc"
16using namespace Kernel;
20 declareWorkspaceInputProperties<MatrixWorkspace>(
"InputWorkspace",
21 "The name of the input workspace. Must contain histogram data.",
22 std::make_shared<HistogramValidator>());
23 declareWorkspaceInputProperties<MatrixWorkspace>(
25 "The name of the workspaces containing masked bins to copy over. Must "
26 "contain histogram data.",
27 std::make_shared<HistogramValidator>());
30 "The name of the Workspace containing the masked bins.");
37 std::tie(inputWS,
m_indexSet) = getWorkspaceAndIndices<MatrixWorkspace>(
"InputWorkspace");
42 if (outputWS != inputWS) {
43 outputWS = inputWS->clone();
50 if (maskedWS->hasMaskedBins(0)) {
51 const auto maskedBins = maskedWS->maskedBins(0);
53 for (
const auto &maskedBin : maskedBins) {
54 outputWS->flagMasked(wi, maskedBin.first, maskedBin.second);
#define DECLARE_ALGORITHM(classname)
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
A property class for workspaces.
void init() override
Initialisation code.
void exec() override
Execution code.
Indexing::SpectrumIndexSet m_indexSet
the list of Spectra (workspace index) to load
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
@ Output
An output workspace.