Mantid
Loading...
Searching...
No Matches
LoadSPE.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 {
30class MANTID_DATAHANDLING_DLL LoadSPE : public API::IFileLoader<Kernel::FileDescriptor> {
31public:
33 const std::string name() const override { return "LoadSPE"; }
35 const std::string summary() const override { return "Loads a file written in the spe format."; }
36
38 int version() const override { return (1); }
39 const std::vector<std::string> seeAlso() const override { return {"SaveSPE"}; }
41 const std::string category() const override { return "DataHandling\\SPE;Inelastic\\DataHandling"; }
43 int confidence(Kernel::FileDescriptor &descriptor) const override;
44
45private:
46 // Initialisation code
47 void init() override;
48 // Execution code
49 void exec() override;
50
51 void readHistogram(FILE *speFile, const API::MatrixWorkspace_sptr &workspace, size_t index);
52 void reportFormatError(const std::string &what);
53
54 std::string m_filename;
55};
56
57} // namespace DataHandling
58} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
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 an SPE format file into a Mantid workspace.
Definition: LoadSPE.h:30
const std::string name() const override
Algorithm's name.
Definition: LoadSPE.h:33
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadSPE.h:35
const std::string category() const override
Algorithm's category for identification.
Definition: LoadSPE.h:41
std::string m_filename
The file to load.
Definition: LoadSPE.h:54
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: LoadSPE.h:39
int version() const override
Algorithm's version.
Definition: LoadSPE.h:38
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.