Mantid
Loading...
Searching...
No Matches
SortXAxis.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
10#include "MantidAlgorithms/DllConfig.h"
11
12namespace Mantid {
13namespace Algorithms {
14
24class MANTID_ALGORITHMS_DLL SortXAxis final : public API::Algorithm {
25public:
26 const std::string name() const override;
27 int version() const override;
28 const std::string category() const override;
29 const std::string summary() const override;
30
31private:
32 void init() override;
33 void exec() override;
34 std::vector<std::size_t> createIndexes(const size_t);
35
36 void sortIndicesByX(std::vector<std::size_t> &workspaceIndices, const std::string &order,
37 const Mantid::API::MatrixWorkspace &inputWorkspace, unsigned int specNum);
38
39 void copyYandEToOutputWorkspace(std::vector<std::size_t> &workspaceIndices,
40 const Mantid::API::MatrixWorkspace &inputWorkspace,
41 Mantid::API::MatrixWorkspace &outputWorkspace, unsigned int SpecNum,
42 bool isAProperHistogram);
43
44 void copyXandDxToOutputWorkspace(const std::vector<std::size_t> &workspaceIndices,
45 const Mantid::API::MatrixWorkspace &inputWorkspace,
46 Mantid::API::MatrixWorkspace &outputWorkspace, unsigned int specNum);
47
48 void copyToOutputWorkspace(std::vector<std::size_t> &workspaceIndices,
49 const Mantid::API::MatrixWorkspace &inputWorkspace,
50 Mantid::API::MatrixWorkspace &outputWorkspace, unsigned int specNum,
51 bool isAProperHistogram);
52
53 bool determineIfHistogramIsValid(const Mantid::API::MatrixWorkspace &inputWorkspace);
54};
55
56} // namespace Algorithms
57} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Base MatrixWorkspace Abstract Class.
SortXAxis will take Histogram or Point data and reorder it based on the X Axis' values,...
Definition: SortXAxis.h:24
Helper class which provides the Collimation Length for SANS instruments.