Mantid
Loading...
Searching...
No Matches
LogFilter.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidKernel/DllConfig.h"
13
14#include <memory>
15#include <vector>
16
17namespace Mantid {
18namespace Kernel {
19
20//----------------------------------------------------------------------
21// Forward declarations
22//----------------------------------------------------------------------
23class Property;
24template <class TYPE> class TimeSeriesProperty;
25
29class MANTID_KERNEL_DLL LogFilter {
30public:
32 LogFilter() = delete;
33
35 LogFilter(const LogFilter &) = delete;
36 LogFilter &operator=(const LogFilter &) = delete;
37
42 LogFilter(const Property *prop);
45 LogFilter(const TimeSeriesProperty<double> *timeSeries);
46
48 void addFilter(const TimeSeriesProperty<bool> &filter);
50 inline TimeSeriesProperty<double> *data() const { return m_prop.get(); }
52 inline const TimeSeriesProperty<bool> *filter() const { return m_filter.get(); }
54 void clear();
55
56private:
59 TimeSeriesProperty<double> *convertToTimeSeriesOfDouble(const Property *prop);
60
62 std::unique_ptr<TimeSeriesProperty<double>> m_prop;
64 std::unique_ptr<TimeSeriesProperty<bool>> m_filter;
65};
66
67} // namespace Kernel
68} // namespace Mantid
This class is for filtering TimeSeriesProperty data.
Definition: LogFilter.h:29
LogFilter & operator=(const LogFilter &)=delete
const TimeSeriesProperty< bool > * filter() const
Returns a reference to the filter.
Definition: LogFilter.h:52
LogFilter(const LogFilter &)=delete
Disable copy and assignment operator.
std::unique_ptr< TimeSeriesProperty< double > > m_prop
Owned pointer to the filtered property.
Definition: LogFilter.h:62
std::unique_ptr< TimeSeriesProperty< bool > > m_filter
Owned pointer to the filter mask.
Definition: LogFilter.h:64
TimeSeriesProperty< double > * data() const
Returns reference to the filtered property.
Definition: LogFilter.h:50
LogFilter()=delete
Disable default constructor.
Base class for properties.
Definition: Property.h:94
A specialised Property class for holding a series of time-value pairs.
Helper class which provides the Collimation Length for SANS instruments.