Mantid
Loading...
Searching...
No Matches
CloneMDWorkspace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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
11#include "MantidMDAlgorithms/DllConfig.h"
12
13namespace Mantid {
14namespace MDAlgorithms {
15
22class MANTID_MDALGORITHMS_DLL CloneMDWorkspace final : public API::Algorithm {
23public:
25 const std::string name() const override { return "CloneMDWorkspace"; };
27 const std::string summary() const override {
28 return "Clones (copies) an existing MDEventWorkspace or MDHistoWorkspace "
29 "into a new one.";
30 }
31
33 int version() const override { return 1; };
35 const std::string category() const override { return R"(MDAlgorithms\Utility\Workspaces;MDAlgorithms\Creation)"; }
36
37private:
39 void init() override;
41 void exec() override;
42
43 template <typename MDE, size_t nd> void doClone(const typename DataObjects::MDEventWorkspace<MDE, nd>::sptr &ws);
44};
45
46} // namespace MDAlgorithms
47} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
std::shared_ptr< MDEventWorkspace< MDE, nd > > sptr
Typedef for a shared pointer of this kind of event workspace.
Algorithm to clone a MDEventWorkspace to a new one.
const std::string name() const override
Algorithm's name for identification.
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
Algorithm's category for identification.
int version() const override
Algorithm's version for identification.
Helper class which provides the Collimation Length for SANS instruments.