Mantid
Loading...
Searching...
No Matches
SplittersWorkspace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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
13#ifdef _MSC_VER
14#pragma warning(disable : 4250) // Disable warning regarding inheritance via dominance
15#endif
16
17namespace Mantid {
18namespace DataObjects {
19
30class MANTID_DATAOBJECTS_DLL SplittersWorkspace : public DataObjects::TableWorkspace, public API::ISplittersWorkspace {
31public:
33
35 std::unique_ptr<SplittersWorkspace> clone() const { return std::unique_ptr<SplittersWorkspace>(doClone()); }
36
38 std::unique_ptr<SplittersWorkspace> cloneEmpty() const { return std::unique_ptr<SplittersWorkspace>(doCloneEmpty()); }
39
41 void addSplitter(const Kernel::SplittingInterval &splitter) override;
42
43 Kernel::SplittingInterval getSplitter(size_t index) override;
44
45 size_t getNumberSplitters() const override;
46
47 bool removeSplitter(size_t) override;
48
49protected:
52
53private:
54 SplittersWorkspace *doClone() const override { return new SplittersWorkspace(*this); }
55 SplittersWorkspace *doCloneEmpty() const override { return new SplittersWorkspace(); }
56};
57
58using SplittersWorkspace_sptr = std::shared_ptr<SplittersWorkspace>;
59using SplittersWorkspace_const_sptr = std::shared_ptr<const SplittersWorkspace>;
60
61} // namespace DataObjects
62} // namespace Mantid
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
ISplittersWorkspace : Workspace to contain splitters for event filtering.
SplittersWorkspace : A TableWorkspace to contain TimeSplitters.
std::unique_ptr< SplittersWorkspace > cloneEmpty() const
Returns a default-initialized clone of the workspace.
std::unique_ptr< SplittersWorkspace > clone() const
Returns a clone of the workspace.
SplittersWorkspace(const SplittersWorkspace &)=default
Protected copy constructor. May be used by childs for cloning.
SplittersWorkspace * doClone() const override
SplittersWorkspace * doCloneEmpty() const override
Virtual cloneEmpty method.
SplittersWorkspace & operator=(const SplittersWorkspace &other)=delete
TableWorkspace is an implementation of Workspace in which the data are organised in columns of same s...
Class holding a start/end time and a destination for splitting event lists and logs.
Definition: TimeSplitter.h:23
std::shared_ptr< SplittersWorkspace > SplittersWorkspace_sptr
std::shared_ptr< const SplittersWorkspace > SplittersWorkspace_const_sptr
Helper class which provides the Collimation Length for SANS instruments.