Mantid
Loading...
Searching...
No Matches
SaveRKH.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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 "MantidDataHandling/DllConfig.h"
14#include <fstream>
15
16namespace Mantid {
17namespace DataHandling {
31class MANTID_DATAHANDLING_DLL SaveRKH final : public API::Algorithm {
32public:
34 const std::string name() const override { return "SaveRKH"; }
36 const std::string summary() const override { return "Save a file in the LOQ RKH/'FISH' format"; }
37
39 int version() const override { return (1); }
40 const std::vector<std::string> seeAlso() const override { return {"LoadRKH"}; }
42 const std::string category() const override { return "DataHandling\\Text"; }
43
46 Q_CODE = 6,
48 LINE_LENGTH = 8
49 };
50
51private:
53 void init() override;
55 void exec() override;
56
57 void writeHeader();
58 void write1D();
59 void write2D();
60
64 bool m_2d{false};
66 std::ofstream m_outRKH;
67};
68} // namespace DataHandling
69} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Saves a workspace in the RKH file format.
Definition: SaveRKH.h:31
FileConstants
Constants used in RKH files.
Definition: SaveRKH.h:45
std::ofstream m_outRKH
The output filehandle.
Definition: SaveRKH.h:66
const std::string name() const override
Algorithm's name.
Definition: SaveRKH.h:34
API::MatrixWorkspace_const_sptr m_workspace
The input workspace.
Definition: SaveRKH.h:62
const std::string category() const override
Algorithm's category for identification.
Definition: SaveRKH.h:42
int version() const override
Algorithm's version.
Definition: SaveRKH.h:39
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: SaveRKH.h:40
const std::string summary() const override
Summary of algorithms purpose.
Definition: SaveRKH.h:36
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
Helper class which provides the Collimation Length for SANS instruments.