LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | List of all members
lsst.pipe.base.cmdLineTask.ButlerInitializedTaskRunner Class Reference

A TaskRunner for CmdLineTasks that require a 'butler' keyword argument to be passed to their constructor. More...

Inheritance diagram for lsst.pipe.base.cmdLineTask.ButlerInitializedTaskRunner:
lsst.pipe.base.cmdLineTask.TaskRunner

Public Member Functions

def makeTask
 A variant of the base version that passes a butler argument to the task's constructor. More...
 
- Public Member Functions inherited from lsst.pipe.base.cmdLineTask.TaskRunner
def __init__
 Construct a TaskRunner. More...
 
def prepareForMultiProcessing
 Prepare this instance for multiprocessing by removing optional non-picklable elements. More...
 
def run
 Run the task on all targets. More...
 
def makeTask
 Create a Task instance. More...
 
def precall
 Hook for code that should run exactly once, before multiprocessing is invoked. More...
 
def __call__
 Run the Task on a single target. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from lsst.pipe.base.cmdLineTask.TaskRunner
def getTargetList
 Return a list of (dataRef, kwargs) to be used as arguments for TaskRunner. More...
 
- Public Attributes inherited from lsst.pipe.base.cmdLineTask.TaskRunner
 TaskClass
 
 doReturnResults
 
 config
 
 log
 
 doRaise
 
 clobberConfig
 
 numProcesses
 
 timeout
 
- Static Public Attributes inherited from lsst.pipe.base.cmdLineTask.TaskRunner
int TIMEOUT = 9999
 

Detailed Description

A TaskRunner for CmdLineTasks that require a 'butler' keyword argument to be passed to their constructor.

Definition at line 334 of file cmdLineTask.py.

Member Function Documentation

def lsst.pipe.base.cmdLineTask.ButlerInitializedTaskRunner.makeTask (   self,
  parsedCmd = None,
  args = None 
)

A variant of the base version that passes a butler argument to the task's constructor.

Parameters
[in]parsedCmdparsed command-line options, as returned by the argument parser; if specified then args is ignored
[in]argsother arguments; if parsedCmd is None then this must be specified
Exceptions
RuntimeErrorif parsedCmd and args are both None

Definition at line 338 of file cmdLineTask.py.

339  def makeTask(self, parsedCmd=None, args=None):
340  """!A variant of the base version that passes a butler argument to the task's constructor
341 
342  @param[in] parsedCmd parsed command-line options, as returned by the argument parser;
343  if specified then args is ignored
344  @param[in] args other arguments; if parsedCmd is None then this must be specified
345 
346  @throw RuntimeError if parsedCmd and args are both None
347  """
348  if parsedCmd is not None:
349  butler = parsedCmd.butler
350  elif args is not None:
351  dataRef, kwargs = args
352  butler = dataRef.butlerSubset.butler
353  else:
354  raise RuntimeError("parsedCmd or args must be specified")
355  return self.TaskClass(config=self.config, log=self.log, butler=butler)
def makeTask
A variant of the base version that passes a butler argument to the task's constructor.
Definition: cmdLineTask.py:338

The documentation for this class was generated from the following file: