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

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.
 
void clear ()
 Clears filters.
 
FilteredTimeSeriesProperty< double > * data () const
 Returns reference to the filtered property.
 
const TimeSeriesProperty< bool > * filter () const
 Returns a reference to the filter.
 
 LogFilter ()=delete
 Disable default constructor.
 
 LogFilter (const LogFilter &)=delete
 Disable copy and assignment operator.
 
 LogFilter (const Property *prop)
 Constructor taking any property type.
 
 LogFilter (const TimeSeriesProperty< bool > &filter)
 Constructor taking a filter.
 
 LogFilter (const TimeSeriesProperty< double > *timeSeries)
 Constructor from a TimeSeriesProperty<double> object to avoid overhead of casts.
 
LogFilteroperator= (const LogFilter &)=delete
 

Private Member Functions

FilteredTimeSeriesProperty< double > * convertToTimeSeriesOfDouble (const Property *prop)
 Converts the given property to a TimeSeriesProperty<double>, throws if invalid.
 
void setFilter (const TimeROI &roi, const bool filterOpenEnded)
 

Private Attributes

std::unique_ptr< TimeSeriesProperty< bool > > m_filter
 Owned pointer to the filter mask.
 
std::unique_ptr< FilteredTimeSeriesProperty< double > > m_prop
 Owned pointer to the filtered property.
 

Detailed Description

This class is for filtering TimeSeriesProperty data.

Definition at line 32 of file LogFilter.h.

Constructor & Destructor Documentation

◆ LogFilter() [1/5]

Mantid::Kernel::LogFilter::LogFilter ( )
delete

Disable default constructor.

◆ LogFilter() [2/5]

Mantid::Kernel::LogFilter::LogFilter ( const LogFilter )
delete

Disable copy and assignment operator.

◆ LogFilter() [3/5]

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

Parameters
filter:: A reference to a TimeSeriesProperty<bool> that will act as a filter

Definition at line 26 of file LogFilter.cpp.

References addFilter(), and filter().

◆ LogFilter() [4/5]

Mantid::Kernel::LogFilter::LogFilter ( const Property prop)

Constructor taking any property type.

Constructor.

Parameters
prop:: Pointer to property to be filtered. Its actual type must be TimeSeriesProperty<double>

Definition at line 36 of file LogFilter.cpp.

References convertToTimeSeriesOfDouble(), and m_prop.

◆ LogFilter() [5/5]

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 44 of file LogFilter.cpp.

References convertToTimeSeriesOfDouble(), and m_prop.

Member Function Documentation

◆ addFilter()

void Mantid::Kernel::LogFilter::addFilter ( const TimeSeriesProperty< bool > &  filter)

◆ clear()

void Mantid::Kernel::LogFilter::clear ( )

Clears filters.

Definition at line 157 of file LogFilter.cpp.

References m_filter, and m_prop.

◆ convertToTimeSeriesOfDouble()

FilteredTimeSeriesProperty< double > * Mantid::Kernel::LogFilter::convertToTimeSeriesOfDouble ( const Property prop)
private

Converts the given property to a TimeSeriesProperty<double>, throws if invalid.

Parameters
prop:: A pointer to a property
Returns
A new TimeSeriesProperty<double> object converted from the input. Throws std::invalid_argument if not possible

Definition at line 189 of file LogFilter.cpp.

References Mantid::Kernel::Property::name().

Referenced by LogFilter(), and LogFilter().

◆ data()

FilteredTimeSeriesProperty< double > * Mantid::Kernel::LogFilter::data ( ) const
inline

Returns reference to the filtered property.

Definition at line 53 of file LogFilter.h.

Referenced by export_LogFilter().

◆ filter()

const TimeSeriesProperty< bool > * Mantid::Kernel::LogFilter::filter ( ) const
inline

Returns a reference to the filter.

Definition at line 55 of file LogFilter.h.

Referenced by addFilter(), Mantid::Kernel::PropertyManager::filterByProperty(), and LogFilter().

◆ operator=()

LogFilter & Mantid::Kernel::LogFilter::operator= ( const LogFilter )
delete

◆ setFilter()

void Mantid::Kernel::LogFilter::setFilter ( const TimeROI roi,
const bool  filterOpenEnded 
)
private

Definition at line 202 of file LogFilter.cpp.

References m_filter, and Mantid::Kernel::TimeROI::toTimeIntervals().

Referenced by addFilter().

Member Data Documentation

◆ m_filter

std::unique_ptr<TimeSeriesProperty<bool> > Mantid::Kernel::LogFilter::m_filter
private

Owned pointer to the filter mask.

Definition at line 68 of file LogFilter.h.

Referenced by addFilter(), clear(), and setFilter().

◆ m_prop

std::unique_ptr<FilteredTimeSeriesProperty<double> > Mantid::Kernel::LogFilter::m_prop
private

Owned pointer to the filtered property.

Definition at line 66 of file LogFilter.h.

Referenced by addFilter(), clear(), LogFilter(), and LogFilter().


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