Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::SplittingInterval Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SplittingInterval() [1/2]

Mantid::Kernel::SplittingInterval::SplittingInterval ( )

Default constructor.

Definition at line 15 of file TimeSplitter.cpp.

◆ SplittingInterval() [2/2]

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.

Member Function Documentation

◆ duration()

double Mantid::Kernel::SplittingInterval::duration ( ) const

Returns the duration in seconds.

Definition at line 29 of file TimeSplitter.cpp.

References m_start, and m_stop.

◆ index()

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().

◆ operator<()

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.

◆ operator>()

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.

◆ operator|()

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().

◆ 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|().

◆ start()

DateAndTime Mantid::Kernel::SplittingInterval::start ( ) const

◆ stop()

DateAndTime Mantid::Kernel::SplittingInterval::stop ( ) const

Member Data Documentation

◆ m_index

int Mantid::Kernel::SplittingInterval::m_index
private

Index of the destination.

Definition at line 52 of file TimeSplitter.h.

Referenced by index().

◆ m_start

Types::Core::DateAndTime Mantid::Kernel::SplittingInterval::m_start
private

begin

Definition at line 48 of file TimeSplitter.h.

Referenced by duration(), operator<(), operator>(), operator|(), overlaps(), and start().

◆ m_stop

Types::Core::DateAndTime Mantid::Kernel::SplittingInterval::m_stop
private

end

Definition at line 50 of file TimeSplitter.h.

Referenced by duration(), operator|(), overlaps(), and stop().


The documentation for this class was generated from the following files: