30 : m_filterType(filterType), m_run(
workspace->run()) {}
38 : m_filterType(filterType), m_run(run) {}
48 throw std::invalid_argument(
"Workspace does not contain log " + logName);
53 auto flt = std::make_unique<LogFilter>(logData);
90 const auto &firstTime = time_value_map.begin()->first;
93 if (status->firstTime() > firstTime) {
97 atStart.
addValue(status->firstTime(), status->firstValue());
110 for (
const auto &log : logs) {
111 if (log->name().find(
"period ") == 0) {
120 }
catch (
const std::runtime_error &err) {
121 g_log.
warning() <<
"Could not filter by period: " << err.what();
140 }
catch (
const std::runtime_error &) {
142 g_log.
warning(
"Could not find log value " + logName +
" in workspace");
IPeaksWorkspace_sptr workspace
FilterType
Types of filter that can be used.
std::unique_ptr< Mantid::Kernel::LogFilter > generateFilter(const std::string &logName) const
Generate log filter from given workspace and log name.
void filterByPeriod(Mantid::Kernel::LogFilter *filter) const
Filter log by period.
void filterByStatus(Mantid::Kernel::LogFilter *filter) const
Filter log by "running" status.
LogFilterGenerator(const FilterType filterType, const Mantid::API::MatrixWorkspace_const_sptr &workspace)
Constructor taking workspace.
Mantid::Kernel::Property * getLogData(const std::string &logName, bool warnIfNotFound=true) const
Get log data from workspace.
const FilterType m_filterType
Type of filter.
const Mantid::API::Run m_run
Run object containing logs.
Kernel::Property * getLogData(const std::string &name) const
Access a single log entry.
This class stores information regarding an experimental run as a series of log entries.
This class is for filtering TimeSeriesProperty data.
void addFilter(const TimeSeriesProperty< bool > &filter)
Adds a filter using boolean AND.
TimeSeriesProperty< double > * data() const
Returns reference to the filtered property.
The Logger class is in charge of the publishing messages from the framework through various channels.
void warning(const std::string &msg)
Logs at warning level.
Base class for properties.
A specialised Property class for holding a series of time-value pairs.
void addValue(const Types::Core::DateAndTime &time, const TYPE &value)
Add a value to the map using a DateAndTime object.
std::map< Types::Core::DateAndTime, TYPE > valueAsCorrectMap() const
Return the time series as a correct C++ map<DateAndTime, TYPE>.
Kernel::Logger g_log("ExperimentInfo")
static logger object
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)