Mantid
Loading...
Searching...
No Matches
OffsetsWorkspace.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
12
13namespace Mantid {
14namespace DataObjects {
15
23class MANTID_DATAOBJECTS_DLL OffsetsWorkspace : public SpecialWorkspace2D {
24public:
25 OffsetsWorkspace() = default;
27
29 std::unique_ptr<OffsetsWorkspace> clone() const { return std::unique_ptr<OffsetsWorkspace>(doClone()); }
31 std::unique_ptr<OffsetsWorkspace> cloneEmpty() const { return std::unique_ptr<OffsetsWorkspace>(doCloneEmpty()); }
35 const std::string id() const override { return "OffsetsWorkspace"; }
36
37protected:
40
41private:
42 OffsetsWorkspace *doClone() const override { return new OffsetsWorkspace(*this); }
43 OffsetsWorkspace *doCloneEmpty() const override { return new OffsetsWorkspace(); }
44};
45
47using OffsetsWorkspace_sptr = std::shared_ptr<OffsetsWorkspace>;
48
50using OffsetsWorkspace_const_sptr = std::shared_ptr<const OffsetsWorkspace>;
51
52} // namespace DataObjects
53} // namespace Mantid
An OffsetsWorkspace is a specialized Workspace2D where the Y value at each pixel is the offset to be ...
std::unique_ptr< OffsetsWorkspace > cloneEmpty() const
Returns a default-initialized clone of the workspace.
OffsetsWorkspace * doCloneEmpty() const override
Virtual cloneEmpty method.
OffsetsWorkspace & operator=(const OffsetsWorkspace &)=delete
std::unique_ptr< OffsetsWorkspace > clone() const
Returns a clone of the workspace.
OffsetsWorkspace * doClone() const override
Virtual clone method. Not implemented to force implementation in children.
const std::string id() const override
Gets the name of the workspace type.
OffsetsWorkspace(const OffsetsWorkspace &)=default
Protected copy constructor. May be used by childs for cloning.
std::shared_ptr< const OffsetsWorkspace > OffsetsWorkspace_const_sptr
shared pointer to a const OffsetsWorkspace
std::shared_ptr< OffsetsWorkspace > OffsetsWorkspace_sptr
shared pointer to the OffsetsWorkspace class
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
Helper class which provides the Collimation Length for SANS instruments.