Mantid
Loading...
Searching...
No Matches
UnaryOperationMD.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#include "MantidMDAlgorithms/DllConfig.h"
14
15namespace Mantid {
16namespace MDAlgorithms {
17
21class MANTID_MDALGORITHMS_DLL UnaryOperationMD : public API::Algorithm {
22public:
23 const std::string name() const override;
24 int version() const override;
25 const std::string category() const override;
26 const std::string summary() const override { return "Abstract base class for unary operations on MDWorkspaces."; }
27
28protected:
30 virtual const std::string inputPropName() const { return "InputWorkspace"; }
32 virtual const std::string outputPropName() const { return "OutputWorkspace"; }
33
34 void init() override;
35 virtual void initExtraProperties();
36 void exec() override;
37
39 virtual void checkInputs() = 0;
40
43
46
49
52
55
58};
59
60} // namespace MDAlgorithms
61} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Abstract base class for unary operations (e.g.
const std::string summary() const override
function returns a summary message that will be displayed in the default GUI, and in the help.
Mantid::API::IMDWorkspace_sptr m_out
Output workspace.
virtual void execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out)=0
Run the algorithm with a MDHistoWorkspace.
virtual const std::string outputPropName() const
The name of the output workspace property.
virtual void execEvent(Mantid::API::IMDEventWorkspace_sptr out)=0
Run the algorithm on a MDEventWorkspace.
virtual void checkInputs()=0
Check the inputs and throw if the algorithm cannot be run.
Mantid::API::IMDEventWorkspace_sptr m_in_event
Input workspace (MDEvent)
virtual const std::string inputPropName() const
The name of the input workspace property.
Mantid::DataObjects::MDHistoWorkspace_sptr m_in_histo
Input workspace (MDHisto)
Mantid::API::IMDWorkspace_sptr m_in
Input workspace.
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
std::shared_ptr< IMDWorkspace > IMDWorkspace_sptr
Shared pointer to the IMDWorkspace base class.
Definition: IMDWorkspace.h:146
std::shared_ptr< MDHistoWorkspace > MDHistoWorkspace_sptr
A shared pointer to a MDHistoWorkspace.
Helper class which provides the Collimation Length for SANS instruments.