20const
std::
string PowerMD::name()
const {
return "PowerMD"; }
30 declareProperty(
"Exponent", 2.0,
"Power to which to raise the values. Default 2.0.");
37 throw std::runtime_error(this->
name() +
" can only be run on a MDHistoWorkspace.");
43 throw std::runtime_error(this->
name() +
" can only be run on a MDHistoWorkspace.");
#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.
PowerMD : raise a MDHistoWorkspace to a power.
int version() const override
Algorithm's version for identification.
void checkInputs() override
Check the inputs and throw if the algorithm cannot be run.
void execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out) override
Run the algorithm with a MDHistoWorkspace.
void initExtraProperties() override
Optional method to be subclassed to add properties.
void execEvent(Mantid::API::IMDEventWorkspace_sptr out) override
Run the algorithm on a MDEventWorkspace.
const std::string name() const override
Algorithm's name for identification.
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.