Mantid
Loading...
Searching...
No Matches
ConjoinWorkspaces.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2008 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//----------------------------------------------------------------------
14
15// Forward declarations
16namespace Mantid {
17namespace DataObjects {
18class EventWorkspace;
19}
20} // namespace Mantid
21
22namespace Mantid {
23namespace Algorithms {
45class MANTID_ALGORITHMS_DLL ConjoinWorkspaces : public WorkspaceJoiners {
46public:
48 const std::string name() const override { return "ConjoinWorkspaces"; }
50 int version() const override { return 1; }
51 const std::vector<std::string> seeAlso() const override { return {"ConjoinSpectra", "ConjoinXRuns", "MergeRuns"}; }
52
53private:
54 // Overridden Algorithm methods
55 void init() override;
56 void exec() override;
57
58 void checkForOverlap(const API::MatrixWorkspace &ws1, const API::MatrixWorkspace &ws2, bool checkSpectra) const;
61 API::MatrixWorkspace_sptr conjoinHistograms(const API::MatrixWorkspace &ws1, const API::MatrixWorkspace &ws2);
62 void fixSpectrumNumbers(const API::MatrixWorkspace &ws1, const API::MatrixWorkspace &ws2,
63 API::MatrixWorkspace &output) override;
64 bool processGroups() override;
65 void setYUnitAndLabel(API::MatrixWorkspace &ws) const;
66
68 bool m_overlapChecked = false;
69};
70
71} // namespace Algorithms
72} // namespace Mantid
Base MatrixWorkspace Abstract Class.
Joins two partial, non-overlapping workspaces into one.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
int version() const override
Algorithm's version for identification overriding a virtual method.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
A base class to hold code common to two algorithms that bolt two workspaces together spectra-wise - C...
This class is intended to fulfill the design specified in <https://github.com/mantidproject/documents...
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.