16Kernel::Logger
g_log(
"ISISRunLogs");
19using Kernel::LogFilter;
20using Kernel::LogParser;
21using Kernel::TimeSeriesProperty;
30 for (
const auto icpLogName : {
"icp_event",
"icpevent"}) {
35 }
catch (std::runtime_error &) {
55 auto periodLog =
m_logParser->createPeriodLog(period);
61 }
catch (
const std::runtime_error &) {
74 std::unique_ptr<LogFilter> logFilter{
nullptr};
77 logFilter = std::make_unique<LogFilter>(*runningLog);
78 }
catch (std::exception &) {
79 g_log.
warning(
"Cannot find status log. Logs will be not be filtered by run status");
83 bool multiperiod =
false;
87 }
catch (
const std::exception &) {
88 g_log.
warning(
"Cannot find period log. Logs will be not be filtered by "
95 multiperiod = (periodsLog->getStatistics().maximum > 1.);
96 }
catch (
const std::exception &) {
97 g_log.
warning(
"Cannot find periods log. Logs will be not be filtered by "
104 logFilter->addFilter(*currentPeriodLog);
105 maskProp = logFilter->filter();
107 maskProp = currentPeriodLog;
108 }
else if (logFilter) {
109 maskProp = logFilter->filter();
127 std::vector<std::string> retVal;
135 for (
const auto prop : props) {
137 if (prop->name().rfind(
"period", 0) == 0) {
139 if (std::find(retVal.cbegin(), retVal.cend(), prop->name()) == retVal.cend()) {
140 retVal.emplace_back(prop->name());
void addLogData(Kernel::Property *p)
Add a log entry.
bool hasProperty(const std::string &name) const
Does the property exist on the object.
void filterByLog(const Kernel::TimeSeriesProperty< bool > &filter, const std::vector< std::string > &excludedFromFiltering=std::vector< std::string >())
Filter the run by the given boolean log.
int getPropertyAsIntegerValue(const std::string &name) const
Returns a property as an integer value.
Kernel::Property * getLogData(const std::string &name) const
Access a single log entry.
const std::vector< Kernel::Property * > & getProperties() const
Return all of the current properties.
void addProperty(Kernel::Property *prop, bool overwrite=false)
Add data to the object in the form of a property.
Kernel::TimeSeriesProperty< T > * getTimeSeriesProperty(const std::string &name) const
Returns a property as a time series property.
This class stores information regarding an experimental run as a series of log entries.
void addPeriodLog(const int period, API::Run &exptRun)
Add 'period i' log.
ISISRunLogs(const API::Run &icpRun)
Construct this object using a run that has the required ICP event log and the number of periods.
std::unique_ptr< Kernel::LogParser > m_logParser
A LogParser object.
void addStatusLog(API::Run &exptRun)
Adds the status log to the this run.
void addPeriodLogs(const int period, API::Run &exptRun)
Adds period related logs.
static std::vector< std::string > getLogNamesExcludedFromFiltering(const API::Run &run)
gets the list of log names that should not be filtered
static void applyLogFiltering(Mantid::API::Run &exptRun)
applies log filtering for a run
static const std::string statusLogName()
Returns the name of the log created that defines the status during a run.
static const std::string currentPeriodLogName()
Returns the name of the log that contains the current period number.
static const std::string periodsLogName()
Returns the name of the log that contains all of the periods.
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.
Kernel::Logger g_log("ExperimentInfo")
static logger object