8#include "MantidTypes/Core/DateAndTime.h"
9#include <boost/python/class.hpp>
10#include <boost/python/copy_const_reference.hpp>
11#include <boost/python/list.hpp>
12#include <boost/python/register_ptr_to_python.hpp>
13#include <boost/python/tuple.hpp>
16using Mantid::Types::Core::DateAndTime;
20 boost::python::list times;
22 times.append(make_tuple(splitter.start(), splitter.stop()));
28 register_ptr_to_python<TimeROI *>();
30 class_<TimeROI>(
"TimeROI", no_init)
32 "Duration of the whole TimeROI")
33 .def(
"durationInSeconds",
35 (arg(
"self"), arg(
"startTime"), arg(
"stopTime")),
"Duration of the TimeROI between startTime and stopTime")
37 return_value_policy<copy_const_reference>(),
38 "Updates the TimeROI values with the union with another TimeROI."
39 "See https://en.wikipedia.org/wiki/Union_(set_theory) for more details")
41 return_value_policy<copy_const_reference>(),
42 "Updates the TimeROI values with the intersection with another TimeROI."
43 "See https://en.wikipedia.org/wiki/Intersection for more details")
48 "First time in the object. Will generate an execption if useAll() is True.")
49 .def(
"lastTime", &
TimeROI::lastTime,
"Last time in the object. Will generate an execption if useAll() is True.")
51 "Returns a list of start and stop times for all time intervals");
boost::python::list getTimeIntervals(const TimeROI &self)
TimeROI : Object that holds information about when the time measurement was active.
double durationInSeconds() const
Duration of the whole TimeROI.
const std::vector< Kernel::TimeInterval > toTimeIntervals() const
This method is to lend itself to helping with transition.
Types::Core::DateAndTime firstTime() const
std::size_t numberOfRegions() const
void update_union(const TimeROI &other)
Updates the TimeROI values with the union with another TimeROI.
bool useNone() const
TimeROI selects no time to be used as all is invalid.
bool useAll() const
TimeROI selects all time to be used.
void update_intersection(const TimeROI &other)
Updates the TimeROI values with the intersection with another TimeROI.
Types::Core::DateAndTime lastTime() const