Mantid
|
#include <RunCombinationHelper.h>
Public Member Functions | |
std::string | checkCompatibility (const API::MatrixWorkspace_sptr &, bool checkNumberHistograms=false) |
Compares the properties of the input workspace with the reference. More... | |
void | setReferenceProperties (const API::MatrixWorkspace_sptr &) |
Sets the properties of the reference (usually first) workspace, to later check the compatibility of the others with the reference. More... | |
std::list< API::MatrixWorkspace_sptr > | validateInputWorkspaces (const std::vector< std::string > &inputWorkspaces, Kernel::Logger &g_log) |
Checks that the input workspace all exist, that they are the same size, have the same units and the same instrument name. More... | |
Static Public Member Functions | |
static std::vector< std::string > | unWrapGroups (const std::vector< std::string > &) |
Flattens the list of group workspaces (if any) into list of workspaces. More... | |
Private Attributes | |
std::vector< bool > | m_hasDx |
std::string | m_instrumentName |
bool | m_isDistribution |
bool | m_isHistogramData |
bool | m_isScanning |
size_t | m_numberDetectors |
size_t | m_numberSpectra |
std::string | m_spectrumAxisUnit |
std::string | m_xUnit |
std::string | m_yUnit |
Definition at line 31 of file RunCombinationHelper.h.
std::string Mantid::Algorithms::RunCombinationHelper::checkCompatibility | ( | const API::MatrixWorkspace_sptr & | ws, |
bool | checkNumberHistograms = false |
||
) |
Compares the properties of the input workspace with the reference.
ws | : the testee workspace |
checkNumberHistograms | : whether to check also the number of histograms |
Definition at line 79 of file RunCombinationHelper.cpp.
References m_hasDx, m_instrumentName, m_isDistribution, m_isHistogramData, m_isScanning, m_numberDetectors, m_numberSpectra, m_spectrumAxisUnit, m_xUnit, and m_yUnit.
Referenced by Mantid::Algorithms::ConjoinXRuns::validateInputs(), Mantid::Algorithms::Stitch::validateInputs(), Mantid::Algorithms::Stitch1D::validateInputs(), Mantid::Algorithms::Stitch1DMany::validateInputs(), Mantid::Algorithms::MergeRuns::validateInputsForEventWorkspaces(), and validateInputWorkspaces().
void Mantid::Algorithms::RunCombinationHelper::setReferenceProperties | ( | const API::MatrixWorkspace_sptr & | ref | ) |
Sets the properties of the reference (usually first) workspace, to later check the compatibility of the others with the reference.
ref | : the reference workspace |
Definition at line 56 of file RunCombinationHelper.cpp.
References m_hasDx, m_instrumentName, m_isDistribution, m_isHistogramData, m_isScanning, m_numberDetectors, m_numberSpectra, m_spectrumAxisUnit, m_xUnit, and m_yUnit.
Referenced by Mantid::Algorithms::ConjoinXRuns::validateInputs(), Mantid::Algorithms::Stitch::validateInputs(), Mantid::Algorithms::Stitch1D::validateInputs(), Mantid::Algorithms::Stitch1DMany::validateInputs(), Mantid::Algorithms::MergeRuns::validateInputsForEventWorkspaces(), and validateInputWorkspaces().
|
static |
Flattens the list of group workspaces (if any) into list of workspaces.
inputs | : input workspaces vector [including] group workspaces (all must be on ADS) |
std::runtime_error if the input workspaces are neither groups nor MatrixWorkspaces |
Definition at line 31 of file RunCombinationHelper.cpp.
References Mantid::API::WorkspaceGroup::getNames(), and Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by Mantid::Algorithms::ConjoinXRuns::exec(), Mantid::Algorithms::MergeRuns::exec(), Mantid::Algorithms::Stitch::exec(), Mantid::Algorithms::SumOverlappingTubes::getInputParameters(), Mantid::Algorithms::ConjoinXRuns::validateInputs(), Mantid::Algorithms::Stitch::validateInputs(), and Mantid::Algorithms::Stitch1DMany::validateInputs().
std::list< API::MatrixWorkspace_sptr > Mantid::Algorithms::RunCombinationHelper::validateInputWorkspaces | ( | const std::vector< std::string > & | inputWorkspaces, |
Kernel::Logger & | g_log | ||
) |
Checks that the input workspace all exist, that they are the same size, have the same units and the same instrument name.
Will throw if they don't.
inputWorkspaces | The names of the input workspaces |
g_log | A logger to send error messages to |
Exception::NotFoundError | If an input workspace doesn't exist |
std::invalid_argument | If the input workspaces are not compatible |
Definition at line 124 of file RunCombinationHelper.cpp.
References checkCompatibility(), Mantid::Kernel::Logger::error(), Mantid::API::g_log, Mantid::Kernel::SingletonHolder< T >::Instance(), and setReferenceProperties().
Referenced by Mantid::Algorithms::MergeRuns::execHistogram(), and Mantid::Algorithms::SumOverlappingTubes::getInputParameters().
|
private |
Definition at line 49 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 45 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 47 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 46 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 48 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 41 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 40 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 44 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 42 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().
|
private |
Definition at line 43 of file RunCombinationHelper.h.
Referenced by checkCompatibility(), and setReferenceProperties().