Mantid
|
Class holding a start/end time and a destination for splitting event lists and logs. More...
#include <TimeSplitter.h>
Public Member Functions | |
double | duration () const |
Returns the duration in seconds. More... | |
int | index () const |
Return the index (destination of this split time block) More... | |
bool | operator< (const SplittingInterval &b) const |
Compare two splitter by the begin time. More... | |
bool | operator> (const SplittingInterval &b) const |
Compare two splitter by the begin time. More... | |
SplittingInterval | operator| (const SplittingInterval &b) const |
Or operator. Return the largest time interval. More... | |
bool | overlaps (const SplittingInterval &b) const |
Return true if the b SplittingInterval overlaps with this one. More... | |
SplittingInterval () | |
Default constructor. More... | |
SplittingInterval (const Types::Core::DateAndTime &start, const Types::Core::DateAndTime &stop, const int index=0) | |
Constructor using DateAndTime. More... | |
Types::Core::DateAndTime | start () const |
Return the start time. More... | |
Types::Core::DateAndTime | stop () const |
Return the stop time. More... | |
Private Attributes | |
int | m_index |
Index of the destination. More... | |
Types::Core::DateAndTime | m_start |
begin More... | |
Types::Core::DateAndTime | m_stop |
end More... | |
Class holding a start/end time and a destination for splitting event lists and logs.
The start/stop times are saved internally as DateAndTime, for fastest event list splitting.
Author: Janik Zikovsky, SNS
Definition at line 23 of file TimeSplitter.h.
Mantid::Kernel::SplittingInterval::SplittingInterval | ( | ) |
Default constructor.
Definition at line 15 of file TimeSplitter.cpp.
Mantid::Kernel::SplittingInterval::SplittingInterval | ( | const Types::Core::DateAndTime & | start, |
const Types::Core::DateAndTime & | stop, | ||
const int | index = 0 |
||
) |
Constructor using DateAndTime.
Definition at line 18 of file TimeSplitter.cpp.
double Mantid::Kernel::SplittingInterval::duration | ( | ) | const |
Returns the duration in seconds.
Definition at line 29 of file TimeSplitter.cpp.
int Mantid::Kernel::SplittingInterval::index | ( | ) | const |
Return the index (destination of this split time block)
Definition at line 32 of file TimeSplitter.cpp.
References m_index.
Referenced by Mantid::DataObjects::SplittersWorkspace::addSplitter(), and Mantid::Algorithms::FilterEvents::convertSplittersWorkspaceToVectors().
bool Mantid::Kernel::SplittingInterval::operator< | ( | const SplittingInterval & | b | ) | const |
Compare two splitter by the begin time.
Definition at line 71 of file TimeSplitter.cpp.
References m_start.
bool Mantid::Kernel::SplittingInterval::operator> | ( | const SplittingInterval & | b | ) | const |
Compare two splitter by the begin time.
Definition at line 74 of file TimeSplitter.cpp.
References m_start.
DOXYGEN_BUG SplittingInterval Mantid::Kernel::SplittingInterval::operator| | ( | const SplittingInterval & | b | ) | const |
Or operator. Return the largest time interval.
Definition at line 56 of file TimeSplitter.cpp.
References m_start, m_stop, and overlaps().
bool Mantid::Kernel::SplittingInterval::overlaps | ( | const SplittingInterval & | b | ) | const |
Return true if the b SplittingInterval overlaps with this one.
Definition at line 35 of file TimeSplitter.cpp.
References m_start, and m_stop.
Referenced by operator|().
DateAndTime Mantid::Kernel::SplittingInterval::start | ( | ) | const |
Return the start time.
Definition at line 23 of file TimeSplitter.cpp.
References m_start.
Referenced by Mantid::DataObjects::SplittersWorkspace::addSplitter(), Mantid::Kernel::compareSplittingInterval(), and Mantid::Algorithms::FilterEvents::convertSplittersWorkspaceToVectors().
DateAndTime Mantid::Kernel::SplittingInterval::stop | ( | ) | const |
Return the stop time.
Definition at line 26 of file TimeSplitter.cpp.
References m_stop.
Referenced by Mantid::DataObjects::SplittersWorkspace::addSplitter(), and Mantid::Algorithms::FilterEvents::convertSplittersWorkspaceToVectors().
|
private |
|
private |
begin
Definition at line 48 of file TimeSplitter.h.
Referenced by duration(), operator<(), operator>(), operator|(), overlaps(), and start().
|
private |
end
Definition at line 50 of file TimeSplitter.h.
Referenced by duration(), operator|(), overlaps(), and stop().