Mantid
Loading...
Searching...
No Matches
SaveNXSPE.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// Mantid Repository : https://github.com/mantidproject/mantid
8#pragma once
9
10//---------------------------------------------------
11// Includes
12//---------------------------------------------------
13#include "MantidAPI/Algorithm.h"
14#include "MantidDataHandling/DllConfig.h"
15
16namespace Mantid {
17namespace DataHandling {
18
43class MANTID_DATAHANDLING_DLL SaveNXSPE final : public API::Algorithm {
44public:
46 SaveNXSPE();
47 const std::string name() const override { return "SaveNXSPE"; }
49 const std::string summary() const override { return "Writes a MatrixWorkspace to a file in the NXSPE format."; }
50
52 int version() const override { return (1); }
53 const std::vector<std::string> seeAlso() const override { return {"LoadNXSPE", "SaveSPE"}; }
55 const std::string category() const override {
56 return R"(DataHandling\Nexus;DataHandling\SPE;Inelastic\DataHandling)";
57 }
58
59private:
61 void init() override;
63 void exec() override;
64
65 // Some constants to be written for masked values.
67 static const double MASK_FLAG;
69 static const double MASK_ERROR;
71 static const std::string NXSPE_VER;
73 static const size_t MAX_CHUNK_SIZE;
74};
75
76} // namespace DataHandling
77} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Saves a workspace into a NeXus/HDF5 NXSPE file.
Definition: SaveNXSPE.h:43
static const size_t MAX_CHUNK_SIZE
The size in bytes of a chunk to accumulate to write to the file at once.
Definition: SaveNXSPE.h:73
static const std::string NXSPE_VER
file format version
Definition: SaveNXSPE.h:71
const std::string summary() const override
Summary of algorithms purpose.
Definition: SaveNXSPE.h:49
const std::string category() const override
Algorithm's category for identification.
Definition: SaveNXSPE.h:55
static const double MASK_FLAG
Value for data if pixel is masked.
Definition: SaveNXSPE.h:67
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
Definition: SaveNXSPE.h:47
int version() const override
Algorithm's version.
Definition: SaveNXSPE.h:52
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: SaveNXSPE.h:53
static const double MASK_ERROR
Value for error if pixel is masked.
Definition: SaveNXSPE.h:69
Helper class which provides the Collimation Length for SANS instruments.