Mantid
Loading...
Searching...
No Matches
ExtractMaskToTable.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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 "MantidAlgorithms/DllConfig.h"
14
15namespace Mantid {
16namespace Algorithms {
17
21class MANTID_ALGORITHMS_DLL ExtractMaskToTable final : public API::Algorithm {
22public:
24 const std::string name() const override { return "ExtractMaskToTable"; }
26 const std::string summary() const override {
27 return "The output TableWorkspace should be compatible to "
28 "MaskBinsFromTable.";
29 }
30
32 int version() const override { return 1; }
33 const std::vector<std::string> seeAlso() const override { return {"ExtractMask"}; }
35 const std::string category() const override { return "Transforms\\Masking"; }
36
38 std::vector<detid_t> subtractVector(std::vector<detid_t> minuend, std::vector<detid_t> subtrahend);
39
40private:
42 void init() override;
44 void exec() override;
45
50
53 std::vector<detid_t> parseMaskTable(const DataObjects::TableWorkspace_sptr &masktablews);
54
57 std::vector<detid_t> parseStringToVector(const std::string &liststr);
58
60 std::vector<detid_t> extractMaskFromMatrixWorkspace();
61
63 std::vector<detid_t> extractMaskFromMaskWorkspace();
64
66 void copyTableWorkspaceContent(const DataObjects::TableWorkspace_sptr &sourceWS,
67 const DataObjects::TableWorkspace_sptr &targetWS);
68
70 void addToTableWorkspace(const DataObjects::TableWorkspace_sptr &outws, std::vector<detid_t> maskeddetids,
71 double xmin, double xmax, std::vector<detid_t> prevmaskedids);
72};
73
74} // namespace Algorithms
75} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
ExtractMaskToTable : Extract the mask in a workspace to a table workspace.
const std::string name() const override
Algorithm's name.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
DataObjects::TableWorkspace_sptr m_inputTableWS
Input table workspace.
const std::string category() const override
Algorithm's category for identification.
int version() const override
Algorithm's version.
API::MatrixWorkspace_const_sptr m_dataWS
Input matrix workspace.
const std::string summary() const override
Summary of algorithms purpose.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
Helper class which provides the Collimation Length for SANS instruments.