Mantid
Loading...
Searching...
No Matches
PlusMD.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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
13
14namespace Mantid {
15namespace MDAlgorithms {
16
21class MANTID_MDALGORITHMS_DLL PlusMD : public BinaryOperationMD {
22public:
24 const std::string name() const override { return "PlusMD"; };
26 const std::string summary() const override {
27 return "Sum two MDHistoWorkspaces or merges two MDEventWorkspaces together "
28 "by combining their events together in one workspace.";
29 }
30
32 int version() const override { return 1; };
33 const std::vector<std::string> seeAlso() const override { return {"MinusMD", "MultiplyMD", "DivideMD", "PowerMD"}; }
34
35private:
37 bool commutative() const override;
38
40 void checkInputs() override;
41
43 void execEvent() override;
44
46 void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out,
48
50 void execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out,
52
53 template <typename MDE, size_t nd> void doPlus(typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws);
54
59};
60
61} // namespace MDAlgorithms
62} // namespace Mantid
std::shared_ptr< MDEventWorkspace< MDE, nd > > sptr
Typedef for a shared pointer of this kind of event workspace.
Abstract base class for binary operations on IMDWorkspaces, e.g.
Sum two MDWorkspaces together.
Definition: PlusMD.h:21
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition: PlusMD.h:33
Mantid::API::IMDEventWorkspace_sptr iws1
Workspace into which stuff will get added.
Definition: PlusMD.h:56
const std::string summary() const override
Summary of algorithms purpose.
Definition: PlusMD.h:26
Mantid::API::IMDEventWorkspace_sptr iws2
Workspace that will be added into ws1.
Definition: PlusMD.h:58
const std::string name() const override
Algorithm's name for identification.
Definition: PlusMD.h:24
int version() const override
Algorithm's version for identification.
Definition: PlusMD.h:32
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
std::shared_ptr< const WorkspaceSingleValue > WorkspaceSingleValue_const_sptr
std::shared_ptr< MDHistoWorkspace > MDHistoWorkspace_sptr
A shared pointer to a MDHistoWorkspace.
std::shared_ptr< const MDHistoWorkspace > MDHistoWorkspace_const_sptr
A shared pointer to a const MDHistoWorkspace.
Helper class which provides the Collimation Length for SANS instruments.