ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
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 Member Functions

def __init__ (self, jobs=None, name=None, timeout=None)
 initialisation method More...
 
def name (self)
 
def __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. More...
 
def timeoutStatus (self)
 return Boolean JobGroup timeout status More...
 
def printout (self)
 print in a human-readable way the items of the object self More...
 

Public Attributes

 jobs
 
 className
 
 completeStatus
 
 timeStampSubmission
 
 timeout
 
 results
 

Private Attributes

 _name
 

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.

Constructor & Destructor Documentation

◆ __init__()

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

initialisation method

Definition at line 790 of file trfUtils.py.

790  def __init__(
791  self,
792  jobs = None,
793  name = None,
794  timeout = None
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__()

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

def python.trfUtils.JobGroup.name (   self)

Definition at line 812 of file trfUtils.py.

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

◆ printout()

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

def 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
private

Definition at line 796 of file trfUtils.py.

◆ className

python.trfUtils.JobGroup.className

Definition at line 792 of file trfUtils.py.

◆ completeStatus

python.trfUtils.JobGroup.completeStatus

Definition at line 793 of file trfUtils.py.

◆ jobs

python.trfUtils.JobGroup.jobs

Definition at line 791 of file trfUtils.py.

◆ results

python.trfUtils.JobGroup.results

Definition at line 804 of file trfUtils.py.

◆ timeout

python.trfUtils.JobGroup.timeout

Definition at line 801 of file trfUtils.py.

◆ timeStampSubmission

python.trfUtils.JobGroup.timeStampSubmission

Definition at line 794 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