Mantid
Loading...
Searching...
No Matches
SavePAR.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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
10#include "MantidDataHandling/DllConfig.h"
11
12namespace Mantid {
13namespace DataHandling {
45class MANTID_DATAHANDLING_DLL SavePAR : public Mantid::API::Algorithm {
46public:
48 const std::string name() const override { return "SavePAR"; }
50 const std::string summary() const override {
51 return "Writes the detector geometry information of a workspace into a "
52 "Tobyfit PAR format file.";
53 }
54
56 int version() const override { return (1); }
57 const std::vector<std::string> seeAlso() const override { return {"SaveSPE"}; }
59 const std::string category() const override { return "DataHandling\\SPE;Inelastic\\DataHandling"; }
66 void set_resulting_workspace(const std::string &ws_name) { det_par_ws_name = ws_name; }
67
68 static void writePAR(const std::string &filename, const std::vector<double> &azimuthal,
69 const std::vector<double> &polar, const std::vector<double> &azimuthal_width,
70 const std::vector<double> &polar_width, const std::vector<double> &secondary_flightpath,
71 const std::vector<size_t> &det_ID, const size_t nDetectors);
72
73private:
75 void init() override;
77 void exec() override;
79 std::string det_par_ws_name;
80};
81} // namespace DataHandling
82} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Saves a workspace into an ASCII PAR file.
Definition SavePAR.h:45
std::string det_par_ws_name
The name of the table workpsace with detectors positions used in tests.
Definition SavePAR.h:79
int version() const override
Algorithm's version.
Definition SavePAR.h:56
void set_resulting_workspace(const std::string &ws_name)
the method used in tests.
Definition SavePAR.h:66
const std::string category() const override
Algorithm's category for identification.
Definition SavePAR.h:59
const std::string summary() const override
Summary of algorithms purpose.
Definition SavePAR.h:50
const std::string name() const override
Algorithm's name.
Definition SavePAR.h:48
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 SavePAR.h:57
Helper class which provides the Collimation Length for SANS instruments.