Mantid
Loading...
Searching...
No Matches
LoadSpiceAscii.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 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
11#include "MantidDataHandling/DllConfig.h"
12
14
15namespace Mantid {
16namespace DataHandling {
17
20class MANTID_DATAHANDLING_DLL LoadSpiceAscii final : public API::Algorithm {
21public:
22 const std::string name() const override;
23 int version() const override;
24 const std::vector<std::string> seeAlso() const override { return {"LoadSpice2D", "LoadSpiceXML2DDet"}; }
25 const std::string category() const override;
26 const std::string summary() const override;
27
28private:
29 void init() override;
30 void exec() override;
31
32 bool validateLogNamesType(const std::vector<std::string> &floatlognames, const std::vector<std::string> &intlognames,
33 const std::vector<std::string> &strlognames);
34
36 void parseSPICEAscii(const std::string &filename, std::vector<std::vector<std::string>> &datalist,
37 std::vector<std::string> &titles, std::map<std::string, std::string> &runinfodict);
38
40 API::ITableWorkspace_sptr createDataWS(const std::vector<std::vector<std::string>> &datalist,
41 const std::vector<std::string> &titles);
42
44 API::MatrixWorkspace_sptr createRunInfoWS(std::map<std::string, std::string> runinfodict,
45 std::vector<std::string> &floatlognamelist,
46 std::vector<std::string> &intlognamelist,
47 std::vector<std::string> &strlognamelist, bool ignoreunlisted);
48
50 std::string processDateString(const std::string &rawdate, const std::string &dateformat);
51
53 std::string processTimeString(const std::string &rawtime, const std::string &timeformat);
54
56 void setupRunStartTime(const API::MatrixWorkspace_sptr &runinfows, const std::vector<std::string> &datetimeprop);
57
59 template <typename T> void addProperty(const API::MatrixWorkspace_sptr &ws, const std::string &pname, T pvalue);
60};
61
62} // namespace DataHandling
63} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
LoadSpiceAscii : TODO: DESCRIPTION.
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::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.