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. More... | |
void | addLogData (std::unique_ptr< Kernel::Property > p, bool overwrite=false) |
Add a log entry. More... | |
template<class TYPE > | |
void | addProperty (const std::string &name, const TYPE &value, bool overwrite=false) |
Add a property of given type. More... | |
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. More... | |
void | addProperty (Kernel::Property *prop, bool overwrite=false) |
Add data to the object in the form of a property. More... | |
void | addProperty (std::unique_ptr< Kernel::Property > prop, bool overwrite=false) |
Add data to the object in the form of a property. More... | |
void | clearLogs () |
Clear the logs. More... | |
void | clearOutdatedTimeSeriesLogValues () |
Empty all but the last value out of all TimeSeriesProperty logs. More... | |
void | clearTimeSeriesLogs () |
Empty the values out of all TimeSeriesProperty logs. More... | |
const Types::Core::DateAndTime | endTime () const |
Return the run end time. More... | |
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. More... | |
virtual void | filterByTime (const Types::Core::DateAndTime start, const Types::Core::DateAndTime stop) |
Filter the logs by time. More... | |
Kernel::TimeSeriesProperty< bool > * | getInvalidValuesFilter (const std::string &logName) const |
returns the invalid values log if the log has a matching invalid values log filter More... | |
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. More... | |
Kernel::Property * | getLogData (const std::string &name) const |
Access a single log entry. More... | |
virtual size_t | getMemorySize () const |
Return an approximate memory size for the object in bytes. More... | |
const std::vector< Kernel::Property * > & | getProperties () const |
Return all of the current properties. More... | |
Kernel::Property * | getProperty (const std::string &name) const |
Returns the named property as a pointer. More... | |
int | getPropertyAsIntegerValue (const std::string &name) const |
Returns a property as an integer value. More... | |
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. More... | |
template<typename HeldType > | |
HeldType | getPropertyValueAsType (const std::string &name) const |
Get the value of a property as the given TYPE. More... | |
double | getTimeAveragedStd (const std::string &name) const |
Get the time averaged standard deviation for a log. More... | |
template<typename T > | |
Kernel::TimeSeriesProperty< T > * | getTimeSeriesProperty (const std::string &name) const |
Returns a property as a time series property. More... | |
bool | hasInvalidValuesFilter (const std::string &logName) const |
returns true if the log has a matching invalid values log filter More... | |
bool | hasProperty (const std::string &name) const |
Does the property exist on the object. More... | |
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. More... | |
virtual void | loadNexus (::NeXus::File *file, const std::string &group, const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, const std::string &prefix, bool keepOpen=false) |
Load the run from a NeXus file with a given group name. More... | |
LogManager () | |
LogManager (const LogManager &other) | |
bool | operator!= (const LogManager &other) const |
LogManager & | operator= (const LogManager &other) |
bool | operator== (const LogManager &other) const |
void | removeLogData (const std::string &name, const bool delproperty=true) |
Remove a named log entry. More... | |
void | removeProperty (const std::string &name, bool delProperty=true) |
Remove a named property. More... | |
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. More... | |
void | setStartAndEndTime (const Types::Core::DateAndTime &start, const Types::Core::DateAndTime &end) |
Set the run start and end. More... | |
virtual void | splitByTime (Kernel::TimeSplitterType &splitter, std::vector< LogManager * > outputs) const |
Split the logs based on the given intervals. More... | |
const Types::Core::DateAndTime | startTime () const |
Return the run start time. More... | |
virtual | ~LogManager () |
Destructor. More... | |
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. More... | |
Protected Member Functions | |
void | loadNexus (::NeXus::File *file, const Mantid::Kernel::NexusHDF5Descriptor &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. More... | |
Protected Attributes | |
std::unique_ptr< Kernel::PropertyManager > | m_manager |
A pointer to a property manager. More... | |
Static Protected Attributes | |
static const char * | PROTON_CHARGE_LOG_NAME = "gd_prtn_chrg" |
Name of the log entry containing the proton charge when retrieved using getProtonCharge. More... | |
Private Attributes | |
std::unique_ptr< Kernel::Cache< std::pair< std::string, Kernel::Math::StatisticType >, double > > | m_singleValueCache |
Cache for the retrieved single values. More... | |
This class contains the information about the log entries.
Definition at line 44 of file LogManager.h.
Mantid::API::LogManager::LogManager | ( | ) |
Definition at line 96 of file LogManager.cpp.
Mantid::API::LogManager::LogManager | ( | const LogManager & | other | ) |
Definition at line 101 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 115 of file LogManager.h.
References addLogData().
Referenced by addLogData(), Mantid::DataHandling::ISISRunLogs::addPeriodLog(), Mantid::DataHandling::ISISRunLogs::addPeriodLogs(), Mantid::DataHandling::LoadHFIRSANS::addRunTimeSeriesProperty(), Mantid::Algorithms::AddSampleLog::addSingleValueProperty(), Mantid::DataHandling::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::FilterEventsByLogValuePreNexus::setProtonCharge(), 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 122 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 219 of file LogManager.h.
References addProperty(), 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 233 of file LogManager.h.
References addProperty(), and value.
|
inline |
Add data to the object in the form of a property.
Definition at line 79 of file LogManager.h.
Referenced by Mantid::DataHandling::LoadILLTOF2::addAllNexusFieldsAsProperties(), Mantid::DataHandling::LoadILLTOF2::addEnergyToRun(), Mantid::MDAlgorithms::ConvertToMD::addExperimentInfo(), Mantid::DataHandling::LoadILLTOF2::addFacility(), Mantid::DataHandling::ISISRunLogs::addPeriodLogs(), addProperty(), Mantid::Algorithms::SampleLogsBehaviour::addPropertyForList(), Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), Mantid::DataHandling::LoadILLTOF2::addPulseInterval(), WorkspaceCreationHelper::addTSPEntry(), Mantid::Crystal::LoadIsawPeaks::appendFile(), Mantid::MDAlgorithms::MDWSTransform::buildQTrahsf(), Mantid::Algorithms::ConvertUnits::convertViaTOF(), Mantid::Algorithms::AddLogDerivative::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::LoadILLSANS::loadDataFromD16ScanMonitors(), Mantid::DataHandling::LoadILLSANS::loadDataFromMonitors(), Mantid::DataHandling::LoadEMU< FD >::loadDopplerParameters(), Mantid::DataHandling::LoadILLSANS::loadMetaData(), Mantid::API::Run::loadNexusCommon(), Mantid::DataHandling::LoadILLIndirect2::loadNexusEntriesIntoProperties(), Mantid::DataHandling::LoadNexusLogs::loadNPeriods(), Mantid::DataHandling::LoadPLN::loadParameters(), Mantid::DataHandling::LoadMuonNexusV2::loadPeriodInfo(), Mantid::DataHandling::LoadISISNexusHelper::loadRunDetails(), Mantid::DataHandling::LoadMuonNexus1::loadRunDetails(), Mantid::DataHandling::LoadMuonNexus2::loadRunDetails(), Mantid::DataHandling::LoadLLB::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::LoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadSwans::setMetaDataAsWorkspaceProperties(), Mantid::API::Run::setProtonCharge(), Mantid::API::MatrixWorkspace::setTitle(), Mantid::DataHandling::LoadEMU< Kernel::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 247 of file LogManager.cpp.
References hasProperty(), m_manager, 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 429 of file LogManager.cpp.
References getProperties().
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 412 of file LogManager.cpp.
References getProperties().
const Types::Core::DateAndTime Mantid::API::LogManager::endTime | ( | ) | const |
Return the run end time.
Return the run end time as given by the 'end_time' or 'run_end' property.
'end_time' is tried first, falling back to 'run_end' if the former isn't found.
std::runtime_error | if neither property is defined |
Definition at line 165 of file LogManager.cpp.
References getProperty(), hasProperty(), and value.
Referenced by export_Run(), and Mantid::API::ExperimentInfo::getAvailableWorkspaceEndDate().
void Mantid::API::LogManager::filterByLog | ( | const Kernel::TimeSeriesProperty< bool > & | filter, |
const std::vector< std::string > & | excludedFromFiltering = std::vector<std::string>() |
||
) |
Filter the run by the given boolean log.
It replaces all time series properties with filtered time series properties
filter | :: A boolean time series to filter each log on |
excludedFromFiltering | :: A string list of logs that will be excluded from filtering |
Definition at line 231 of file LogManager.cpp.
References m_manager, and m_singleValueCache.
Referenced by Mantid::DataHandling::ISISRunLogs::applyLogFiltering().
|
virtual |
Filter the logs by time.
Filter out a run by time.
Takes out any TimeSeriesProperty log entries outside of the given absolute time range.
start | :: Absolute start time. Any log entries at times >= to this time are kept. |
stop | :: Absolute stop time. Any log entries at times < than this time are kept. |
Reimplemented in Mantid::API::Run.
Definition at line 196 of file LogManager.cpp.
References m_manager.
Referenced by Mantid::API::Run::filterByTime().
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 576 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 565 of file LogManager.cpp.
References Mantid::Kernel::PropertyManager::getInvalidValuesFilterLogName().
Referenced by getInvalidValuesFilter(), and hasInvalidValuesFilter().
|
inline |
name | :: The name of the property |
statistic | :: Defines how to calculate the single value from series (default=Mean) |
Definition at line 149 of file LogManager.h.
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 134 of file LogManager.h.
Referenced by export_Run(), and getInvalidValuesFilter().
|
inline |
Access a single log entry.
name | :: The name of the log entry to retrieve |
Definition at line 129 of file LogManager.h.
Referenced by Mantid::Algorithms::CompareWorkspaces::checkRunProperties(), Mantid::DataHandling::SaveCanSAS1D::createSASProcessElement(), Mantid::DataHandling::SaveCanSAS1D2::createSASProcessElement(), Mantid::Algorithms::CopyLogs::exec(), Mantid::Algorithms::FilterBadPulses::exec(), Mantid::Algorithms::NormaliseByCurrent::extractCharge(), Mantid::API::LogFilterGenerator::filterByPeriod(), Mantid::API::LogFilterGenerator::getLogData(), Mantid::DataHandling::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 292 of file LogManager.cpp.
References m_manager.
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 287 of file LogManager.cpp.
References m_manager.
Referenced by clearOutdatedTimeSeriesLogValues(), clearTimeSeriesLogs(), export_Run(), Mantid::DataHandling::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 404 of file LogManager.cpp.
References m_manager.
Referenced by Mantid::Algorithms::AddSampleLog::addSingleValueProperty(), Mantid::Algorithms::AddSampleLog::addStringLog(), Mantid::Algorithms::AddSampleLog::addTimeSeriesProperty(), Mantid::MDAlgorithms::SlicingAlgorithm::createTransform(), endTime(), Mantid::Algorithms::AddLogDerivative::exec(), Mantid::MDAlgorithms::LoadDNSSCD::exec(), export_Run(), Mantid::DataHandling::SaveGSS::generateInstrumentHeader(), Mantid::API::ExperimentInfo::getLog(), Mantid::Algorithms::PDDetermineCharacterizations::getLogValue(), Mantid::DataHandling::SaveGSS::getLogValue(), getPropertyAsIntegerValue(), getPropertyAsSingleValue(), getPropertyValueAsType(), getTimeSeriesProperty(), Mantid::API::MatrixWorkspace::getTitle(), Mantid::API::Run::integrateProtonCharge(), Mantid::API::Run::loadNexus(), Mantid::DataHandling::LoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::API::Run::setProtonCharge(), Mantid::Algorithms::AddSampleLog::setTimeSeriesData(), startTime(), Mantid::Algorithms::SampleLogsBehaviour::updateListProperty(), and Mantid::Algorithms::SampleLogsBehaviour::updateTimeSeriesProperty().
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 381 of file LogManager.cpp.
References getProperty(), and Mantid::Kernel::Property::value().
Referenced by Mantid::DataHandling::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 349 of file LogManager.cpp.
References getProperty(), and m_singleValueCache.
Referenced by Mantid::DataHandling::LoadILLTOF2::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 332 of file LogManager.cpp.
References getProperty().
Referenced by Mantid::DataHandling::LoadILLTOF2::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(), and Mantid::DataHandling::LoadILLDiffraction::setSampleLogs().
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 322 of file LogManager.cpp.
Referenced by export_Run().
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 |
Definition at line 308 of file LogManager.cpp.
References getProperty().
Referenced by Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), Mantid::DataHandling::ISISRunLogs::applyLogFiltering(), Mantid::DataHandling::LoadEMU< FD >::exec(), Mantid::DataHandling::LoadPLN::exec(), Mantid::API::MatrixWorkspace::getFirstPulseTime(), Mantid::API::MatrixWorkspace::getLastPulseTime(), Mantid::DataHandling::LoadEMU< FD >::loadDopplerParameters(), and Mantid::Algorithms::SampleLogsBehaviour::updateTimeSeriesProperty().
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 570 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 265 of file LogManager.cpp.
References m_manager.
Referenced by 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::Algorithms::ConvertSpectrumAxis2::getEfixed(), Mantid::DataHandling::ISISRunLogs::getLogNamesExcludedFromFiltering(), Mantid::Algorithms::PDDetermineCharacterizations::getLogValue(), Mantid::DataHandling::SaveGSS::getLogValue(), Mantid::Algorithms::Qxy::getQminFromWs(), Mantid::API::ExperimentInfo::getRunNumber(), hasInvalidValuesFilter(), Mantid::API::Run::integrateProtonCharge(), Mantid::API::Run::loadNexus(), Mantid::API::Run::loadNexusCommon(), Mantid::DataHandling::LoadNexusLogs::loadNPeriods(), Mantid::Algorithms::CopyLogs::mergeKeepExisting(), Mantid::Algorithms::CopyLogs::mergeReplaceExisting(), Mantid::DataHandling::LoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::API::Run::saveNexus(), Mantid::API::Run::setProtonCharge(), Mantid::DataHandling::LoadILLDiffraction::setSampleLogs(), startTime(), Mantid::MDAlgorithms::LoadDNSSCD::updateProperties(), and Mantid::DataHandling::LoadISISNexus2::validateMultiPeriodLogs().
|
protected |
Definition at line 497 of file LogManager.cpp.
References Mantid::Kernel::NexusHDF5Descriptor::getAllEntries().
|
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 542 of file LogManager.cpp.
References Mantid::Kernel::PropertyNexus::loadProperty(), and m_manager.
|
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 484 of file LogManager.cpp.
References loadNexus().
|
virtual |
Load the run from a NeXus file with a given group name.
Load the object from an open NeXus file.
Overload that uses NexusHDF5Descriptor for faster metadata lookup
file | currently opened NeXus file |
group | current group (relative name) |
fileInfo | descriptor with in-memory index with all entries |
prefix | indicates current group location in file (absolute name) |
keepOpen |
Not used.
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 471 of file LogManager.cpp.
Referenced by loadNexus(), and Mantid::API::Run::loadNexus().
bool Mantid::API::LogManager::operator!= | ( | const LogManager & | other | ) | const |
Definition at line 590 of file LogManager.cpp.
References m_manager.
LogManager & Mantid::API::LogManager::operator= | ( | const LogManager & | other | ) |
Definition at line 109 of file LogManager.cpp.
References m_manager, and m_singleValueCache.
Referenced by Mantid::API::Run::operator=().
bool Mantid::API::LogManager::operator== | ( | const LogManager & | other | ) | const |
Definition at line 588 of file LogManager.cpp.
References m_manager.
Referenced by Mantid::API::Run::operator==().
|
inline |
Remove a named log entry.
name | :: The name of the entry to remove |
delproperty | :: If true, delete the log entry |
Definition at line 140 of file LogManager.h.
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 275 of file LogManager.cpp.
References m_manager, and m_singleValueCache.
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 445 of file LogManager.cpp.
References Mantid::API::g_log, m_manager, 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 121 of file LogManager.cpp.
Referenced by Mantid::Algorithms::CreateSampleWorkspace::exec(), and export_Run().
|
virtual |
Split the logs based on the given intervals.
Split a run by time (splits the TimeSeriesProperties contained).
splitter | :: TimeSplitterType with the intervals and destinations. |
outputs | :: Vector of output runs. |
Reimplemented in Mantid::API::Run.
Definition at line 209 of file LogManager.cpp.
Referenced by Mantid::API::Run::splitByTime().
const Types::Core::DateAndTime Mantid::API::LogManager::startTime | ( | ) | const |
Return the run start time.
Return the run start time as given by the 'start_time' or 'run_start' property.
'start_time' is tried first, falling back to 'run_start' if the former isn't found.
std::runtime_error | if neither property is defined |
Definition at line 133 of file LogManager.cpp.
References getProperty(), hasProperty(), and value.
Referenced by Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), export_Run(), Mantid::API::ExperimentInfo::getAvailableWorkspaceStartDate(), Mantid::Algorithms::AddSampleLog::getRunStart(), Mantid::API::ExperimentInfo::getWorkspaceStartDate(), and Mantid::Algorithms::SampleLogsBehaviour::updateTimeSeriesProperty().
|
protected |
A pointer to a property manager.
Definition at line 198 of file LogManager.h.
Referenced by addProperty(), clearLogs(), Mantid::API::Run::clone(), filterByLog(), filterByTime(), getMemorySize(), getProperties(), getProperty(), Mantid::API::Run::getProtonCharge(), hasProperty(), loadNexus(), operator!=(), Mantid::API::Run::operator+=(), operator=(), operator==(), removeProperty(), saveNexus(), and splitByTime().
|
private |
Cache for the retrieved single values.
Definition at line 205 of file LogManager.h.
Referenced by filterByLog(), getPropertyAsSingleValue(), operator=(), and removeProperty().
|
staticprotected |
Name of the log entry containing the proton charge when retrieved using getProtonCharge.
Definition at line 201 of file LogManager.h.
Referenced by addProperty(), Mantid::API::Run::getProtonCharge(), and Mantid::API::Run::setProtonCharge().