Skip to content
Snippets Groups Projects
Commit 53471dcc authored by Verena Reimund's avatar Verena Reimund
Browse files

Comments & input check for grouped workspaces

RunCombinationHelper checks, if the ws is a GroupWorkspace or else a MatrixWorkspace. Workspaces of the group were not checked and need to be checked during validation

Refs #22383
parent ede92a87
No related branches found
No related tags found
No related merge requests found
......@@ -114,17 +114,21 @@ std::map<std::string, std::string> ConjoinXRuns::validateInputs() {
m_logEntry = getPropertyValue(SAMPLE_LOG_X_AXIS_PROPERTY);
std::vector<std::string> workspaces;
try {
try { // input workspace must be a group or a MatrixWorkspace
workspaces = RunCombinationHelper::unWrapGroups(inputs_given);
} catch (const std::exception &e) {
issues[INPUT_WORKSPACE_PROPERTY] = std::string(e.what());
}
// find if there are workspaces that are not Matrix or not a point-data
// find if there are grouped workspaces that are not Matrix or not a
// point-data
for (const auto &input : workspaces) {
MatrixWorkspace_sptr ws =
AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(input);
if (ws->isHistogramData()) {
if (!ws) {
issues[INPUT_WORKSPACE_PROPERTY] +=
"Workspace " + input + " is not a MatrixWorkspace\n";
} else if (ws->isHistogramData()) {
issues[INPUT_WORKSPACE_PROPERTY] +=
"Workspace " + ws->getName() + " is not a point-data\n";
} else {
......@@ -186,7 +190,8 @@ std::string ConjoinXRuns::checkLogEntry(MatrixWorkspace_sptr ws) const {
try {
run.getLogAsSingleValue(m_logEntry);
// try if numeric time series, then the size must match to the blocksize
// try if numeric time series, then the size must match to the
// blocksize
const int blocksize = static_cast<int>(ws->blocksize());
TimeSeriesProperty<double> *timeSeriesDouble(nullptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment