def dataLineEditValidate(cls): run_sequence = cls.ui.dataLineEdit.text() oListRuns = RunSequenceBreaker(run_sequence) _list_runs = oListRuns.getFinalList() cls.list_runs = _list_runs cls.ui.dataLineEdit.setText("") cls.list_filename = [] cls.list_nxs = [] if _list_runs[0] == -1: return for _runs in _list_runs: try: _filename = nexus_utilities.findNeXusFullPath(_runs) except: pass else: cls.list_filename.append(_filename) randomString = utilities.generate_random_workspace_name() _nxs = LoadEventNexus(Filename=_filename, OutputWorkspace=randomString, MetaDataOnly=True) cls.list_nxs.append(_nxs) cls.str_list_runs.append(str(_runs)) cls.updateDataTable() cls.updateInsertValidRunsButton()
def __init__(self, runs_string = None): if list_runs == None: return '' oListRuns = RunSequenceBreaker(list_runs) list_run_number = oListRuns.getFinalList() for run_number in list_run_number: try: full_file_name = nexus_utilities.findNeXusFullPath(int(run_number)) self.nexus_found.append(full_file_name) except: run_number_found.append(run_number)