Mantid
Loading...
Searching...
No Matches
RunPythonScript.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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
10
11#include <boost/python/dict.hpp>
12
13namespace Mantid {
14namespace PythonInterface {
15
17public:
18 const std::string name() const override;
19 int version() const override;
20 const std::string category() const override;
21 const std::string summary() const override;
22 std::map<std::string, std::string> validateInputs() override;
23
24private:
25 bool checkGroups() override;
26 void init() override;
27 void exec() override;
28
30 std::string scriptCode() const;
32 std::shared_ptr<API::Workspace> executeScript(const std::string &script) const;
34 boost::python::dict doExecuteScript(const std::string &script) const;
37 boost::python::dict buildLocals() const;
39 std::shared_ptr<API::Workspace> extractOutputWorkspace(const boost::python::dict &locals) const;
40};
41
42} // namespace PythonInterface
43} // namespace Mantid
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Helper class which provides the Collimation Length for SANS instruments.