Mantid
Loading...
Searching...
No Matches
ISplittersWorkspace.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
9#include "MantidAPI/DllConfig.h"
11
12namespace Mantid {
13namespace API {
14
20class MANTID_API_DLL ISplittersWorkspace {
21public:
22 /*
23 * Constructor
24 */
27 /*
28 * Destructor
29 */
30 virtual ~ISplittersWorkspace() = default;
31
33 std::unique_ptr<ISplittersWorkspace> clone() const { return std::unique_ptr<ISplittersWorkspace>(doClone()); }
34
35 /*
36 * Add a time splitter to table workspace
37 */
38 virtual void addSplitter(const Kernel::SplittingInterval &splitter) = 0;
39
40 /*
41 * Get the corresponding workspace index of a time
42 * Input time must the total nanoseconds of the absolute time from 1990.00.00
43 */
45
46 /*
47 * Get number of splitters
48 */
49 virtual size_t getNumberSplitters() const = 0;
50
51 /*
52 * Remove one entry of a splitter
53 */
54 virtual bool removeSplitter(size_t splitterindex) = 0;
55
56protected:
59
60private:
61 virtual ISplittersWorkspace *doClone() const = 0;
62};
63
65using ISplittersWorkspace_sptr = std::shared_ptr<ISplittersWorkspace>;
67using ISplittersWorkspace_const_sptr = std::shared_ptr<const ISplittersWorkspace>;
68
69} // namespace API
70} // namespace Mantid
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
ISplittersWorkspace : Workspace to contain splitters for event filtering.
virtual ~ISplittersWorkspace()=default
ISplittersWorkspace(const ISplittersWorkspace &)=default
Protected copy constructor. May be used by childs for cloning.
virtual bool removeSplitter(size_t splitterindex)=0
virtual ISplittersWorkspace * doClone() const =0
virtual size_t getNumberSplitters() const =0
std::unique_ptr< ISplittersWorkspace > clone() const
Returns a clone of the workspace.
virtual void addSplitter(const Kernel::SplittingInterval &splitter)=0
ISplittersWorkspace & operator=(const ISplittersWorkspace &other)=delete
virtual Kernel::SplittingInterval getSplitter(size_t index)=0
Class holding a start/end time and a destination for splitting event lists and logs.
Definition: TimeSplitter.h:23
std::shared_ptr< ISplittersWorkspace > ISplittersWorkspace_sptr
Typedef for a shared pointer to TableWorkspace.
std::shared_ptr< const ISplittersWorkspace > ISplittersWorkspace_const_sptr
Typedef for a shared pointer to const TableWorkspace.
Helper class which provides the Collimation Length for SANS instruments.