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
13namespace Mantid {
14namespace Crystal {
15
22class MANTID_CRYSTAL_DLL SaveHKL final : public API::Algorithm {
23public:
25 const std::string name() const override { return "SaveHKL"; }
27 const std::string summary() const override { return "Save a PeaksWorkspace to a ASCII .hkl file."; }
28
30 int version() const override { return 1; }
31 const std::vector<std::string> seeAlso() const override { return {"LoadHKL", "SaveHKLCW"}; }
33 const std::string category() const override { return "Crystal\\DataHandling;DataHandling\\Text"; }
34
35private:
37 void init() override;
39 void exec() override;
40
41 double absorbSphere(double radius, double twoth, double wl, double &tbar);
42 double spectrumCalc(double TOF, int iSpec, const std::vector<std::vector<double>> &time,
43 const std::vector<std::vector<double>> &spectra, size_t id);
44 void sizeBanks(const std::string &bankName, int &nCols, int &nRows);
45
47 double m_smu = 0.0; // in 1/cm
48 double m_amu = 0.0; // in 1/cm
49 double m_power_th = 0.0;
50};
51
52} // namespace Crystal
53} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Save a PeaksWorkspace to a Gsas-style ASCII .hkl file.
Definition SaveHKL.h:22
const std::string summary() const override
Summary of algorithms purpose.
Definition SaveHKL.h:27
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:31
const std::string category() const override
Algorithm's category for identification.
Definition SaveHKL.h:33
DataObjects::PeaksWorkspace_sptr m_ws
Definition SaveHKL.h:46
int version() const override
Algorithm's version for identification.
Definition SaveHKL.h:30
const std::string name() const override
Algorithm's name for identification.
Definition SaveHKL.h:25
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.