19namespace PythonInterface {
62 if (algName.empty()) {
63 throw std::invalid_argument(
"Failed to specify algorithm name");
67 std::vector<std::string> names;
68 boost::python::extract<std::string> extractor(propNames);
69 if (extractor.check()) {
70 names = std::vector<std::string>(1, extractor());
75 auto algorithm = API::AlgorithmManager::Instance().createUnmanaged(algName,
version);
76 algorithm->initialize();
78 for (
const auto &
name : names) {
82 std::string msg(
"Failed to specify properties to copy from \"");
83 msg.append(algName).append(
"\"");
84 throw std::invalid_argument(msg);
89 return this->
load(inputData, loadQuiet);
96 std::shared_ptr<Kernel::PropertyManager>
101 void saveNexusProxy(
const std::string &outputWSName,
const std::string &outputFile) {
102 this->
saveNexus(outputWSName, outputFile);
std::shared_ptr< Kernel::PropertyManager > getProcessProperties(const std::string &propertyManager=std::string()) const
Get the property manager object of a given name from the property manager data service,...
virtual ITableWorkspace_sptr determineChunk(const std::string &filename)
void saveNexus(const std::string &outputWSName, const std::string &outputFile)
Save a workspace as a nexus file, with check for which thread we are executing in.
void copyProperty(const API::Algorithm_sptr &alg, const std::string &name)
Copy a property from an existing algorithm.
std::vector< std::string > splitInput(const std::string &input)
void setAccumAlg(const std::string &alg)
void setLoadAlgFileProp(const std::string &filePropName)
void setLoadAlg(const std::string &alg)
virtual MatrixWorkspace_sptr loadChunk(const size_t rowIndex)
Workspace_sptr load(const std::string &inputData, const bool loadQuiet=false)
Determine what kind of input data we have and load it.
Provides a layer class for boost::python to allow C++ virtual functions to be overridden in a Python ...
const std::string name() const override
Returns the name of the algorithm.
int version() const override
Returns a version of the algorithm.
Provides a layer class for boost::python to allow C++ virtual functions to be overridden in a Python ...
DataProcessorAdapter(const DataProcessorAdapter &)=delete
Disable copy operator.
void setLoadAlgProxy(const std::string &alg)
void forwardPropertiesProxy()
API::Workspace_sptr loadProxy(const std::string &inputData, const bool loadQuiet=false)
DataProcessorAdapter()=delete
Disable default constructor - The PyObject must be supplied to construct the object.
void setAccumAlgProxy(const std::string &alg)
void copyPropertiesProxy(const std::string &algName, const boost::python::object &propNames, const int version=-1)
API::ITableWorkspace_sptr determineChunkProxy(const std::string &filename)
std::vector< std::string > splitInputProxy(const std::string &input)
void setLoadAlgFilePropProxy(const std::string &filePropName)
std::shared_ptr< Kernel::PropertyManager > getProcessPropertiesProxy(const std::string &propertyManager=std::string())
DataProcessorAdapter & operator=(const DataProcessorAdapter &)=delete
Disable assignment operator.
void loadChunkProxy(const size_t rowIndex)
void saveNexusProxy(const std::string &outputWSName, const std::string &outputFile)
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
bool isNone(const PyObject *ptr)
Helper class which provides the Collimation Length for SANS instruments.
Converts a Python sequence type to a C++ std::vector, where the element type is defined by the templa...