|
Mantid
|
This class contains the information about the log entries. More...
#include <LogManager.h>
Public Member Functions | |
| void | addLogData (Kernel::Property *p) |
| Add a log entry. | |
| void | addLogData (std::unique_ptr< Kernel::Property > p, bool overwrite=false) |
| Add a log entry. | |
| template<class TYPE > | |
| void | addProperty (const std::string &name, const TYPE &value, bool overwrite=false) |
| Add a property of given type. | |
| template<class TYPE > | |
| void | addProperty (const std::string &name, const TYPE &value, const std::string &units, bool overwrite=false) |
| Add a property of a specified type (Simply creates a Kernel::Property of that type) and set its units. | |
| void | addProperty (Kernel::Property *prop, bool overwrite=false) |
| Add data to the object in the form of a property. | |
| void | addProperty (std::unique_ptr< Kernel::Property > prop, bool overwrite=false) |
| Add data to the object in the form of a property. | |
| void | clearLogs () |
| Clear the logs. | |
| void | clearOutdatedTimeSeriesLogValues () |
| Empty all but the last value out of all TimeSeriesProperty logs. | |
| void | clearSingleValueCache () |
| Clear the cache of calculated statistics. | |
| void | clearTimeSeriesLogs () |
| Empty the values out of all TimeSeriesProperty logs. | |
| LogManager * | cloneInTimeROI (const Kernel::TimeROI &timeROI) |
| Create a new LogManager with a partial copy of its time series properties according to TimeROI. | |
| void | copyAndFilterProperties (const LogManager &other, const Kernel::TimeROI &timeROI) |
| Copy properties from another LogManager; filter copied time series properties according to TimeROI. | |
| const Types::Core::DateAndTime | endTime () const |
| Return the run end time. | |
| void | filterByLog (Mantid::Kernel::LogFilter *filter, const std::vector< std::string > &excludedFromFiltering=std::vector< std::string >()) |
| Filter the run by the given log filter. | |
| virtual void | filterByTime (const Types::Core::DateAndTime start, const Types::Core::DateAndTime stop) |
| Filter the logs by time. | |
| const Types::Core::DateAndTime | getFirstPulseTime () const |
| Return the first pulse time from sample logs. | |
| Kernel::TimeSeriesProperty< bool > * | getInvalidValuesFilter (const std::string &logName) const |
| returns the invalid values log if the log has a matching invalid values log filter | |
| const Types::Core::DateAndTime | getLastPulseTime () const |
| Return the last pulse time from sample logs. | |
| double | getLogAsSingleValue (const std::string &name, Kernel::Math::StatisticType statistic=Kernel::Math::Mean) const |
| const std::vector< Kernel::Property * > & | getLogData () const |
| Access all log entries. | |
| Kernel::Property * | getLogData (const std::string &name) const |
| Access a single log entry. | |
| virtual size_t | getMemorySize () const |
| Return an approximate memory size for the object in bytes. | |
| const std::vector< Kernel::Property * > & | getProperties () const |
| Return all of the current properties. | |
| Kernel::Property * | getProperty (const std::string &name) const |
| Returns the named property as a pointer. | |
| int | getPropertyAsIntegerValue (const std::string &name) const |
| Returns a property as an integer value. | |
| double | getPropertyAsSingleValue (const std::string &name, Kernel::Math::StatisticType statistic=Kernel::Math::Mean) const |
| Returns a property as a single double value from its name. | |
| template<typename HeldType > | |
| HeldType | getPropertyValueAsType (const std::string &name) const |
| Get the value of a property as the given TYPE. | |
| const std::string & | getProtonChargeLogName () const |
| const std::string & | getProtonChargeUnfilteredName () const |
| Kernel::TimeSeriesPropertyStatistics | getStatistics (const std::string &name) const |
| Returns various statistics computations for a given property. | |
| double | getTimeAveragedStd (const std::string &name) const |
| Get the time averaged standard deviation for a log. | |
| double | getTimeAveragedValue (const std::string &name) const |
| Get the time averaged value for a log. | |
| const Kernel::TimeROI & | getTimeROI () const |
| template<typename T > | |
| Kernel::TimeSeriesProperty< T > * | getTimeSeriesProperty (const std::string &name) const |
| Returns a property as a time series property. | |
| bool | hasInvalidValuesFilter (const std::string &logName) const |
| returns true if the log has a matching invalid values log filter | |
| bool | hasProperty (const std::string &name) const |
| Does the property exist on the object. | |
| virtual void | loadNexus (Nexus::File *file, const std::string &group, bool keepOpen=false) |
| Load the run from a NeXus file with a given group name. | |
| virtual void | loadNexus (Nexus::File *file, const std::string &group, const Mantid::Nexus::NexusDescriptor &fileInfo, const std::string &prefix, bool keepOpen=false) |
| Load the run from a NeXus file with a given group name. Overload that uses NexusDescriptor for faster. | |
| LogManager () | |
| LogManager (const LogManager &other) | |
| bool | operator!= (const LogManager &other) const |
| LogManager & | operator= (const LogManager &other) |
| bool | operator== (const LogManager &other) const |
| virtual void | removeDataOutsideTimeROI () |
| For the time series properties, remove values according to TimeROI. | |
| void | removeLogData (const std::string &name, const bool delproperty=true) |
| Remove a named log entry. | |
| void | removeProperty (const std::string &name, bool delProperty=true) |
| Remove a named property. | |
| virtual void | saveNexus (Nexus::File *file, const std::string &group, bool keepOpen=false) const |
| Save the run to a NeXus file with a given group name. | |
| void | setStartAndEndTime (const Types::Core::DateAndTime &start, const Types::Core::DateAndTime &end) |
| Set the run start and end. | |
| virtual void | setTimeROI (const Kernel::TimeROI &timeroi) |
| const Types::Core::DateAndTime | startTime () const |
| Return the run start time. | |
| virtual | ~LogManager () |
| Destructor. | |
Static Public Member Functions | |
| static std::string | getInvalidValuesFilterLogName (const std::string &logName) |
| Gets the correct log name for the matching invalid values log for a given log name. | |
Protected Member Functions | |
| bool | hasEndTime () const |
| bool | hasStartTime () const |
| bool | hasValidProtonChargeLog (std::string &error) const |
| Check if the proton_charge log exists, is of valid type, and is not empty. | |
| void | loadNexus (Nexus::File *file, const Mantid::Nexus::NexusDescriptor &fileInfo, const std::string &prefix) |
| void | loadNexus (Nexus::File *file, const std::map< std::string, std::string > &entries) |
| Load the run from a NeXus file with a given group name. | |
Protected Attributes | |
| std::unique_ptr< Kernel::PropertyManager > | m_manager |
| A pointer to a property manager. | |
| std::unique_ptr< Kernel::TimeROI > | m_timeroi |
Static Protected Attributes | |
| static const std::string | PROTON_CHARGE_LOG_NAME = "gd_prtn_chrg" |
| Name of the log entry containing the proton charge when retrieved using getProtonCharge. | |
| static const std::string | PROTON_CHARGE_UNFILTERED_LOG_NAME = LogManager::PROTON_CHARGE_LOG_NAME + "_unfiltered" |
| Flag to signify if a filter has been applied to the proton charge log. | |
Private Attributes | |
| std::unique_ptr< Kernel::Cache< std::pair< std::string, Kernel::Math::StatisticType >, double > > | m_singleValueCache |
| Cache for the retrieved single values. | |
This class contains the information about the log entries.
Definition at line 44 of file LogManager.h.
| Mantid::API::LogManager::LogManager | ( | ) |
Definition at line 90 of file LogManager.cpp.
Referenced by cloneInTimeROI().
| Mantid::API::LogManager::LogManager | ( | const LogManager & | other | ) |
Definition at line 95 of file LogManager.cpp.
|
virtualdefault |
Destructor.
Doesn't need to be virtual as long as nothing inherits from this class.
|
inline |
Add a log entry.
| p | :: A pointer to the property containing the log entry |
Definition at line 127 of file LogManager.h.
References addLogData().
Referenced by addLogData(), Mantid::API::ISISRunLogs::addPeriodLog(), Mantid::API::ISISRunLogs::addPeriodLogs(), Mantid::DataHandling::LoadHFIRSANS::addRunTimeSeriesProperty(), Mantid::Algorithms::AddSampleLog::addSingleValueProperty(), Mantid::API::ISISRunLogs::addStatusLog(), Mantid::Algorithms::AddSampleLog::addStringLog(), Mantid::Algorithms::AddSampleLog::addTimeSeriesProperty(), Mantid::DataHandling::LoadCanSAS1D::createLogs(), Mantid::DataHandling::LoadSpice2D::detectorDistance(), Mantid::DataHandling::LoadSpice2D::detectorTranslation(), Mantid::Algorithms::CreateSampleWorkspace::exec(), Mantid::DataHandling::LoadLog::loadTwoColumnLogFile(), Mantid::Algorithms::CopyLogs::mergeKeepExisting(), Mantid::Algorithms::CopyLogs::mergeReplaceExisting(), Mantid::DataHandling::LoadSpice2D::rotateDetector(), Mantid::DataHandling::LoadEventPreNexus2::setProtonCharge(), Mantid::DataHandling::LoadRawHelper::setRunNumber(), Mantid::DataHandling::LoadILLDiffraction::setSampleLogs(), and Mantid::Algorithms::CopyLogs::wipeExisting().
|
inline |
Add a log entry.
| p | :: A pointer to the property containing the log entry |
| overwrite | :: Overwrite existing if requested |
Definition at line 134 of file LogManager.h.
| void Mantid::API::LogManager::addProperty | ( | const std::string & | name, |
| const TYPE & | value, | ||
| bool | overwrite = false |
||
| ) |
Add a property of given type.
Add a property of a specified type (Simply creates a Kernel::Property of that type.
| name | :: The name of the type |
| value | :: The value of the property |
| overwrite | :: If true, a current value is overwritten. (Default: False) |
Definition at line 242 of file LogManager.h.
References addProperty(), name, and value.
| void Mantid::API::LogManager::addProperty | ( | const std::string & | name, |
| const TYPE & | value, | ||
| const std::string & | units, | ||
| bool | overwrite = false |
||
| ) |
Add a property of a specified type (Simply creates a Kernel::Property of that type) and set its units.
| name | :: The name of the type |
| value | :: The value of the property |
| units | :: a string giving the units of the property. |
| overwrite | :: If true, a current value is overwritten. (Default: False) |
Definition at line 256 of file LogManager.h.
References addProperty(), name, and value.
|
inline |
Add data to the object in the form of a property.
Definition at line 91 of file LogManager.h.
Referenced by Mantid::DataHandling::LoadILLTOF2::addAllNexusFieldsAsProperties(), Mantid::DataHandling::LoadILLTOF3::addAllNexusFieldsAsProperties(), Mantid::DataHandling::LoadILLTOF2::addEnergyToRun(), Mantid::DataHandling::LoadILLTOF3::addEnergyToRun(), Mantid::MDAlgorithms::ConvertToMD::addExperimentInfo(), Mantid::DataHandling::LoadILLTOF2::addFacility(), Mantid::DataHandling::LoadILLTOF3::addFacility(), Mantid::DataHandling::LegacyLoadHelper::addNumericProperty(), Mantid::API::ISISRunLogs::addPeriodLogs(), addProperty(), addProperty(), Mantid::Algorithms::SampleLogsBehaviour::addPropertyForList(), Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), Mantid::DataHandling::LoadILLTOF2::addPulseInterval(), Mantid::DataHandling::LoadILLTOF3::addPulseInterval(), Mantid::DataHandling::addSinglePointTimeSeriesProperty(), WorkspaceCreationHelper::addTSPEntry(), Mantid::Crystal::LoadIsawPeaks::appendFile(), Mantid::MDAlgorithms::MDWSTransform::buildQTrahsf(), Mantid::Algorithms::ConvertUnits::convertViaTOF(), Mantid::Algorithms::AddLogDerivative::exec(), Mantid::Algorithms::AddLogInterpolated::exec(), Mantid::Algorithms::AddLogSmoothed::exec(), Mantid::Crystal::AnvredCorrection::exec(), Mantid::Crystal::LoadHKL::exec(), Mantid::Crystal::SaveHKL::exec(), Mantid::DataHandling::LoadBBY::exec(), Mantid::DataHandling::LoadILLSANS::exec(), Mantid::DataHandling::LoadIsawDetCal::exec(), Mantid::DataHandling::LoadRaw3::exec(), Mantid::MDAlgorithms::ConvertToMDMinMaxLocal::exec(), Mantid::MDAlgorithms::LoadDNSSCD::exec(), Mantid::DataHandling::LoadEMU< FD >::exec(), Mantid::DataHandling::LoadPLN::exec(), Mantid::Crystal::AnvredCorrection::execEvent(), Mantid::DataHandling::LoadBBY2::execLoader(), Mantid::DataHandling::LoadILLSANS::loadDataFromD16ScanMonitors(), Mantid::DataHandling::LoadILLSANS::loadDataFromMonitors(), Mantid::DataHandling::LoadEMU< FD >::loadDopplerParameters(), Mantid::DataHandling::LoadILLSANS::loadMetaData(), Mantid::API::Run::loadNexusCommon(), Mantid::DataHandling::LoadILLReflectometry::loadNexusEntriesIntoProperties(), Mantid::DataHandling::LoadILLIndirect2::loadNexusEntriesIntoProperties(), Mantid::DataHandling::LoadNexusLogs::loadNPeriods(), Mantid::DataHandling::LoadEMU< FD >::loadParameters(), Mantid::DataHandling::LoadPLN::loadParameters(), Mantid::DataHandling::LoadMuonNexusV2::loadPeriodInfo(), Mantid::DataHandling::LoadISISNexusHelper::loadRunDetails(), Mantid::DataHandling::LoadSINQFocus::loadRunDetails(), Mantid::DataHandling::LoadISISNexus2::loadRunDetails(), Mantid::DataHandling::LoadMLZ::loadRunDetails(), Mantid::DataHandling::LoadRawHelper::loadRunParameters(), Mantid::DataHandling::LoadILLSANS::moveDetectorsD33(), Mantid::DataHandling::LoadILLSANS::placeD16(), Mantid::DataHandling::LegacyLoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::API::Run::setDuration(), Mantid::DataHandling::LoadSwans::setMetaDataAsWorkspaceProperties(), Mantid::API::MatrixWorkspace::setPlotType(), Mantid::API::Run::setProtonCharge(), Mantid::API::MatrixWorkspace::setTitle(), Mantid::DataHandling::LoadEMU< Nexus::NexusDescriptor >::setupDetectorMasks(), Mantid::MDAlgorithms::ConvertCWPDMDToSpectra::setupSampleLogs(), Mantid::Algorithms::SparseWorkspace::SparseWorkspace(), Mantid::Algorithms::SampleLogsBehaviour::updateListProperty(), Mantid::MDAlgorithms::LoadDNSSCD::updateProperties(), and Mantid::Algorithms::SampleLogsBehaviour::updateSumProperty().
| void Mantid::API::LogManager::addProperty | ( | std::unique_ptr< Kernel::Property > | prop, |
| bool | overwrite = false |
||
| ) |
Add data to the object in the form of a property.
| prop | :: A pointer to a property whose ownership is transferred to this object |
| overwrite | :: If true, a current value is overwritten. (Default: False) |
Definition at line 347 of file LogManager.cpp.
References hasProperty(), m_manager, name, PROTON_CHARGE_LOG_NAME, and removeProperty().
| void Mantid::API::LogManager::clearLogs | ( | ) |
| void Mantid::API::LogManager::clearOutdatedTimeSeriesLogValues | ( | ) |
Empty all but the last value out of all TimeSeriesProperty logs.
Clears out all but the last entry of all logs of type TimeSeriesProperty Check the documentation/definition of TimeSeriesProperty::clearOutdated for the definition of 'last entry'.
Definition at line 566 of file LogManager.cpp.
References getProperties().
| void Mantid::API::LogManager::clearSingleValueCache | ( | ) |
Clear the cache of calculated statistics.
Definition at line 729 of file LogManager.cpp.
References m_singleValueCache.
Referenced by copyAndFilterProperties(), filterByLog(), removeDataOutsideTimeROI(), and setTimeROI().
| void Mantid::API::LogManager::clearTimeSeriesLogs | ( | ) |
Empty the values out of all TimeSeriesProperty logs.
Clear out the contents of all logs of type TimeSeriesProperty.
Single-value properties will be left unchanged.
The method has been fully implemented here instead of as a pass-through to PropertyManager to limit its visibility to Run clients.
Definition at line 549 of file LogManager.cpp.
References getProperties().
| LogManager * Mantid::API::LogManager::cloneInTimeROI | ( | const Kernel::TimeROI & | timeROI | ) |
Create a new LogManager with a partial copy of its time series properties according to TimeROI.
Create a partial copy of this object such that every time series property is cloned according to the input TimeROI.
A partially cloned time series property should include all time values enclosed by the ROI regions, each defined as [roi_begin,roi_end], plus the values immediately before and after an ROI region, if available. Properties that are not time series will be cloned with no changes.
| timeROI | :: a series of time regions used to determine which time series values should be included in the copy. |
Definition at line 289 of file LogManager.cpp.
References LogManager(), m_manager, m_timeroi, and Mantid::Kernel::TimeROI::update_or_replace_intersection().
| void Mantid::API::LogManager::copyAndFilterProperties | ( | const LogManager & | other, |
| const Kernel::TimeROI & | timeROI | ||
| ) |
Copy properties from another LogManager; filter copied time series properties according to TimeROI.
Copy properties from another LogManager object.
Filter copied time series properties according to the input TimeROI.
| other | :: another LogManager object. |
| timeROI | :: a series of time regions used to determine which time series values should be included in the copy. |
Definition at line 308 of file LogManager.cpp.
References clearSingleValueCache(), m_manager, and setTimeROI().
| const Types::Core::DateAndTime Mantid::API::LogManager::endTime | ( | ) | const |
Return the run end time.
Find run end time as determined by the following priorities:
| std::runtime_error | if end time cannot be determined |
Definition at line 166 of file LogManager.cpp.
References getLastPulseTime(), getProperty(), hasProperty(), hasValidProtonChargeLog(), and value.
Referenced by export_Run(), Mantid::API::ExperimentInfo::getAvailableWorkspaceEndDate(), and Mantid::API::Run::operator+=().
| void Mantid::API::LogManager::filterByLog | ( | Mantid::Kernel::LogFilter * | filter, |
| const std::vector< std::string > & | excludedFromFiltering = std::vector<std::string>() |
||
| ) |
Filter the run by the given log filter.
Filter the run by the given boolean log.
It replaces all time series properties with filtered time series properties
| filter | :: A LogFilter instance to filter each log on |
| excludedFromFiltering | :: A string list of logs that will be excluded from filtering |
Definition at line 332 of file LogManager.cpp.
References clearSingleValueCache(), and m_manager.
Referenced by Mantid::API::ISISRunLogs::applyLogFiltering().
|
virtual |
Filter the logs by time.
Filter out all TimeSeriesProperty log entries outside of the given absolute time range [start,stop), except for the entries immediately before and after the time range.
| start | :: Absolute start time. |
| stop | :: Absolute stop time. |
Reimplemented in Mantid::API::Run.
Definition at line 277 of file LogManager.cpp.
References removeDataOutsideTimeROI(), and setTimeROI().
Referenced by Mantid::API::Run::filterByTime().
| const DateAndTime Mantid::API::LogManager::getFirstPulseTime | ( | ) | const |
Return the first pulse time from sample logs.
Return the time of the first pulse received, by accessing the run's sample logs to find the proton_charge.
| runtime_error | if the time of the first pulse is not available. |
Definition at line 205 of file LogManager.cpp.
References Mantid::Kernel::TimeSeriesProperty< TYPE >::realSize(), and Mantid::Kernel::TimeSeriesProperty< TYPE >::timesAsVector().
Referenced by Mantid::API::MatrixWorkspace::getFirstPulseTime(), and startTime().
| Kernel::TimeSeriesProperty< bool > * Mantid::API::LogManager::getInvalidValuesFilter | ( | const std::string & | logName | ) | const |
returns the invalid values log if the log has a matching invalid values log filter
Definition at line 743 of file LogManager.cpp.
References getInvalidValuesFilterLogName(), and getLogData().
|
static |
Gets the correct log name for the matching invalid values log for a given log name.
Definition at line 733 of file LogManager.cpp.
References Mantid::Kernel::PropertyManager::getInvalidValuesFilterLogName().
Referenced by getInvalidValuesFilter(), and hasInvalidValuesFilter().
| const DateAndTime Mantid::API::LogManager::getLastPulseTime | ( | ) | const |
Return the last pulse time from sample logs.
Return the time of the last pulse received, by accessing the run's sample logs to find the proton_charge.
| runtime_error | if the time of the last pulse is not available. |
Definition at line 234 of file LogManager.cpp.
References Mantid::Kernel::TimeSeriesProperty< TYPE >::lastTime(), and Mantid::Kernel::TimeSeriesProperty< TYPE >::realSize().
Referenced by endTime(), and Mantid::API::MatrixWorkspace::getLastPulseTime().
|
inline |
| name | :: The name of the property |
| statistic | :: Defines how to calculate the single value from series (default=Mean) |
Definition at line 161 of file LogManager.h.
References name.
Referenced by Mantid::API::Run::calculateAverageGoniometerMatrix(), Mantid::Algorithms::ConvertSpectrumAxis2::getEfixed(), Mantid::Algorithms::PDDetermineCharacterizations::getLogValue(), MantidQt::MantidWidgets::LogValueFinder::getLogValue(), Mantid::DataHandling::LoadILLDiffraction::setSampleLogs(), and Mantid::Algorithms::SampleLogsBehaviour::updateTimeSeriesProperty().
|
inline |
Access all log entries.
Definition at line 146 of file LogManager.h.
Referenced by export_Run(), Mantid::API::Run::getBadPulseRange(), and getInvalidValuesFilter().
|
inline |
Access a single log entry.
| name | :: The name of the log entry to retrieve |
Definition at line 141 of file LogManager.h.
References name.
Referenced by Mantid::Algorithms::CompareWorkspaces::checkRunProperties(), Mantid::DataHandling::SaveCanSAS1D::createSASProcessElement(), Mantid::DataHandling::SaveCanSAS1D2::createSASProcessElement(), Mantid::Algorithms::CopyLogs::exec(), Mantid::Algorithms::NormaliseByCurrent::extractCharge(), MantidQt::MantidWidgets::LogValueFinder::getLogNames(), Mantid::API::ISISRunLogs::ISISRunLogs(), Mantid::DataHandling::LoadMuonStrategy::loadDefaultDetectorGrouping(), Mantid::MDAlgorithms::LoadDNSSCD::updateProperties(), and Mantid::Algorithms::CopyLogs::wipeExisting().
|
virtual |
Return an approximate memory size for the object in bytes.
Return the total memory used by the run object, in bytes.
Reimplemented in Mantid::API::Run.
Definition at line 391 of file LogManager.cpp.
References m_manager, and m_timeroi.
Referenced by Mantid::API::Run::getMemorySize().
| const std::vector< Kernel::Property * > & Mantid::API::LogManager::getProperties | ( | ) | const |
Return all of the current properties.
Definition at line 386 of file LogManager.cpp.
References m_manager.
Referenced by clearOutdatedTimeSeriesLogValues(), clearTimeSeriesLogs(), export_Run(), Mantid::API::ISISRunLogs::getLogNamesExcludedFromFiltering(), and Mantid::MDAlgorithms::ConvertCWPDMDToSpectra::setupSampleLogs().
| Kernel::Property * Mantid::API::LogManager::getProperty | ( | const std::string & | name | ) | const |
Returns the named property as a pointer.
Get a pointer to a property by name.
| name | :: The name of a property, throws an Exception::NotFoundError if it does not exist |
Definition at line 541 of file LogManager.cpp.
References m_manager, and name.
Referenced by Mantid::Algorithms::AddSampleLog::addSingleValueProperty(), Mantid::Algorithms::AddSampleLog::addStringLog(), Mantid::Algorithms::AddSampleLog::addTimeSeriesProperty(), Mantid::MDAlgorithms::SlicingAlgorithm::createTransform(), Mantid::Algorithms::MonteCarloAbsorption::doSimulation(), endTime(), Mantid::Algorithms::AddLogDerivative::exec(), Mantid::Algorithms::AddLogInterpolated::exec(), Mantid::Algorithms::AddLogSmoothed::exec(), Mantid::MDAlgorithms::LoadDNSSCD::exec(), export_Run(), Mantid::DataHandling::SaveGSS::generateInstrumentHeader(), Mantid::API::ExperimentInfo::getLog(), Mantid::Algorithms::PDDetermineCharacterizations::getLogValue(), Mantid::DataHandling::SaveGSS::getLogValue(), Mantid::API::MatrixWorkspace::getPlotType(), getPropertyAsIntegerValue(), getPropertyAsSingleValue(), getPropertyValueAsType(), getStatistics(), getTimeSeriesProperty(), Mantid::API::MatrixWorkspace::getTitle(), hasValidProtonChargeLog(), Mantid::API::Run::integrateProtonCharge(), Mantid::API::Run::loadNexus(), Mantid::API::Run::loadNexus(), Mantid::DataHandling::LegacyLoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::API::Run::setDuration(), Mantid::API::Run::setProtonCharge(), Mantid::Algorithms::AddSampleLog::setTimeSeriesData(), startTime(), Mantid::Algorithms::SampleLogsBehaviour::updateListProperty(), Mantid::Algorithms::SampleLogsBehaviour::updateTimeSeriesProperty(), Mantid::Algorithms::AddLogInterpolated::validateInputs(), and Mantid::Algorithms::AddLogSmoothed::validateInputs().
| int Mantid::API::LogManager::getPropertyAsIntegerValue | ( | const std::string & | name | ) | const |
Returns a property as an integer value.
Returns a property as a n integer, if the underlying value is an integer.
Throws otherwise.
| name | :: The name of the property |
| std::invalid_argument | if property is not an integer type |
Definition at line 518 of file LogManager.cpp.
References getProperty(), name, and Mantid::Kernel::Property::value().
Referenced by Mantid::API::ISISRunLogs::applyLogFiltering().
| double Mantid::API::LogManager::getPropertyAsSingleValue | ( | const std::string & | name, |
| Kernel::Math::StatisticType | statistic = Kernel::Math::Mean |
||
| ) | const |
Returns a property as a single double value from its name.
| name | :: The name of the property |
| statistic | :: The statistic to use to calculate the single value (default=Mean) |
Definition at line 485 of file LogManager.cpp.
References getProperty(), getTimeROI(), m_singleValueCache, and name.
Referenced by Mantid::DataHandling::LoadILLTOF2::addPulseInterval(), Mantid::DataHandling::LoadILLTOF3::addPulseInterval(), Mantid::Algorithms::GetEiMonDet3::computeTOF(), and Mantid::API::ExperimentInfo::getLogAsSingleValue().
| HeldType Mantid::API::LogManager::getPropertyValueAsType | ( | const std::string & | name | ) | const |
Get the value of a property as the given TYPE.
Get the value of a property as the requested type.
Throws if the type is not correct
Throws if the type is not correct
| name | :: The name of the property |
Definition at line 468 of file LogManager.cpp.
References getProperty(), and name.
Referenced by Mantid::DataHandling::LoadILLTOF2::addAllNexusFieldsAsProperties(), Mantid::DataHandling::LoadILLTOF3::addAllNexusFieldsAsProperties(), Mantid::MDAlgorithms::ConvertToMD::addExperimentInfo(), Mantid::Algorithms::AddPeak::exec(), Mantid::Algorithms::FilterBadPulses::exec(), Mantid::Crystal::AnvredCorrection::exec(), Mantid::Crystal::SaveHKL::exec(), Mantid::Crystal::SaveIsawPeaks::exec(), Mantid::Crystal::SCDCalibratePanels::exec(), Mantid::DataHandling::LoadIsawDetCal::exec(), Mantid::DataHandling::SaveIsawDetCal::exec(), Mantid::DataHandling::SaveNXSPE::exec(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::exec(), Mantid::Algorithms::NormaliseByCurrent::extractCharge(), Mantid::Crystal::SCDCalibratePanels::findT0(), Mantid::API::ExperimentInfo::getEFixedGivenEMode(), Mantid::API::ExperimentInfo::getEMode(), Mantid::Algorithms::Qxy::getQminFromWs(), Mantid::MDAlgorithms::ConvToMDBase::initialize(), Mantid::DataHandling::LoadEMU< FD >::loadEnvironParameters(), Mantid::DataHandling::LoadPLN::loadEnvironParameters(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), and Mantid::DataHandling::LoadILLDiffraction::setSampleLogs().
|
inline |
Definition at line 205 of file LogManager.h.
|
inline |
Definition at line 206 of file LogManager.h.
| Kernel::TimeSeriesPropertyStatistics Mantid::API::LogManager::getStatistics | ( | const std::string & | name | ) | const |
Returns various statistics computations for a given property.
The time filter, if not-empty, is applied when computing. The returned statistics will all be NAN when statistics cannot be computed, such as for a string property.
| name | :: The name of the property. |
Definition at line 444 of file LogManager.cpp.
References getProperty(), m_timeroi, name, Mantid::Kernel::TimeSeriesPropertyStatistics::setAllToNan(), and value.
Referenced by Mantid::API::Run::calculateAverageGoniometerMatrix(), export_Run(), getTimeAveragedStd(), and getTimeAveragedValue().
| double Mantid::API::LogManager::getTimeAveragedStd | ( | const std::string & | name | ) | const |
Get the time averaged standard deviation for a log.
Returns the time dependent standard deviation.
| name | :: The name of the property |
Definition at line 425 of file LogManager.cpp.
References getStatistics(), name, and Mantid::Kernel::TimeSeriesPropertyStatistics::time_standard_deviation.
Referenced by export_Run().
| double Mantid::API::LogManager::getTimeAveragedValue | ( | const std::string & | name | ) | const |
Get the time averaged value for a log.
Returns the time averaged value.
| name | :: The name of the property |
Definition at line 434 of file LogManager.cpp.
References getStatistics(), name, and Mantid::Kernel::TimeSeriesPropertyStatistics::time_mean.
Referenced by Mantid::Algorithms::SumEventsByLogValue::createTableOutput(), and export_Run().
| const Kernel::TimeROI & Mantid::API::LogManager::getTimeROI | ( | ) | const |
Definition at line 575 of file LogManager.cpp.
References m_timeroi.
Referenced by Mantid::Algorithms::SumEventsByLogValue::createTableOutput(), export_Run(), getPropertyAsSingleValue(), and Mantid::API::Run::integrateProtonCharge().
| Kernel::TimeSeriesProperty< T > * Mantid::API::LogManager::getTimeSeriesProperty | ( | const std::string & | name | ) | const |
Returns a property as a time series property.
It will throw if it is not valid
It will throw if it is not valid or the property does not exist
| name | The name of a time-series property |
| invalid_argument | if the named property is not a time-series property |
Definition at line 411 of file LogManager.cpp.
References getProperty(), and name.
Referenced by Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), Mantid::API::ISISRunLogs::applyLogFiltering(), Mantid::DataHandling::LoadEMU< FD >::exec(), Mantid::DataHandling::LoadPLN::exec(), Mantid::DataHandling::LoadEMU< FD >::loadDopplerParameters(), and Mantid::Algorithms::SampleLogsBehaviour::updateTimeSeriesProperty().
|
protected |
Definition at line 194 of file LogManager.cpp.
References hasProperty(), and hasValidProtonChargeLog().
| bool Mantid::API::LogManager::hasInvalidValuesFilter | ( | const std::string & | logName | ) | const |
returns true if the log has a matching invalid values log filter
Definition at line 738 of file LogManager.cpp.
References getInvalidValuesFilterLogName(), and hasProperty().
| bool Mantid::API::LogManager::hasProperty | ( | const std::string & | name | ) | const |
Does the property exist on the object.
Returns true if the named property exists.
| name | :: The name of the property |
Definition at line 365 of file LogManager.cpp.
References m_manager, and name.
Referenced by Mantid::DataHandling::LegacyLoadHelper::addNumericProperty(), addProperty(), Mantid::DataHandling::LoadNexusProcessed::applyLogFiltering(), Mantid::Algorithms::GetEiMonDet3::computeTOF(), Mantid::DataHandling::SaveCanSAS1D::createSASProcessElement(), Mantid::DataHandling::SaveCanSAS1D2::createSASProcessElement(), Mantid::MDAlgorithms::SlicingAlgorithm::createTransform(), endTime(), Mantid::Algorithms::AddLogDerivative::exec(), Mantid::Algorithms::AddPeak::exec(), Mantid::Algorithms::AddSampleLog::exec(), Mantid::Algorithms::FilterBadPulses::exec(), Mantid::Crystal::AnvredCorrection::exec(), Mantid::Crystal::SaveHKL::exec(), Mantid::Crystal::SaveIsawPeaks::exec(), Mantid::Crystal::SCDCalibratePanels::exec(), Mantid::DataHandling::LoadIsawDetCal::exec(), Mantid::DataHandling::LoadPreNexus::exec(), Mantid::DataHandling::SaveIsawDetCal::exec(), Mantid::DataHandling::SaveNXSPE::exec(), Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::exec(), export_Run(), Mantid::DataHandling::SaveGSS::generateInstrumentHeader(), Mantid::API::Run::getBadPulseRange(), Mantid::Algorithms::ConvertSpectrumAxis2::getEfixed(), Mantid::API::ExperimentInfo::getEFixedGivenEMode(), Mantid::API::ISISRunLogs::getLogNamesExcludedFromFiltering(), Mantid::Algorithms::PDDetermineCharacterizations::getLogValue(), Mantid::DataHandling::SaveGSS::getLogValue(), Mantid::Algorithms::Qxy::getQminFromWs(), Mantid::API::ExperimentInfo::getRunNumber(), hasEndTime(), hasInvalidValuesFilter(), hasStartTime(), hasValidProtonChargeLog(), Mantid::API::Run::integrateProtonCharge(), Mantid::API::Run::loadNexus(), Mantid::API::Run::loadNexus(), Mantid::API::Run::loadNexusCommon(), Mantid::DataHandling::LoadNexusLogs::loadNPeriods(), Mantid::Algorithms::CopyLogs::mergeKeepExisting(), Mantid::Algorithms::CopyLogs::mergeReplaceExisting(), Mantid::DataHandling::LegacyLoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::API::Run::saveNexus(), Mantid::API::Run::setDuration(), Mantid::API::Run::setProtonCharge(), Mantid::DataHandling::LoadILLDiffraction::setSampleLogs(), startTime(), Mantid::MDAlgorithms::LoadDNSSCD::updateProperties(), Mantid::Algorithms::AddLogInterpolated::validateInputs(), Mantid::Algorithms::AddLogSmoothed::validateInputs(), and Mantid::DataHandling::LoadISISNexus2::validateMultiPeriodLogs().
|
protected |
Definition at line 189 of file LogManager.cpp.
References hasProperty(), and hasValidProtonChargeLog().
|
protected |
Check if the proton_charge log exists, is of valid type, and is not empty.
| error | :: extended error message in case the check fails |
Definition at line 247 of file LogManager.cpp.
References error, getProperty(), hasProperty(), and Mantid::Kernel::TimeSeriesProperty< TYPE >::realSize().
Referenced by endTime(), hasEndTime(), hasStartTime(), and startTime().
|
protected |
Definition at line 649 of file LogManager.cpp.
References Mantid::Nexus::NexusDescriptor::getAllEntries(), Mantid::Kernel::PropertyNexus::loadProperty(), m_manager, m_timeroi, and Mantid::Kernel::TimeROI::NAME.
|
protected |
Load the run from a NeXus file with a given group name.
Load the object from an open NeXus file.
Avoid multiple expensive calls to getEntries().
| file | :: open NeXus file |
| entries | :: The entries available in the current place in the file. load any NXlog in the current open group. |
Definition at line 700 of file LogManager.cpp.
References Mantid::Kernel::PropertyNexus::loadProperty(), m_manager, m_timeroi, and Mantid::Kernel::TimeROI::NAME.
|
virtual |
Load the run from a NeXus file with a given group name.
Load the object from an open NeXus file.
| file | :: open NeXus file |
| group | :: name of the group to open. Pass an empty string to NOT open a group |
| keepOpen | :: do not close group on exit to allow overloading and child classes reading from the same group load any NXlog in the current open group. |
Reimplemented in Mantid::API::Run.
Definition at line 636 of file LogManager.cpp.
References group, and loadNexus().
|
virtual |
Load the run from a NeXus file with a given group name. Overload that uses NexusDescriptor for faster.
Load the object from an open NeXus file.
Not used.
| file | :: open NeXus file |
| group | :: name of the group to open. Pass an empty string to NOT open a group |
| fileInfo | :: The corresponding Nexus HDF5 file descriptor |
| prefix | :: The prefix of the provided file |
| keepOpen | :: do not close group on exit to allow overloading and child classes reading from the same group load any NXlog in the current open group. |
Reimplemented in Mantid::API::Run.
Definition at line 621 of file LogManager.cpp.
Referenced by loadNexus(), Mantid::API::Run::loadNexus(), and Mantid::API::Run::loadNexus().
| bool Mantid::API::LogManager::operator!= | ( | const LogManager & | other | ) | const |
Definition at line 759 of file LogManager.cpp.
| LogManager & Mantid::API::LogManager::operator= | ( | const LogManager & | other | ) |
Definition at line 104 of file LogManager.cpp.
References m_manager, m_singleValueCache, and m_timeroi.
Referenced by Mantid::API::Run::operator=().
| bool Mantid::API::LogManager::operator== | ( | const LogManager & | other | ) | const |
Definition at line 755 of file LogManager.cpp.
References m_manager, and m_timeroi.
Referenced by Mantid::API::Run::operator==().
|
virtual |
For the time series properties, remove values according to TimeROI.
For time series properties, remove time values outside of this object's TimeROI.
Each TimeROI region is defined as [roi_begin,roi_end]. However, keep the values immediately before and after each timeROI region, if available.
Definition at line 319 of file LogManager.cpp.
References clearSingleValueCache(), m_manager, and m_timeroi.
Referenced by Mantid::Algorithms::SumEventsByLogValue::createTableOutput(), and filterByTime().
|
inline |
Remove a named log entry.
| name | :: The name of the entry to remove |
| delproperty | :: If true, delete the log entry |
Definition at line 152 of file LogManager.h.
References name.
Referenced by Mantid::Algorithms::AddSampleLog::exec(), Mantid::DataHandling::LoadRaw3::exec(), Mantid::DataHandling::LoadRawBin0::exec(), Mantid::DataHandling::LoadRawSpectrum0::exec(), Mantid::Algorithms::CopyLogs::mergeReplaceExisting(), and Mantid::Algorithms::CopyLogs::wipeExisting().
| void Mantid::API::LogManager::removeProperty | ( | const std::string & | name, |
| bool | delProperty = true |
||
| ) |
Remove a named property.
| name | :: The name of the property |
| delProperty | :: If true the property is deleted (default=true) |
Definition at line 374 of file LogManager.cpp.
References m_manager, m_singleValueCache, and name.
Referenced by addProperty(), Mantid::DataHandling::LoadPreNexus::exec(), and Mantid::DataHandling::SinglePeriodLoadMuonStrategy::loadGoodFrames().
|
virtual |
Save the run to a NeXus file with a given group name.
Save the object to an open NeXus file.
| file | :: open NeXus file |
| group | :: name of the group to create |
| keepOpen | :: do not close group on exit to allow overloading and child classes writing to the same group |
Reimplemented in Mantid::API::Run.
Definition at line 589 of file LogManager.cpp.
References Mantid::API::g_log, group, m_manager, m_timeroi, and Mantid::Kernel::Logger::warning().
Referenced by Mantid::API::Run::saveNexus().
| void Mantid::API::LogManager::setStartAndEndTime | ( | const Types::Core::DateAndTime & | start, |
| const Types::Core::DateAndTime & | end | ||
| ) |
Set the run start and end.
| start | :: The run start |
| end | :: The run end |
Definition at line 117 of file LogManager.cpp.
Referenced by Mantid::Algorithms::CreateSampleWorkspace::exec(), and export_Run().
|
virtual |
Reimplemented in Mantid::API::Run.
Definition at line 577 of file LogManager.cpp.
References clearSingleValueCache(), m_timeroi, and Mantid::Kernel::TimeROI::replaceROI().
Referenced by copyAndFilterProperties(), filterByTime(), and Mantid::API::Run::setTimeROI().
| const Types::Core::DateAndTime Mantid::API::LogManager::startTime | ( | ) | const |
Return the run start time.
Find run end time as determined by the following priorities:
| std::runtime_error | if start time cannot be determined |
Definition at line 130 of file LogManager.cpp.
References getFirstPulseTime(), getProperty(), hasProperty(), hasValidProtonChargeLog(), and value.
Referenced by Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), export_Run(), Mantid::API::ExperimentInfo::getAvailableWorkspaceStartDate(), Mantid::Algorithms::AddSampleLog::getRunStart(), Mantid::API::ExperimentInfo::getWorkspaceStartDate(), Mantid::API::Run::operator+=(), and Mantid::Algorithms::SampleLogsBehaviour::updateTimeSeriesProperty().
|
protected |
A pointer to a property manager.
Definition at line 217 of file LogManager.h.
Referenced by addProperty(), clearLogs(), Mantid::API::Run::clone(), cloneInTimeROI(), copyAndFilterProperties(), filterByLog(), getMemorySize(), getProperties(), getProperty(), Mantid::API::Run::getProtonCharge(), hasProperty(), Mantid::API::Run::integrateProtonCharge(), loadNexus(), loadNexus(), operator!=(), Mantid::API::Run::operator+=(), operator=(), operator==(), removeDataOutsideTimeROI(), removeProperty(), and saveNexus().
|
mutableprivate |
Cache for the retrieved single values.
Definition at line 228 of file LogManager.h.
Referenced by clearSingleValueCache(), getPropertyAsSingleValue(), operator=(), and removeProperty().
|
protected |
Definition at line 218 of file LogManager.h.
Referenced by cloneInTimeROI(), getMemorySize(), getStatistics(), getTimeROI(), loadNexus(), loadNexus(), operator!=(), Mantid::API::Run::operator+=(), operator=(), operator==(), removeDataOutsideTimeROI(), saveNexus(), Mantid::API::Run::setDuration(), and setTimeROI().
|
staticprotected |
Name of the log entry containing the proton charge when retrieved using getProtonCharge.
Definition at line 221 of file LogManager.h.
Referenced by addProperty(), Mantid::API::Run::getProtonCharge(), and Mantid::API::Run::setProtonCharge().
|
staticprotected |
Flag to signify if a filter has been applied to the proton charge log.
Definition at line 223 of file LogManager.h.
Referenced by Mantid::API::Run::getProtonCharge(), and Mantid::API::Run::integrateProtonCharge().