18using namespace Kernel;
27 "Will use mapping indexed by spectrum number rather than the default of"
28 "Workspace Index (recommended when both workspaces have a vertical axis "
29 "in spectrum number).");
35 bool indexBySpecNumber =
getProperty(
"IndexBySpectrumNumber");
39 wsToRemap->updateSpectraUsing(detMap);
45 std::map<std::string, std::string> issues;
51 bool validWorkspaces =
true;
53 if (wsToMatch ==
nullptr) {
54 issues[
"WorkspaceToMatch"] =
"Must be a MatrixWorkspace";
55 validWorkspaces =
false;
58 if (wsToRemap ==
nullptr) {
59 issues[
"WorkspaceToRemap"] =
"Must be a MatrixWorkspace";
60 validWorkspaces =
false;
64 if (validWorkspaces && wsToMatch->getNumberHistograms() != wsToRemap->getNumberHistograms())
65 issues[
"WorkspaceToRemap"] =
"Number of histograms must match WorkspaceToMatch";
#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 minimal class to hold the mapping between the spectrum number and its related detector ID numbers f...
A property class for workspaces.
void init() override
Initialisation code.
void exec() override
Execution code.
std::map< std::string, std::string > validateInputs() override
Input property validation.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
The concrete, templated class for properties.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
@ InOut
Both an input & output workspace.
@ Input
An input workspace.