Mantid
Loading...
Searching...
No Matches
SaveMD2.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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 {
14
15namespace MDAlgorithms {
16
19class MANTID_MDALGORITHMS_DLL SaveMD2 final : public API::Algorithm {
20public:
22 const std::string name() const override { return "SaveMD"; };
24 const std::string summary() const override { return "Save a MDEventWorkspace or MDHistoWorkspace to a .nxs file."; }
25
27 int version() const override { return 2; };
28 const std::vector<std::string> seeAlso() const override { return {"LoadMD", "SaveZODS"}; }
30 const std::string category() const override { return "MDAlgorithms\\DataHandling"; }
31
32private:
34 void init() override;
36 void exec() override;
37
39 void doSaveHisto(const Mantid::DataObjects::MDHistoWorkspace_sptr &ws);
40
42 template <typename T>
43 void saveMatrix(::NeXus::File *const file, std::string name, Kernel::Matrix<T> &m, ::NeXus::NXnumtype type,
44 std::string tag = "");
45};
46
47} // namespace MDAlgorithms
48} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Numerical Matrix class.
Definition: Matrix.h:42
Save a MDEventWorkspace to a .nxs file.
Definition: SaveMD2.h:19
const std::string name() const override
Algorithm's name for identification.
Definition: SaveMD2.h:22
const std::string summary() const override
Summary of algorithms purpose.
Definition: SaveMD2.h:24
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition: SaveMD2.h:28
const std::string category() const override
Algorithm's category for identification.
Definition: SaveMD2.h:30
void saveMatrix(::NeXus::File *const file, std::string name, Kernel::Matrix< T > &m, ::NeXus::NXnumtype type, std::string tag="")
Save a generic matrix.
int version() const override
Algorithm's version for identification.
Definition: SaveMD2.h:27
std::shared_ptr< MDHistoWorkspace > MDHistoWorkspace_sptr
A shared pointer to a MDHistoWorkspace.
Helper class which provides the Collimation Length for SANS instruments.