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

Inheritance diagram for Mantid::Kernel::SplittingInterval:
Mantid::Kernel::TimeInterval

Public Member Functions

std::string debugStrPrint () const
 
int index () const
 Return the index (destination of this split time block)
 
bool operator== (const SplittingInterval &ti) const
 
SplittingInterval operator| (const SplittingInterval &b) const
 Or operator. Return the largest time interval.
 
 SplittingInterval ()
 Default constructor.
 
 SplittingInterval (const Types::Core::DateAndTime &start, const Types::Core::DateAndTime &stop, const int index=0)
 Constructor using DateAndTime.
 
- Public Member Functions inherited from Mantid::Kernel::TimeInterval
std::string begin_str () const
 String representation of the begin time.
 
bool contains (const Types::Core::DateAndTime &t) const
 True if the interval contains t.
 
double duration () const
 in seconds
 
std::string end_str () const
 String representation of the end time.
 
TimeInterval intersection (const TimeInterval &ti) const
 Returns an intersection of two intervals.
 
bool isValid () const
 True if the interval is not empty.
 
Types::Core::time_duration length () const
 Interval length (in seconds?)
 
bool operator< (const TimeInterval &ti) const
 Returns true if this interval ends before ti starts.
 
bool operator== (const TimeInterval &ti) const
 
bool operator> (const TimeInterval &ti) const
 
bool overlaps (const TimeInterval &other) const
 Return true if the SplittingInterval overlaps with this one.
 
bool overlaps (const TimeInterval *other) const
 Return true if the SplittingInterval overlaps with this one.
 
const Types::Core::DateAndTime & start () const
 Beginning of the interval.
 
const Types::Core::DateAndTime & stop () const
 End of the interval.
 
 TimeInterval ()
 Default constructor.
 
 TimeInterval (const std::string &from, const std::string &to)
 
 TimeInterval (const Types::Core::DateAndTime &from, const Types::Core::DateAndTime &to)
 Constructor.
 

Private Attributes

int m_index
 Index of the destination.
 

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 28 of file SplittingInterval.h.

Constructor & Destructor Documentation

◆ SplittingInterval() [1/2]

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

Default constructor.

Definition at line 16 of file SplittingInterval.cpp.

Referenced by operator|().

◆ 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 19 of file SplittingInterval.cpp.

Member Function Documentation

◆ debugStrPrint()

std::string Mantid::Kernel::SplittingInterval::debugStrPrint ( ) const

◆ index()

int Mantid::Kernel::SplittingInterval::index ( ) const

Return the index (destination of this split time block)

Definition at line 24 of file SplittingInterval.cpp.

References m_index.

Referenced by Mantid::DataObjects::SplittersWorkspace::addSplitter(), debugStrPrint(), operator==(), operator|(), and Mantid::DataObjects::TimeSplitter::TimeSplitter().

◆ operator==()

bool Mantid::Kernel::SplittingInterval::operator== ( const SplittingInterval ti) const

Definition at line 50 of file SplittingInterval.cpp.

References index().

◆ operator|()

DOXYGEN_BUG SplittingInterval Mantid::Kernel::SplittingInterval::operator| ( const SplittingInterval b) const

Member Data Documentation

◆ m_index

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

Index of the destination.

Definition at line 47 of file SplittingInterval.h.

Referenced by index().


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