Mantid
Loading...
Searching...
No Matches
SaveHKL.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#pragma once
8
10#include "MantidCrystal/DllConfig.h"
12#include "MantidKernel/System.h"
13
14namespace Mantid {
15namespace Crystal {
16
23class MANTID_CRYSTAL_DLL SaveHKL final : public API::Algorithm {
24public:
26 const std::string name() const override { return "SaveHKL"; }
28 const std::string summary() const override { return "Save a PeaksWorkspace to a ASCII .hkl file."; }
29
31 int version() const override { return 1; }
32 const std::vector<std::string> seeAlso() const override { return {"LoadHKL", "SaveHKLCW"}; }
34 const std::string category() const override { return "Crystal\\DataHandling;DataHandling\\Text"; }
35
36private:
38 void init() override;
40 void exec() override;
41
42 double absorbSphere(double radius, double twoth, double wl, double &tbar);
43 double spectrumCalc(double TOF, int iSpec, std::vector<std::vector<double>> time,
44 std::vector<std::vector<double>> spectra, size_t id);
45 void sizeBanks(const std::string &bankName, int &nCols, int &nRows);
46
48 double m_smu = 0.0; // in 1/cm
49 double m_amu = 0.0; // in 1/cm
50 double m_power_th = 0.0;
51};
52
53} // namespace Crystal
54} // namespace Mantid
double radius
Definition: Rasterize.cpp:31
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Save a PeaksWorkspace to a Gsas-style ASCII .hkl file.
Definition: SaveHKL.h:23
const std::string summary() const override
Summary of algorithms purpose.
Definition: SaveHKL.h:28
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: SaveHKL.h:32
const std::string category() const override
Algorithm's category for identification.
Definition: SaveHKL.h:34
DataObjects::PeaksWorkspace_sptr m_ws
Definition: SaveHKL.h:47
int version() const override
Algorithm's version for identification.
Definition: SaveHKL.h:31
const std::string name() const override
Algorithm's name for identification.
Definition: SaveHKL.h:26
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
Helper class which provides the Collimation Length for SANS instruments.