ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
python.trfUtils.Job Class Reference

Job: a set of pieces of information relevant to a given work function. More...

Inheritance diagram for python.trfUtils.Job:
Collaboration diagram for python.trfUtils.Job:

Public Member Functions

def __init__ (self, workFunction=None, workFunctionKeywordArguments={}, workFunctionTimeout=None, name=None)
 initialisation method More...
 
def name (self)
 
def __str__ (self)
 return an object self description string More...
 
def printout (self)
 print in a human-readable way the items of the object self More...
 

Public Attributes

 workFunction
 
 workFunctionKeywordArguments
 
 workFunctionTimeout
 
 className
 
 resultGetter
 

Private Attributes

 _name
 

Detailed Description

Job: a set of pieces of information relevant to a given work function.

A Job object is a set of pieces of information relevant to a given work function. A Job object comprises a name, a work function, work function arguments, the work function timeout specification, a multiprocessing.Pool.apply_async() object and, ultimately, a result object.

Parameters
namethe Job object name
workFunctionthe work function object
workFunctionArgumentsthe work function keyword arguments dictionary
workFunctionTimeoutthe work function timeout specification in seconds

Definition at line 723 of file trfUtils.py.

Constructor & Destructor Documentation

◆ __init__()

def python.trfUtils.Job.__init__ (   self,
  workFunction = None,
  workFunctionKeywordArguments = {},
  workFunctionTimeout = None,
  name = None 
)

initialisation method

Definition at line 726 of file trfUtils.py.

726  def __init__(
727  self,
728  workFunction = None,
729  workFunctionKeywordArguments = {},
730  workFunctionTimeout = None,
731  name = None,
732  ):
733  self.workFunction = workFunction
734  self.workFunctionKeywordArguments = workFunctionKeywordArguments
735  self.workFunctionTimeout = workFunctionTimeout
736  self.className = self.__class__.__name__
737  self.resultGetter = None
738  if name is None:
739  self._name = uniqueIdentifier()
740  else:
741  self._name = name
742  if self.workFunction is None:
743  exceptionMessage = "work function not specified"
744  msg.error("{notifier}: exception message: {exceptionMessage}".format(
745  notifier = self.className,
746  exceptionMessage = exceptionMessage
747  ))
748  raise trfExceptions.TransformInternalException(
749  trfExit.nameToCode('TRF_INTERNAL'),
750  exceptionMessage
751  )
752 

Member Function Documentation

◆ __str__()

def python.trfUtils.Job.__str__ (   self)

return an object self description string

This method returns an object description string consisting of a listing of the items of the object self.

Returns
object description string

Definition at line 761 of file trfUtils.py.

761  def __str__(self):
762  descriptionString = ""
763  for key, value in sorted(vars(self).items()):
764  descriptionString += str("{key}:{value} ".format(
765  key = key,
766  value = value)
767  )
768  return descriptionString
769 

◆ name()

def python.trfUtils.Job.name (   self)

Definition at line 754 of file trfUtils.py.

754  def name(self):
755  return self._name
756 

◆ printout()

def python.trfUtils.Job.printout (   self)

print in a human-readable way the items of the object self

This function prints in a human-readable way the items of the object self.

Definition at line 773 of file trfUtils.py.

773  def printout(self):
774  printHR(vars(self))
775 
776 

Member Data Documentation

◆ _name

python.trfUtils.Job._name
private

Definition at line 733 of file trfUtils.py.

◆ className

python.trfUtils.Job.className

Definition at line 730 of file trfUtils.py.

◆ resultGetter

python.trfUtils.Job.resultGetter

Definition at line 731 of file trfUtils.py.

◆ workFunction

python.trfUtils.Job.workFunction

Definition at line 727 of file trfUtils.py.

◆ workFunctionKeywordArguments

python.trfUtils.Job.workFunctionKeywordArguments

Definition at line 728 of file trfUtils.py.

◆ workFunctionTimeout

python.trfUtils.Job.workFunctionTimeout

Definition at line 729 of file trfUtils.py.


The documentation for this class was generated from the following file:
python.trfUtils.printHR
def printHR(the_object)
print in a human-readable way the items of a given object
Definition: trfUtils.py:660
vtune_athena.format
format
Definition: vtune_athena.py:14
python.trfUtils.uniqueIdentifier
def uniqueIdentifier()
return a URL-safe, base 64-encoded pseudorandom UUID
Definition: trfUtils.py:678
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11