Mantid
Loading...
Searching...
No Matches
LogFilterGenerator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 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#include "MantidAPI/DllConfig.h"
11#include "MantidAPI/Run.h"
14#include <memory>
15
16namespace Mantid {
17namespace API {
18
24class MANTID_API_DLL LogFilterGenerator {
25public:
27 enum class FilterType { None, Status, Period, StatusAndPeriod };
28
30 LogFilterGenerator(const FilterType filterType, const Mantid::API::MatrixWorkspace_const_sptr &workspace);
31
33 LogFilterGenerator(const FilterType filterType, const Mantid::API::Run &run);
34
36 std::unique_ptr<Mantid::Kernel::LogFilter> generateFilter(const std::string &logName) const;
37
38private:
40 void filterByStatus(Mantid::Kernel::LogFilter *filter) const;
42 void filterByPeriod(Mantid::Kernel::LogFilter *filter) const;
44 Mantid::Kernel::Property *getLogData(const std::string &logName, bool warnIfNotFound = true) const;
49};
50
51} // namespace API
52} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
LogFilterGenerator : utility to generate a LogFilter, to filter by running status or period.
FilterType
Types of filter that can be used.
const FilterType m_filterType
Type of filter.
const Mantid::API::Run m_run
Run object containing logs.
This class stores information regarding an experimental run as a series of log entries.
Definition: Run.h:38
This class is for filtering TimeSeriesProperty data.
Definition: LogFilter.h:29
Base class for properties.
Definition: Property.h:94
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
Helper class which provides the Collimation Length for SANS instruments.