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. 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...
 
LogFilteroperator= (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...
 

Detailed Description

This class is for filtering TimeSeriesProperty data.

Definition at line 29 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 18 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 25 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 31 of file LogFilter.cpp.

References Mantid::Kernel::TimeSeriesProperty< TYPE >::clone(), 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 114 of file LogFilter.cpp.

References m_filter, and m_prop.

◆ convertToTimeSeriesOfDouble()

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

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

Referenced by LogFilter().

◆ data()

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

Returns reference to the filtered property.

Definition at line 50 of file LogFilter.h.

Referenced by export_LogFilter(), and Mantid::API::LogFilterGenerator::filterByStatus().

◆ filter()

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

Returns a reference to the filter.

Definition at line 52 of file LogFilter.h.

Referenced by addFilter(), and LogFilter().

◆ operator=()

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

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 64 of file LogFilter.h.

Referenced by addFilter(), and clear().

◆ m_prop

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

Owned pointer to the filtered property.

Definition at line 62 of file LogFilter.h.

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


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