Mantid
Loading...
Searching...
No Matches
ExponentialMD.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
9
10using namespace Mantid::Kernel;
11using namespace Mantid::API;
12
13namespace Mantid::MDAlgorithms {
14
15// Register the algorithm into the AlgorithmFactory
16DECLARE_ALGORITHM(ExponentialMD)
17
18//----------------------------------------------------------------------------------------------
20const std::string ExponentialMD::name() const { return "ExponentialMD"; }
21
23int ExponentialMD::version() const { return 1; }
24
25//----------------------------------------------------------------------------------------------
26
27//----------------------------------------------------------------------------------------------
30 if (!m_in_histo)
31 throw std::runtime_error(this->name() + " can only be run on a MDHistoWorkspace.");
32}
33
34//----------------------------------------------------------------------------------------------
37 throw std::runtime_error(this->name() + " can only be run on a MDHistoWorkspace.");
38}
39
40//----------------------------------------------------------------------------------------------
43
44} // namespace Mantid::MDAlgorithms
#define DECLARE_ALGORITHM(classname)
Definition: Algorithm.h:576
ExponentialMD : exponential function on MDHistoWorkspace.
Definition: ExponentialMD.h:19
int version() const override
Algorithm's version for identification.
const std::string name() const override
Algorithm's name for identification.
void checkInputs() override
Check the inputs and throw if the algorithm cannot be run.
void execEvent(Mantid::API::IMDEventWorkspace_sptr out) override
Run the algorithm on a MDEventWorkspace.
void execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out) override
Run the algorithm with a MDHistoWorkspace.
Mantid::DataObjects::MDHistoWorkspace_sptr m_in_histo
Input workspace (MDHisto)
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
std::shared_ptr< MDHistoWorkspace > MDHistoWorkspace_sptr
A shared pointer to a MDHistoWorkspace.
STL namespace.