Mantid
Loading...
Searching...
No Matches
SaveCanSAS1D2.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
13#include "MantidDataHandling/DllConfig.h"
14#include "SaveCanSAS1D.h"
15#include <fstream>
16
17namespace Poco {
18namespace XML {
19class Document;
20class Element;
21class Text;
22} // namespace XML
23} // namespace Poco
24
25namespace Mantid {
26namespace DataHandling {
64class MANTID_DATAHANDLING_DLL SaveCanSAS1D2 : public SaveCanSAS1D {
65public:
66 int version() const override { return 2; }
67 const std::vector<std::string> seeAlso() const override { return {"LoadCanSAS1D"}; }
68
69protected:
71 void init() override;
73 void exec() override;
74
76 void createSASRootElement(std::string &rootElem) override;
77
79 void createSASTransElement(std::string &sasTrans, const std::string &name);
80
82 void createSASProcessElement(std::string &sasProcess);
83
85 void writeHeader(const std::string &fileName) override;
86
89};
90} // namespace DataHandling
91} // namespace Mantid
This algorithm saves workspace into CanSAS1d format.
Definition: SaveCanSAS1D2.h:64
API::MatrixWorkspace_const_sptr m_trans_ws
points to the workspace that will be written to file
Definition: SaveCanSAS1D2.h:88
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition: SaveCanSAS1D2.h:67
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
Definition: SaveCanSAS1D2.h:66
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.
Definition: Algorithm.h:30