13#include "MantidDataHandling/DllConfig.h"
25namespace DataHandling {
85 const std::string
name()
const override {
return "SaveCanSAS1D"; }
86 const std::string
summary()
const override {
return "Save a MatrixWorkspace to a file in the canSAS 1-D format"; }
87 int version()
const override {
return 1; }
88 const std::string
category()
const override {
return "DataHandling\\XML;SANS\\DataHandling"; }
94 void setOtherProperties(
API::IAlgorithm *alg,
const std::string &propertyName,
const std::string &propertyValue,
95 int perioidNum)
override;
101 void prepareFileToWriteEntry(
const std::string &fileName);
103 bool openForAppending(
const std::string &filename);
105 void findEndofLastEntry();
107 virtual void writeHeader(
const std::string &fileName);
110 void searchandreplaceSpecialChars(std::string &input);
113 void replacewithEntityReference(std::string &input,
const std::string::size_type &
index);
115 virtual void createSASRootElement(std::string &rootElem);
118 void createSASTitleElement(std::string &sasTitle);
121 void createSASSampleElement(std::string &sasSample);
124 void createSASRunElement(std::string &sasRun);
127 void createSASDataElement(std::string &sasData,
size_t workspaceIndex);
130 void createSASSourceElement(std::string &sasSource);
133 void createSASDetectorElement(std::string &sasDet);
136 void createSASProcessElement(std::string &sasProcess);
139 void createSASInstrument(std::string &sasInstrument);
std::map< DeltaEMode::Type, std::string > index
Base class from which all concrete algorithm classes should be derived.
IAlgorithm is the interface implemented by the Algorithm base class.
std::fstream m_outFile
an fstream object is used to write the xml manually as the user requires a specific format with new l...
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
const std::string summary() const override
function returns a summary message that will be displayed in the default GUI, and in the help.
virtual ~SaveCanSAS1D()=default
const std::string category() const override
function to return a category of the algorithm.
API::MatrixWorkspace_const_sptr m_workspace
points to the workspace that will be written to file
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
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.