Mantid
Loading...
Searching...
No Matches
CopyInstrumentParameters.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//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
14#include "MantidAlgorithms/DllConfig.h"
16
17#include <climits>
18
19namespace Mantid {
20namespace Algorithms {
43class MANTID_ALGORITHMS_DLL CopyInstrumentParameters final : public API::Algorithm {
44public:
46 const std::string name() const override { return "CopyInstrumentParameters"; }
48 const std::string summary() const override {
49 return "Transfers an instrument from on workspace to another workspace "
50 "with same base instrument.";
51 }
52
54 int version() const override { return (1); }
55 const std::vector<std::string> seeAlso() const override { return {"ClearInstrumentParameters"}; }
57 const std::string category() const override { return "DataHandling\\Instrument"; } // Needs to change
60 bool isInstrumentDifferent() const { return m_different_instrument_sp; }
61
62protected:
63 Parallel::ExecutionMode
64 getParallelExecutionMode(const std::map<std::string, Parallel::StorageMode> &storageModes) const override;
65
66private:
68 void init() override;
70 void exec() override;
71
72 void checkProperties();
73
80 bool m_different_instrument_sp = false;
81};
82
83} // namespace Algorithms
84} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Transfers an instrument from one workspace to another workspace with the same base instrument.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
const std::string name() const override
Algorithm's name.
bool isInstrumentDifferent() const
method indicates that base source instrument is the same or different from base target instrument (ma...
API::MatrixWorkspace_sptr m_givingWorkspace
The giving workspace.
int version() const override
Algorithm's version.
const std::string summary() const override
Summary of algorithms purpose.
API::MatrixWorkspace_sptr m_receivingWorkspace
The receiving workspace.
const std::string category() const override
Algorithm's category for identification.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.