Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
MantidQt::MantidWidgets::LogValueFinder Class Reference

MDFLogValueFinder : Holds a collection of workspace names, and finds log values from them. More...

#include <LogValueFinder.h>

Public Member Functions

std::vector< std::string > getLogNames () const
 Get log names from workspaces. More...
 
double getLogValue (const QString &logName, const Mantid::Kernel::Math::StatisticType &function, const QString &wsName) const
 Get log value from workspace name. More...
 
double getLogValue (const QString &logName, const Mantid::Kernel::Math::StatisticType &function, int index) const
 Get log value from workspace position in list. More...
 
 LogValueFinder (QStringList wsNames)
 Constructor. More...
 

Private Attributes

const QStringList m_wsNames
 Workspace names. More...
 

Detailed Description

MDFLogValueFinder : Holds a collection of workspace names, and finds log values from them.

Definition at line 19 of file LogValueFinder.h.

Constructor & Destructor Documentation

◆ LogValueFinder()

MantidQt::MantidWidgets::LogValueFinder::LogValueFinder ( QStringList  wsNames)
explicit

Constructor.

Parameters
wsNames:: [input] Workspace names

Definition at line 24 of file LogValueFinder.cpp.

Member Function Documentation

◆ getLogNames()

std::vector< std::string > MantidQt::MantidWidgets::LogValueFinder::getLogNames ( ) const

Get log names from workspaces.

Get names of all logs from the first workspace Note:

  • No guarantee that other workspaces share these logs
  • Names of all logs are returned, not just those convertible to double
    Returns
    :: List of log names

Definition at line 33 of file LogValueFinder.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), m_wsNames, Mantid::API::MatrixWorkspace::size(), and workspace.

◆ getLogValue() [1/2]

double MantidQt::MantidWidgets::LogValueFinder::getLogValue ( const QString &  logName,
const Mantid::Kernel::Math::StatisticType function,
const QString &  wsName 
) const

Get log value from workspace name.

Get value of log from workspace with given name.

Parameters
logName:: [input] Name of log
function:: [input] Function to apply to log e.g. min, max, mean...
wsName:: [input] Name of workspace
Returns
:: value of log cast to double
Exceptions
std::runtime_errorif log cannot be found or cast
std::invalid_argumentif workspace not found

Definition at line 80 of file LogValueFinder.cpp.

References Mantid::API::LogManager::getLogAsSingleValue(), Mantid::Kernel::SingletonHolder< T >::Instance(), Mantid::API::ExperimentInfo::run(), and workspace.

◆ getLogValue() [2/2]

double MantidQt::MantidWidgets::LogValueFinder::getLogValue ( const QString &  logName,
const Mantid::Kernel::Math::StatisticType function,
int  index 
) const

Get log value from workspace position in list.

Get value of log from workspace at given index.

Parameters
logName:: [input] Name of log
function:: [input] Function to apply to log e.g. min, max, mean...
index:: [input] Index of workspace in list
Returns
:: value of log cast to double
Exceptions
std::runtime_errorif log cannot be found or cast
std::invalid_argumentif index is not in range

Definition at line 60 of file LogValueFinder.cpp.

References getLogValue(), index, and m_wsNames.

Referenced by getLogValue().

Member Data Documentation

◆ m_wsNames

const QStringList MantidQt::MantidWidgets::LogValueFinder::m_wsNames
private

Workspace names.

Definition at line 33 of file LogValueFinder.h.

Referenced by getLogNames(), and getLogValue().


The documentation for this class was generated from the following files: