Mantid
Loading...
Searching...
No Matches
SplittingInterval.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
10
11namespace Mantid {
12namespace Kernel {
13
14//-----------------------------------------------------------------------------
15// Forward declarations
16//-----------------------------------------------------------------------------
17class TimeROI;
18
28class MANTID_KERNEL_DLL SplittingInterval : public TimeInterval {
29public:
32
33 SplittingInterval(const Types::Core::DateAndTime &start, const Types::Core::DateAndTime &stop, const int index = 0);
34
35 int index() const;
36
41 std::string debugStrPrint() const;
42
43 bool operator==(const SplittingInterval &ti) const;
44
45private:
48};
49
55using SplittingIntervalVec = std::vector<SplittingInterval>;
56
57// -------------- Operators ---------------------
61MANTID_KERNEL_DLL SplittingIntervalVec operator~(const SplittingIntervalVec &a);
62
63// -------------- Helper Functions ---------------------
64// for every workspace index, create a TimeROI out of its associated spliting intervals
65MANTID_KERNEL_DLL std::map<int, TimeROI> timeROIsFromSplitters(const SplittingIntervalVec &splitters);
66
67} // Namespace Kernel
68} // Namespace Mantid
std::map< DeltaEMode::Type, std::string > index
Class holding a start/end time and a destination for splitting event lists and logs.
int m_index
Index of the destination.
Represents a time interval.
Definition DateAndTime.h:25
MANTID_KERNEL_DLL SplittingIntervalVec operator~(const SplittingIntervalVec &a)
NOT operator for SplittingIntervalVec Only works on Filters.
MANTID_KERNEL_DLL std::map< int, TimeROI > timeROIsFromSplitters(const SplittingIntervalVec &splitters)
For every workspace index, create a TimeROI out of its associated splitting intervals.
MANTID_KERNEL_DLL SplittingIntervalVec operator|(const SplittingIntervalVec &a, const SplittingIntervalVec &b)
OR operator for SplittingIntervalVec Only works on Filters, not splitters.
std::vector< SplittingInterval > SplittingIntervalVec
A typedef for splitting events according their pulse time.
Definition LogManager.h:28
MANTID_KERNEL_DLL SplittingIntervalVec operator&(const SplittingIntervalVec &a, const SplittingIntervalVec &b)
AND operator for SplittingIntervalVec Works on Filters - combines them to only keep times where both ...
MANTID_KERNEL_DLL SplittingIntervalVec operator+(const SplittingIntervalVec &a, const SplittingIntervalVec &b)
Plus operator for SplittingIntervalVec.
Helper class which provides the Collimation Length for SANS instruments.
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
std::common_type_t< wide_integer< Bits, Signed >, wide_integer< Bits2, Signed2 > > constexpr operator|(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
std::common_type_t< wide_integer< Bits, Signed >, wide_integer< Bits2, Signed2 > > constexpr operator&(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)