16#include "MantidDataHandling/DllConfig.h"
19namespace DataHandling {
49 const std::string
name()
const override {
return "SaveAscii"; }
51 const std::string
summary()
const override {
return "Saves a 2D workspace to a ascii file."; }
53 int version()
const override {
return 2; }
54 const std::vector<std::string>
seeAlso()
const override {
55 return {
"LoadAscii",
"SaveCSV",
"SaveDiffFittingAscii",
"SaveReflectometryAscii",
56 "SaveOpenGenieAscii",
"SaveGSS",
"SaveFocusedXYE"};
59 const std::string
category()
const override {
return "DataHandling\\Text"; }
67 bool writeHeader,
int prec,
bool scientific,
const std::string &comment);
69 void writeSpectrum(
const int &wsIndex, std::ofstream &file);
70 std::vector<std::string> stringListToVector(std::string &inputString);
71 void populateQMetaData();
72 void populateSpectrumNumberMetaData();
73 void populateAngleMetaData();
74 void populateAllMetaData();
75 bool findElementInUnorderedStringVector(
const std::vector<std::string> &vector,
const std::string &toFind);
77 std::pair<std::string, std::string> sampleLogValueUnit(
const std::string &logName);
79 void writeFileHeader(
const std::vector<std::string> &logList, std::ofstream &file);
80 std::string createSpectrumFilename(
size_t workspaceIndex);
95 const std::vector<std::string> m_asciiExts = {
".dat",
".txt",
".csv"};
std::map< DeltaEMode::Type, std::string > index
Base class from which all concrete algorithm classes should be derived.
Class to represent the axis of a workspace.
double getValue(const std::size_t &index, const std::size_t &verticalIndex=0) const
Gets the value at the specified index.
Saves a workspace or selected spectra in a coma-separated ascii file.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
API::MatrixWorkspace_const_sptr m_ws
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::map< std::string, std::vector< std::string > > m_metaDataMap
bool m_writeSpectrumAxisValue
std::vector< std::string > m_metaData
int version() const override
Algorithm's version for identification overriding a virtual method.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
std::map< std::string, std::string > m_separatorIndex
Map the separator options to their string equivalents.
std::unique_ptr< AxisHelper::AxisProxy > m_axisProxy
const std::string summary() const override
Summary of algorithms purpose.
std::shared_ptr< const ITableWorkspace > ITableWorkspace_const_sptr
shared pointer to Mantid::API::ITableWorkspace (const version)
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
Helper class which provides the Collimation Length for SANS instruments.
virtual ~AxisProxy()=default
AxisProxy(Mantid::API::Axis *ax)
virtual double getCentre(const int index)
double getCentre(const int index) override