Mantid
Loading...
Searching...
No Matches
SaveDiffFittingAscii.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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"
15#include "MantidDataHandling/DllConfig.h"
16
17namespace Mantid {
18namespace DataHandling {
19
20class MANTID_DATAHANDLING_DLL SaveDiffFittingAscii : public Mantid::API::Algorithm, public API::DeprecatedAlgorithm {
21public:
24
26 const std::string name() const override { return "SaveDiffFittingAscii"; }
27
29 const std::string summary() const override {
30 return "Saves the results to ASCII file after carrying out single peak "
31 "fitting process "
32 "or running "
33 "EnggFitPeaks algorithm.";
34 }
35
37 int version() const override { return (1); }
38 const std::vector<std::string> seeAlso() const override { return {"EnggFitPeaks", "SaveAscii"}; }
39
41 const std::string category() const override { return "DataHandling\\Text"; }
42
43private:
45 void init() override;
46
48 void exec() override;
49
52 bool processGroups() override;
53
55 std::map<std::string, std::string> validateInputs() override;
56
58 void processAll(const std::vector<API::ITableWorkspace_sptr> &input_ws);
59
60 std::vector<std::string> splitList(std::string strList);
61
62 void writeInfo(const std::string &runNumber, const std::string &bank, std::ofstream &file);
63
64 void writeHeader(const std::vector<std::string> &columnHeadings, std::ofstream &file);
65
66 void writeData(const API::ITableWorkspace_sptr &workspace, std::ofstream &file, const size_t columnSize);
67
68 void writeVal(const std::string &val, std::ofstream &file, const bool endline);
69
71 const char m_sep;
72
75};
76} // namespace DataHandling
77} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Class for marking algorithms as deprecated.
int version() const override
Algorithm's version.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
const std::string summary() const override
Summary of algorithms purpose.
const std::string name() const override
Algorithm's name.
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
Helper class which provides the Collimation Length for SANS instruments.