ATLAS Offline Software
Loading...
Searching...
No Matches
python.trfUtils.JobGroup Class Reference

JobGroup: a set of Job objects and pieces of information relevant to a given set of Job objects. More...

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

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, jobs=None, name=None, timeout=None)
 initialisation method
 name (self)
 __str__ (self)
 return an object self description string @ detail This method returns an object description string consisting of a listing of the items of the object self.
 timeoutStatus (self)
 return Boolean JobGroup timeout status
 printout (self)
 print in a human-readable way the items of the object self

Public Attributes

 jobs = jobs
 className = self.__class__.__name__
bool completeStatus = False
 timeStampSubmission = None
int timeout = 0
list results = []

Protected Attributes

 _name = uniqueIdentifier()

Detailed Description

JobGroup: a set of Job objects and pieces of information relevant to a given set of Job objects.

A JobGroup is a set of Job objects and pieces of information relevant to a given set of Job objects. A JobGroup object comprises a name, a list of Job objects, a timeout and, ultimately, an ordered list of result objects. The timeout can be speecified or derived from the summation of the timeout specifications of the set of Job objects.

Parameters
namethe JobGroup object name
jobsthe list of Job objects
timeoutthe JobGroup object timeout specification in seconds

Definition at line 787 of file trfUtils.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

python.trfUtils.JobGroup.__init__ ( self,
jobs = None,
name = None,
timeout = None )

initialisation method

Definition at line 790 of file trfUtils.py.

795 ):
796 self.jobs = jobs
797 self.className = self.__class__.__name__
798 self.completeStatus = False
799 self.timeStampSubmission = None
800 if name is None:
801 self._name = uniqueIdentifier()
802 else:
803 self._name = name
804 #self.timeStampSubmissionComplete = None #delete
805 if timeout is None:
806 self.timeout = 0
807 for job in self.jobs:
808 self.timeout += job.workFunctionTimeout
809 self.results = []
810

Member Function Documentation

◆ __str__()

python.trfUtils.JobGroup.__str__ ( self)

return an object self description string @ detail 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 819 of file trfUtils.py.

819 def __str__(self):
820 descriptionString = ""
821 for key, value in sorted(vars(self).items()):
822 descriptionString += str("{key}:{value} ".format(
823 key = key,
824 value = value)
825 )
826 return descriptionString
827

◆ name()

python.trfUtils.JobGroup.name ( self)

Definition at line 812 of file trfUtils.py.

812 def name(self):
813 return self._name
814

◆ printout()

python.trfUtils.JobGroup.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 850 of file trfUtils.py.

850 def printout(self):
851 printHR(vars(self))
852
853

◆ timeoutStatus()

python.trfUtils.JobGroup.timeoutStatus ( self)

return Boolean JobGroup timeout status

This method returns the timeout status of a JobGroup object. If the JobGroup object has not timed out, the Boolean False is returned. If the JobGroup object has timed out, the Boolean True is returned. If the JobGroup object has been completed or is not submitted, the Boolean False is returned.

Returns
Boolean indicating the JobGroup timeout status

Definition at line 835 of file trfUtils.py.

835 def timeoutStatus(self):
836 # If the JobGroup is complete or not submitted, then it is not timed
837 # out.
838 if self.completeStatus is True or self.timeStampSubmission is None:
839 return False
840 # If the JobGroup is not complete or submitted, then it may be timed
841 # out.
842 elif time.time() > self.timeout + self.timeStampSubmission:
843 return True
844 else:
845 return False
846

Member Data Documentation

◆ _name

python.trfUtils.JobGroup._name = uniqueIdentifier()
protected

Definition at line 801 of file trfUtils.py.

◆ className

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

Definition at line 797 of file trfUtils.py.

◆ completeStatus

bool python.trfUtils.JobGroup.completeStatus = False

Definition at line 798 of file trfUtils.py.

◆ jobs

python.trfUtils.JobGroup.jobs = jobs

Definition at line 796 of file trfUtils.py.

◆ results

list python.trfUtils.JobGroup.results = []

Definition at line 809 of file trfUtils.py.

◆ timeout

int python.trfUtils.JobGroup.timeout = 0

Definition at line 806 of file trfUtils.py.

◆ timeStampSubmission

python.trfUtils.JobGroup.timeStampSubmission = None

Definition at line 799 of file trfUtils.py.


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