14#include "MantidMDAlgorithms/DllConfig.h"
27namespace MDAlgorithms {
31 const std::string name()
const override;
32 int version()
const override;
33 const std::vector<std::string>
seeAlso()
const override {
return {
"LoadNXSPE",
"SaveNXSPE"}; }
34 const std::string category()
const override;
35 const std::string summary()
const override;
45 void initFileReader();
46 int32_t readMainHeader();
47 void throwIfUnsupportedFileType(int32_t sqwType);
48 void createOutputWorkspace();
49 void readAllSPEHeadersToWorkspace();
50 std::shared_ptr<API::ExperimentInfo> readSingleSPEHeader();
52 void skipDetectorSection();
53 void readDataSection();
54 void skipDataSectionMetadata();
55 void readSQWDimensions();
56 std::vector<int32_t> readProjection();
57 std::vector<float> calculateDimLimitsFromData();
61 void setupBoxController();
62 void setupFileBackend(
const std::string &filebackPath);
63 void readPixelDataIntoWorkspace();
65 void warnIfMemoryInsufficient(int64_t npixtot);
66 size_t addEventFromBuffer(
const float *pixel);
67 void toOutputFrame(
coord_t *centers);
70 std::unique_ptr<std::ifstream>
m_file;
71 std::unique_ptr<Kernel::BinaryStreamReader>
m_reader;
std::map< DeltaEMode::Type, std::string > index
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Templated class for the multi-dimensional event workspace.
Class to implement UB matrix.
Defines a wrapper around an open file.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
std::unique_ptr< Kernel::BinaryStreamReader > m_reader
std::unique_ptr< std::ifstream > m_file
Kernel::DblMatrix m_uToRLU
std::shared_ptr< SQWWorkspace > m_outputWS
std::string m_outputFrame
std::shared_ptr< IMDDimension > IMDDimension_sptr
Shared Pointer for IMDDimension. Frequently used type in framework.
Helper class which provides the Collimation Length for SANS instruments.
float coord_t
Typedef for the data type to use for coordinate axes in MD objects such as MDBox, MDEventWorkspace,...