Skip to content
Snippets Groups Projects
Commit 1b783798 authored by Ewan Cook's avatar Ewan Cook
Browse files

refs #23023 replace self.alg and related code

parent 009820c0
No related merge requests found
......@@ -13,22 +13,11 @@ class LModel(object):
def __init__(self):
self.run = 0
self.loaded_runs = {}
self.alg = None
def _load(self, inputs):
""" inputs is a dict mapping filepaths to output names """
if self.alg is not None:
raise RuntimeError("Loading already in progress")
self.alg = mantid.AlgorithmManager.create("LoadAscii")
self.alg.initialize()
self.alg.setAlwaysStoreInADS(False)
for path, output in iteritems(inputs):
self.alg.setProperty("Filename", path)
self.alg.setProperty("OutputWorkspace", output)
self.alg.execute()
mantid.AnalysisDataService.addOrReplace(
output, self.alg.getProperty("OutputWorkspace").value)
self.alg = None
mantid.LoadAscii(path, OutputWorkspace=output)
def load_run(self):
to_load = search_user_dirs(self.run)
......@@ -45,8 +34,7 @@ class LModel(object):
return
def cancel(self):
if self.alg is not None:
self.alg.cancel()
return
def loadData(self, inputs):
return
......
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