Mantid
Loading...
Searching...
No Matches
LoadGSS.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 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//---------------------------------------------------
13#include "MantidDataHandling/DllConfig.h"
15
16namespace Mantid {
17namespace DataHandling {
24class MANTID_DATAHANDLING_DLL LoadGSS : public API::IFileLoader<Kernel::FileDescriptor> {
25public:
27 const std::string name() const override { return "LoadGSS"; }
28
30 const std::string summary() const override {
31 return "Loads a GSS file such as that saved by SaveGSS. This is not a "
32 "lossless process, as SaveGSS truncates some data. There is no "
33 "instrument assosciated with the resulting workspace. 'Please "
34 "Note': Due to limitations of the GSS file format, the process of "
35 "going from Mantid to a GSS file and back is not perfect.";
36 }
37
39 int version() const override { return (1); }
40 const std::vector<std::string> seeAlso() const override { return {"LoadAscii", "SaveGSS", "LoadMultipleGSS"}; }
41
43 const std::string category() const override { return "Diffraction\\DataHandling;DataHandling\\Text"; }
44
46 int confidence(Kernel::FileDescriptor &descriptor) const override;
47
48private:
50 void init() override;
51
53 void exec() override;
54
56 API::MatrixWorkspace_sptr loadGSASFile(const std::string &filename, bool useBankAsSpectrum);
57
59 double convertToDouble(std::string inputstring);
60
62 void createInstrumentGeometry(const API::MatrixWorkspace_sptr &workspace, const std::string &instrumentname,
63 const double &primaryflightpath, const std::vector<int> &detectorids,
64 const std::vector<double> &totalflightpaths, const std::vector<double> &twothetas,
65 const std::vector<double> &difcs);
66};
67} // namespace DataHandling
68} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Definition: IFileLoader.h:19
Loads a file as saved by SaveGSS.
Definition: LoadGSS.h:24
int version() const override
Algorithm's version.
Definition: LoadGSS.h:39
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadGSS.h:30
const std::string category() const override
Algorithm's category for identification.
Definition: LoadGSS.h:43
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: LoadGSS.h:40
const std::string name() const override
Algorithm's name.
Definition: LoadGSS.h:27
Defines a wrapper around an open file.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.