14#include "MantidMDAlgorithms/DllConfig.h"
19namespace MDAlgorithms {
32namespace LoadSQWHelper {
72 std::streamoff start_location);
76 std::streamoff start_location);
79 uint64_t &nDataPoints);
89 const std::string
name()
const override {
return "LoadSQW"; };
91 const std::string
summary()
const override {
92 return "Create a MDEventWorkspace with events in reciprocal space (Qx, Qy, "
93 "Qz, Energy) from a SQW file.";
97 int version()
const override {
return 1; };
99 const std::string
category()
const override {
return "DataHandling\\SQW;MDAlgorithms\\DataHandling"; }
105 void init()
override;
106 void exec()
override;
113 void readDNDDimensions(std::vector<Mantid::Geometry::MDHistoDimensionBuilder> &DimVectorOut,
114 bool arrangeByMDImage =
true);
116 void readSQWDimensions(std::vector<Mantid::Geometry::MDHistoDimensionBuilder> &DimVectorOut);
122 void parseMetadata(
const std::string &fileName);
125 void buildMDDimsBase(std::vector<Mantid::Geometry::MDHistoDimensionBuilder> &DimVector);
128 std::vector<Mantid::Geometry::MDHistoDimensionBuilder> &DimVector);
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Helper class for reporting progress from algorithms.
Templated class for the multi-dimensional event workspace.
Templated class holding data about a neutron detection event in N-dimensions (for example,...
Defines a wrapper around an open file.
std::ifstream m_fileStream
File stream containing binary file data.
std::string m_outputFile
OutputFilename param.
LoadSQWHelper::dataPositions m_dataPositions
Instance of helper type, which describes the positions of the data within binary Horace file.
std::vector< uint64_t > m_boxSizes
std::string m_fileName
the name of the file to work with
std::vector< size_t > m_nBins
number of bins in every non-integrated dimension
const std::string name() const override
Algorithm's name for identification.
Mantid::API::Progress * m_prog
Progress bar.
const std::string summary() const override
Summary of algorithms purpose.
int version() const override
Algorithm's version for identification.
const std::string category() const override
Algorithm's category for identification.
Helper class which provides the Collimation Length for SANS instruments.
std::vector< std::streamoff > component_headers_starts
std::streamoff min_max_start
std::streamoff n_dims_start
dataPositions()
Default Constructor.
std::streamoff data_start
std::streamoff sqw_header_start
std::streamoff npax_start
std::streamoff detectors_start
std::streamoff if_sqw_start
std::streamoff n_cell_pix_start
std::streamoff parse_sqw_detpar(std::ifstream &dataStream, std::streamoff start_location)
Block 3: Detpar: parse positions of the contributed detectors.
std::streamoff parse_component_header(std::ifstream &dataStream, std::streamoff start_location)
Block 2: Header: Parse header of single SPE file.
std::streamoff geom_start
void parse_sqw_main_header(std::ifstream &dataStream)
Block 1: Main_header: Parse SQW main data header.
void parse_data_locations(std::ifstream &dataStream, std::streamoff data_start, std::vector< size_t > &nBins, uint64_t &nDataPoints)
Block 4: Data: parse positions of the data fields.