Mantid
Loading...
Searching...
No Matches
CreateMDWorkspace.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
14#include "MantidMDAlgorithms/DllConfig.h"
15
16namespace Mantid {
17namespace MDAlgorithms {
18
19std::vector<std::string> MANTID_MDALGORITHMS_DLL parseNames(const std::string &names_string);
20
30class MANTID_MDALGORITHMS_DLL CreateMDWorkspace : public API::BoxControllerSettingsAlgorithm {
31public:
33 const std::string name() const override { return "CreateMDWorkspace"; }
35 const std::string summary() const override {
36 return "Creates an empty MDEventWorkspace with a given number of "
37 "dimensions.";
38 }
39
41 int version() const override { return 1; }
42 const std::vector<std::string> seeAlso() const override {
43 return {"ConvertToMD", "CreateMDHistoWorkspace", "FakeMDEventData", "CreateMD"};
44 }
46 const std::string category() const override { return "MDAlgorithms\\Creation"; }
47 std::map<std::string, std::string> validateInputs() override;
48
49private:
50 void init() override;
51 void exec() override;
52
53 template <typename MDE, size_t nd> void finish(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws);
54 Mantid::Geometry::MDFrame_uptr createMDFrame(const std::string &frame, const std::string &unit);
55 bool checkIfFrameValid(const std::string &frame, const std::vector<std::string> &targetFrames);
56};
57
58} // namespace MDAlgorithms
59} // namespace Mantid
An abstract algorithm sub-class for algorithms that define properties for BoxController settings.
std::shared_ptr< MDEventWorkspace< MDE, nd > > sptr
Typedef for a shared pointer of this kind of event workspace.
int version() const override
Algorithm's version for identification.
const std::string summary() const override
Summary of algorithms purpose.
const std::string name() const override
Algorithm's name for identification.
const std::string category() const override
Algorithm's category for identification.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
std::unique_ptr< MDFrame > MDFrame_uptr
Definition: MDFrame.h:36
std::vector< std::string > MANTID_MDALGORITHMS_DLL parseNames(const std::string &names_string)
Helper class which provides the Collimation Length for SANS instruments.