9#include "MantidAPI/DllConfig.h"
24template <
class KEYTYPE,
class VALUETYPE>
class Cache;
48 static std::string getInvalidValuesFilterLogName(
const std::string &logName);
59 void setStartAndEndTime(
const Types::Core::DateAndTime &start,
const Types::Core::DateAndTime &end);
61 const Types::Core::DateAndTime startTime()
const;
63 const Types::Core::DateAndTime endTime()
const;
65 const Types::Core::DateAndTime getFirstPulseTime()
const;
67 const Types::Core::DateAndTime getLastPulseTime()
const;
71 virtual void filterByTime(
const Types::Core::DateAndTime start,
const Types::Core::DateAndTime stop);
74 virtual void removeDataOutsideTimeROI();
84 const std::vector<std::string> &excludedFromFiltering = std::vector<std::string>());
87 virtual size_t getMemorySize()
const;
92 addProperty(std::unique_ptr<Kernel::Property>(prop), overwrite);
95 void addProperty(std::unique_ptr<Kernel::Property> prop,
bool overwrite =
false);
97 template <
class TYPE>
void addProperty(
const std::string &
name,
const TYPE &
value,
bool overwrite =
false);
100 void addProperty(
const std::string &
name,
const TYPE &
value,
const std::string &units,
bool overwrite =
false);
103 bool hasProperty(
const std::string &
name)
const;
105 void removeProperty(
const std::string &
name,
bool delProperty =
true);
106 const std::vector<Kernel::Property *> &getProperties()
const;
113 template <
typename HeldType> HeldType getPropertyValueAsType(
const std::string &
name)
const;
115 double getPropertyAsSingleValue(
const std::string &
name,
118 int getPropertyAsIntegerValue(
const std::string &
name)
const;
134 void addLogData(std::unique_ptr<Kernel::Property> p,
bool overwrite =
false) { addProperty(std::move(p), overwrite); }
146 const std::vector<Kernel::Property *> &
getLogData()
const {
return getProperties(); }
153 return removeProperty(
name, delproperty);
163 return getPropertyAsSingleValue(
name, statistic);
167 double getTimeAveragedStd(
const std::string &
name)
const;
169 double getTimeAveragedValue(
const std::string &
name)
const;
175 void clearTimeSeriesLogs();
177 void clearOutdatedTimeSeriesLogValues();
183 virtual void saveNexus(Nexus::File *file,
const std::string &
group,
bool keepOpen =
false)
const;
187 const std::string &prefix,
bool keepOpen =
false);
189 virtual void loadNexus(Nexus::File *file,
const std::string &
group,
bool keepOpen =
false);
194 void clearSingleValueCache();
197 bool hasInvalidValuesFilter(
const std::string &logName)
const;
209 bool hasStartTime()
const;
210 bool hasEndTime()
const;
211 bool hasValidProtonChargeLog(std::string &
error)
const;
215 void loadNexus(Nexus::File *file,
const std::map<std::string, std::string> &entries);
227 mutable std::unique_ptr<Kernel::Cache<std::pair<std::string, Kernel::Math::StatisticType>,
double>>
257 auto newProp = std::make_unique<Kernel::PropertyWithValue<TYPE>>(
name,
value);
258 newProp->setUnits(units);
double value
The value of the point.
This class contains the information about the log entries.
void addLogData(Kernel::Property *p)
Add a log entry.
const std::vector< Kernel::Property * > & getLogData() const
Access all log entries.
const std::string & getProtonChargeLogName() const
std::unique_ptr< Kernel::PropertyManager > m_manager
A pointer to a property manager.
const std::string & getProtonChargeUnfilteredName() const
virtual ~LogManager()
Destructor.
Kernel::Property * getLogData(const std::string &name) const
Access a single log entry.
std::unique_ptr< Kernel::Cache< std::pair< std::string, Kernel::Math::StatisticType >, double > > m_singleValueCache
Cache for the retrieved single values.
static const std::string PROTON_CHARGE_LOG_NAME
Name of the log entry containing the proton charge when retrieved using getProtonCharge.
void addProperty(Kernel::Property *prop, bool overwrite=false)
Add data to the object in the form of a property.
std::unique_ptr< Kernel::TimeROI > m_timeroi
void addLogData(std::unique_ptr< Kernel::Property > p, bool overwrite=false)
Add a log entry.
double getLogAsSingleValue(const std::string &name, Kernel::Math::StatisticType statistic=Kernel::Math::Mean) const
void removeLogData(const std::string &name, const bool delproperty=true)
Remove a named log entry.
static const std::string PROTON_CHARGE_UNFILTERED_LOG_NAME
Flag to signify if a filter has been applied to the proton charge log.
Cache is a generic caching storage class.
This class is for filtering TimeSeriesProperty data.
Property manager helper class.
The concrete, templated class for properties.
Base class for properties.
Class holding a start/end time and a destination for splitting event lists and logs.
TimeROI : Object that holds information about when the time measurement was active.
A specialised Property class for holding a series of time-value pairs.
std::shared_ptr< const LogManager > LogManager_const_sptr
shared pointer to the logManager base class (const version)
std::shared_ptr< LogManager > LogManager_sptr
shared pointer to the logManager base class
StatisticType
Maps a "statistic" to a number.
Statistics getStatistics(const std::vector< TYPE > &data, const unsigned int flags=StatOptions::AllStats)
Return a statistics object for the given data set.
std::vector< SplittingInterval > SplittingIntervalVec
A typedef for splitting events according their pulse time.
Helper class which provides the Collimation Length for SANS instruments.
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
constexpr bool operator!=(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
Struct holding some useful statistics for a TimeSeriesProperty.