parameters: (self, run, isTrans)
return_statement: return workspace_name
docstring: Load a run as an event workspace if slicing is requested, or a histogram
          workspace otherwise. Transmission runs are always loaded as histogram workspaces.
docstring_summary: Load a run as an event workspace if slicing is requested, or a histogram
          workspace otherwise. Transmission runs are always loaded as histogram workspaces.
docstring_tokens: Load a run as an event workspace if slicing is requested or a histogram workspace otherwise . Transmission runs are always loaded as histogram workspaces .
function: def _loadRun(self, run, isTrans):
          """Load a run as an event workspace if slicing is requested, or a histogram
          workspace otherwise. Transmission runs are always loaded as histogram workspaces."""
          event_mode = not isTrans and self._slicingEnabled()
          args = {'InputRunList': [run], 'EventMode': event_mode}
          alg = self.createChildAlgorithm('ReflectometryISISPreprocess', **args)
          alg.setRethrows(True)
          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)
              self.log().information('Loaded event workspace ' + workspace_name)
          else:
              self.log().information('Loaded workspace ' + workspace_name)
          return workspace_name
function_tokens: def _loadRun ( self , run , isTrans ) : event_mode = not isTrans and self . _slicingEnabled ( ) args = { 'InputRunList' : [ run ] , 'EventMode' : event_mode } alg = self . createChildAlgorithm ( 'ReflectometryISISPreprocess' , * * args ) alg . setRethrows ( True ) 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 ) self . log ( ) . information ( 'Loaded event workspace ' + workspace_name ) else : self . log ( ) . information ( 'Loaded workspace ' + workspace_name ) return workspace_name