Mantid
Loading...
Searching...
No Matches
ImportMDHistoWorkspaceBase.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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#include <vector>
13
14namespace Mantid {
15namespace MDAlgorithms {
16
22class MANTID_MDALGORITHMS_DLL ImportMDHistoWorkspaceBase : public API::Algorithm {
23public:
24 std::map<std::string, std::string> validateInputs() override;
25
26protected:
28 DataObjects::MDHistoWorkspace_sptr createEmptyOutputWorkspace();
31 void initGenericImportProps();
33 size_t getBinProduct() const { return m_bin_product; }
34
35private:
36 // Product of the bins across all dimensions.
37 size_t m_bin_product = 0;
38 Mantid::Geometry::MDFrame_uptr createMDFrame(const std::string &frame, const std::string &unit);
39 bool checkIfFrameValid(const std::string &frame, const std::vector<std::string> &targetFrames);
40 std::vector<std::string> parseNames(const std::string &names_string);
41};
42
43} // namespace MDAlgorithms
44} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
ImportMDHistoWorkspaceBase : Base class for algorithms Importing data as MDHistoWorkspaces.
size_t getBinProduct() const
Getter for the number of bins (product accross all dimensions)
std::shared_ptr< MDHistoWorkspace > MDHistoWorkspace_sptr
A shared pointer to a MDHistoWorkspace.
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.