Mantid
Loading...
Searching...
No Matches
WorkflowAlgorithmHelpers.h
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 +
7#pragma once
8
12#include <string>
13
16double getDblPropOrParam(const std::string &pmProp, Mantid::Kernel::PropertyManager_sptr &pm,
17 const std::string &instParam, Mantid::API::MatrixWorkspace_sptr &ws,
18 const double overrideValue = Mantid::EMPTY_DBL());
19
21int getIntPropOrParam(const std::string &pmProp, Mantid::Kernel::PropertyManager_sptr &pm, const std::string &instParam,
22 Mantid::API::MatrixWorkspace_sptr &ws, const int overrideValue = Mantid::EMPTY_INT());
23
25bool getBoolPropOrParam(const std::string &pmProp, Mantid::Kernel::PropertyManager_sptr &pm,
26 const std::string &instParam, Mantid::API::MatrixWorkspace_sptr &ws,
27 const bool overrideValue = false);
28} // namespace WorkflowAlgorithmHelpers
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< PropertyManager > PropertyManager_sptr
Typedef for a shared pointer to a PropertyManager.
constexpr int EMPTY_INT() noexcept
Returns what we consider an "empty" integer within a property.
Definition: EmptyValues.h:25
constexpr double EMPTY_DBL() noexcept
Returns what we consider an "empty" double within a property.
Definition: EmptyValues.h:43
int getIntPropOrParam(const std::string &pmProp, Mantid::Kernel::PropertyManager_sptr &pm, const std::string &instParam, Mantid::API::MatrixWorkspace_sptr &ws, const int overrideValue=Mantid::EMPTY_INT())
Function to get int property or instrument parameter value.
bool getBoolPropOrParam(const std::string &pmProp, Mantid::Kernel::PropertyManager_sptr &pm, const std::string &instParam, Mantid::API::MatrixWorkspace_sptr &ws, const bool overrideValue=false)
Function to get boolean property or instrument parameter value.
double getDblPropOrParam(const std::string &pmProp, Mantid::Kernel::PropertyManager_sptr &pm, const std::string &instParam, Mantid::API::MatrixWorkspace_sptr &ws, const double overrideValue=Mantid::EMPTY_DBL())
Function to get double property or instrument parameter value.