Mantid
|
This class is for filtering TimeSeriesProperty data. More...
#include <LogFilter.h>
Public Member Functions | |
void | addFilter (const TimeSeriesProperty< bool > &filter) |
Adds a filter using boolean AND. More... | |
void | clear () |
Clears filters. More... | |
TimeSeriesProperty< double > * | data () const |
Returns reference to the filtered property. More... | |
const TimeSeriesProperty< bool > * | filter () const |
Returns a reference to the filter. More... | |
LogFilter ()=delete | |
Disable default constructor. More... | |
LogFilter (const LogFilter &)=delete | |
Disable copy and assignment operator. More... | |
LogFilter (const Property *prop) | |
Constructor taking any property type. More... | |
LogFilter (const TimeSeriesProperty< bool > &filter) | |
Constructor taking a filter. More... | |
LogFilter (const TimeSeriesProperty< double > *timeSeries) | |
Constructor from a TimeSeriesProperty<double> object to avoid overhead of casts. More... | |
LogFilter & | operator= (const LogFilter &)=delete |
Private Member Functions | |
TimeSeriesProperty< double > * | convertToTimeSeriesOfDouble (const Property *prop) |
Converts the given property to a TimeSeriesProperty<double>, throws if invalid. More... | |
Private Attributes | |
std::unique_ptr< TimeSeriesProperty< bool > > | m_filter |
Owned pointer to the filter mask. More... | |
std::unique_ptr< TimeSeriesProperty< double > > | m_prop |
Owned pointer to the filtered property. More... | |
This class is for filtering TimeSeriesProperty data.
Definition at line 29 of file LogFilter.h.
|
delete |
Disable default constructor.
|
delete |
Disable copy and assignment operator.
Mantid::Kernel::LogFilter::LogFilter | ( | const TimeSeriesProperty< bool > & | filter | ) |
Constructor taking a filter.
Constructor taking a reference to a filter.
Allows filters to be combined without being applied to a property
Note that constructing a LogFilter this way only allows filters to be combined. They will not affect a property
filter | :: A reference to a TimeSeriesProperty<bool> that will act as a filter |
Definition at line 18 of file LogFilter.cpp.
References addFilter(), and filter().
Mantid::Kernel::LogFilter::LogFilter | ( | const Property * | prop | ) |
Constructor taking any property type.
Constructor.
prop | :: Pointer to property to be filtered. Its actual type must be TimeSeriesProperty<double> |
Definition at line 25 of file LogFilter.cpp.
References convertToTimeSeriesOfDouble(), and m_prop.
Mantid::Kernel::LogFilter::LogFilter | ( | const TimeSeriesProperty< double > * | timeSeries | ) |
Constructor from a TimeSeriesProperty<double> object to avoid overhead of casts.
/ Constructor from a TimeSeriesProperty<double> object to avoid overhead of casts
Definition at line 31 of file LogFilter.cpp.
References Mantid::Kernel::TimeSeriesProperty< TYPE >::clone(), and m_prop.
void Mantid::Kernel::LogFilter::addFilter | ( | const TimeSeriesProperty< bool > & | filter | ) |
Adds a filter using boolean AND.
Filter using a TimeSeriesProperty<bool>.
True values mark the allowed time intervals. The object is cloned
filter | :: Filtering mask |
Definition at line 41 of file LogFilter.cpp.
References Mantid::Kernel::TimeInterval::begin(), Mantid::Kernel::TimeSeriesProperty< TYPE >::clone(), Mantid::Kernel::TimeInterval::end(), filter(), Mantid::Kernel::TimeInterval::intersection(), Mantid::Kernel::TimeInterval::isValid(), m_filter, m_prop, and Mantid::Kernel::TimeSeriesProperty< TYPE >::size().
Referenced by export_LogFilter(), Mantid::API::LogFilterGenerator::filterByPeriod(), Mantid::API::LogFilterGenerator::filterByStatus(), and LogFilter().
void Mantid::Kernel::LogFilter::clear | ( | ) |
|
private |
Converts the given property to a TimeSeriesProperty<double>, throws if invalid.
prop | :: A pointer to a property |
Definition at line 156 of file LogFilter.cpp.
References Mantid::Kernel::Property::name().
Referenced by LogFilter().
|
inline |
Returns reference to the filtered property.
Definition at line 50 of file LogFilter.h.
Referenced by export_LogFilter(), and Mantid::API::LogFilterGenerator::filterByStatus().
|
inline |
Returns a reference to the filter.
Definition at line 52 of file LogFilter.h.
Referenced by addFilter(), and LogFilter().
|
private |
Owned pointer to the filter mask.
Definition at line 64 of file LogFilter.h.
Referenced by addFilter(), and clear().
|
private |
Owned pointer to the filtered property.
Definition at line 62 of file LogFilter.h.
Referenced by addFilter(), clear(), and LogFilter().