Mantid
Loading...
Searching...
No Matches
ConvertMDHistoToMatrixWorkspace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 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
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
13#include "MantidMDAlgorithms/DllConfig.h"
14
15namespace Mantid {
16
17namespace API {
18class IMDHistoWorkspace;
19}
20
21namespace MDAlgorithms {
36class MANTID_MDALGORITHMS_DLL ConvertMDHistoToMatrixWorkspace final : public API::Algorithm {
37public:
39 const std::string name() const override { return "ConvertMDHistoToMatrixWorkspace"; };
40
42 const std::string summary() const override { return "Converts if it can a IMDHistoWorkspace to a Workspace2D."; }
43
45 int version() const override { return (1); }
46 const std::vector<std::string> seeAlso() const override {
47 return {"ConvertToMD", "CreateMDHistoWorkspace", "ConvertTableToMatrixWorkspace", "MDHistoToWorkspace2D"};
48 }
50 const std::string category() const override { return "Utility\\Workspaces;MDAlgorithms\\Transforms"; }
51
52private:
54 void init() override;
56 void exec() override;
57
59 void make1DWorkspace();
61 void make2DWorkspace();
63 size_t calcStride(const API::IMDHistoWorkspace &workspace, size_t dim) const;
64};
65
66} // namespace MDAlgorithms
67} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Abstract interface to MDHistoWorkspace, for use in exposing to Python.
Creates a single spectrum Workspace2D with X,Y, and E copied from an first non-integrated dimension o...
const std::string category() const override
Algorithm's category for identification.
const std::string name() const override
Algorithm's name.
const std::string summary() const override
Summary of algorithms purpose.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Helper class which provides the Collimation Length for SANS instruments.