11#include "MantidDataHandling/DllConfig.h"
18namespace DataHandling {
40 const std::string
name()
const override {
return "LoadAscii"; }
42 const std::string
summary()
const override {
43 return "Loads data from a text file and stores it in a 2D workspace "
44 "or Table Workspace.";
48 int version()
const override {
return 2; }
49 const std::vector<std::string>
seeAlso()
const override {
return {
"SaveAscii"}; }
51 const std::string
category()
const override {
return "DataHandling\\Text"; }
61 bool skipLine(
const std::string &line,
bool header =
false)
const;
63 bool badLine(
const std::string &line)
const;
67 void inconsistantIDCheck()
const;
69 int splitIntoColumns(std::list<std::string> &columns,
const std::string &str)
const;
71 void fillInputValues(std::vector<double> &values,
const std::list<std::string> &columns)
const;
73 void addToCurrentSpectra(
const std::list<std::string> &columns);
76 void checkLineColumns(
const size_t &cols)
const;
78 void parseLine(
const std::string &line, std::list<std::string> &columns);
80 void setcolumns(std::ifstream &file, std::string &line, std::list<std::string> &columns);
84 void processHeader(std::ifstream &file);
86 bool setDistribution(std::ifstream &file);
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Loads a workspace from an ascii file.
const std::string summary() const override
Summary of algorithms purpose.
int version() const override
The version number.
std::string m_columnSep
The column separator.
std::unique_ptr< DataObjects::Histogram1D > m_curSpectra
std::map< std::string, std::string > m_separatorIndex
Map the separator options to their string equivalents.
std::vector< double > m_curDx
std::vector< DataObjects::Histogram1D > m_spectra
const std::string name() const override
The name of the algorithm.
const std::string category() const override
The category.
std::vector< double > m_spectrumAxis
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Defines a wrapper around an open file.
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.