ATLAS Offline Software
Loading...
Searching...
No Matches
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 Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

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

Public Attributes

 workFunction = workFunction
 workFunctionKeywordArguments = workFunctionKeywordArguments
 workFunctionTimeout = workFunctionTimeout
 className = self.__class__.__name__
 resultGetter = None

Protected Attributes

 _name = uniqueIdentifier()

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.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

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

initialisation method

Definition at line 726 of file trfUtils.py.

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__()

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()

python.trfUtils.Job.name ( self)

Definition at line 754 of file trfUtils.py.

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

◆ printout()

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 = uniqueIdentifier()
protected

Definition at line 739 of file trfUtils.py.

◆ className

python.trfUtils.Job.className = self.__class__.__name__

Definition at line 736 of file trfUtils.py.

◆ resultGetter

python.trfUtils.Job.resultGetter = None

Definition at line 737 of file trfUtils.py.

◆ workFunction

python.trfUtils.Job.workFunction = workFunction

Definition at line 733 of file trfUtils.py.

◆ workFunctionKeywordArguments

python.trfUtils.Job.workFunctionKeywordArguments = workFunctionKeywordArguments

Definition at line 734 of file trfUtils.py.

◆ workFunctionTimeout

python.trfUtils.Job.workFunctionTimeout = workFunctionTimeout

Definition at line 735 of file trfUtils.py.


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