Mantid
Loading...
Searching...
No Matches
SaveNexus.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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
10#include "MantidDataHandling/DllConfig.h"
11#include <climits>
12
13namespace Mantid {
14namespace DataHandling {
31class MANTID_DATAHANDLING_DLL SaveNexus : public API::SerialAlgorithm {
32public:
34 const std::string name() const override { return "SaveNexus"; };
36 const std::string summary() const override {
37 return "The SaveNexus algorithm will write the given Mantid workspace to a "
38 "NeXus file. SaveNexus currently just invokes SaveNexusProcessed.";
39 }
40
42 int version() const override { return 1; };
43 const std::vector<std::string> seeAlso() const override {
44 return {"SaveISISNexus", "SaveNexusPD", "SaveNexusProcessed", "LoadNexus"};
45 }
47 const std::string category() const override { return "DataHandling\\Nexus"; }
48
49private:
51 void init() override;
52
54 void exec() override;
55
57 std::string m_filename;
59 std::string m_entryname;
61 std::string m_dataname;
63 std::string m_filetype;
67 void runSaveNexusProcessed();
69 void setOtherProperties(IAlgorithm *alg, const std::string &propertyName, const std::string &propertyValue,
70 int perioidNum) override;
71
72protected:
74 bool processGroups() override;
75};
76
77} // namespace DataHandling
78} // namespace Mantid
IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:45
Base class for algorithms that can only run serially (Parallel::ExecutionMode::MasterOnly) in an MPI ...
Saves a file in NeXus format and from a 2D workspace (Workspace2D class).
Definition: SaveNexus.h:31
int version() const override
Algorithm's version for identification overriding a virtual method.
Definition: SaveNexus.h:42
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
Definition: SaveNexus.h:34
std::string m_filetype
The file type to save, currently only one type possible.
Definition: SaveNexus.h:63
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: SaveNexus.h:43
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Definition: SaveNexus.h:47
const std::string summary() const override
Summary of algorithms purpose.
Definition: SaveNexus.h:36
std::string m_filename
The name and path of the input file.
Definition: SaveNexus.h:57
std::string m_dataname
The prefix to be used to name spectra (_n added for nth spectra)
Definition: SaveNexus.h:61
std::string m_entryname
The name and path of the input file.
Definition: SaveNexus.h:59
API::Workspace_sptr m_inputWorkspace
Pointer to the local workspace.
Definition: SaveNexus.h:65
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20
Helper class which provides the Collimation Length for SANS instruments.