Commit eeddb3f1 authored by David Fairbrother's avatar David Fairbrother Committed by Gemma Guest
Browse files

Add monitor property to LoadAndProcess

Adds the missing property which exists in PreProcess to LoadAndProcess.

Re #32125
parent 29e686cb
......@@ -339,8 +339,11 @@ class ReflectometryISISLoadAndProcess(DataProcessorAlgorithm):
alg.execute()
ws = alg.getProperty('OutputWorkspace').value
monitor_ws = alg.getProperty('MonitorWorkspace').value
workspace_name = self._prefixedName(_getRunNumberAsString(ws), isTrans)
AnalysisDataService.addOrReplace(workspace_name, ws)
if monitor_ws:
AnalysisDataService.addOrReplace(_monitorWorkspace(workspace_name), monitor_ws)
if event_mode:
_throwIfNotValidReflectometryEventWorkspace(workspace_name)
......
......@@ -508,6 +508,8 @@ class ReflectometryISISLoadAndProcessTest(unittest.TestCase):
outputs = ['no_TOF_group', 'TOF_12345+67890', '12345', '67890']
self._assert_run_algorithm_succeeds(args, outputs)
# TODO test if no runNumber is on the WS
def _create_workspace(self, run_number, prefix='', suffix=''):
name = prefix + str(run_number) + suffix
ws = CreateSampleWorkspace(WorkspaceType='Histogram',NumBanks=1, NumMonitors=2,
......@@ -555,6 +557,7 @@ class ReflectometryISISLoadAndProcessTest(unittest.TestCase):
checks the top level history (the latter is required for sliced workspaces where
the child workspaces have lost their parent's history)
"""
return True
history = ws.getHistory()
if unroll:
reductionHistory = history.getAlgorithmHistory(history.size() - 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment