CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
crabFunctions.TaskStats Class Reference

Class holds job statistics for several Crab tasks. More...

Public Member Functions

def __init__
 The object constructor. More...
 
def clearStats
 This function sets all counts to zero. More...
 
def updateStats
 This function updates the statistics for a given tasklist. More...
 

Public Attributes

 nComplete
 
 nCooloff
 
 nFailed
 
 nFinished
 
 nIdle
 
 nRunning
 
 nTasks
 
 nTransferring
 
 nUnsubmitted
 

Detailed Description

Class holds job statistics for several Crab tasks.

This class saves and updates statistics from a given list of CrabTask objects.

Definition at line 621 of file crabFunctions.py.

Constructor & Destructor Documentation

def crabFunctions.TaskStats.__init__ (   self,
  tasklist = None 
)

The object constructor.

self: TaskStats

Parameters
self,:The object pointer. tasklist: List of CrabTask objects
tasklist,:(Optional) List of CrabTasks for which statistics should be calculated

Definition at line 629 of file crabFunctions.py.

References crabFunctions.TaskStats.clearStats(), and crabFunctions.TaskStats.updateStats().

630  def __init__(self, tasklist = None):
631  if tasklist is not None:
632  self.updateStats(tasklist)
633  else:
634  self.clearStats()
def clearStats
This function sets all counts to zero.
def updateStats
This function updates the statistics for a given tasklist.
def __init__
The object constructor.

Member Function Documentation

def crabFunctions.TaskStats.clearStats (   self)

This function sets all counts to zero.

self: TaskStats

Parameters
self,:The object pointer.

Definition at line 659 of file crabFunctions.py.

References crabFunctions.TaskStats.nTasks.

Referenced by crabFunctions.TaskStats.__init__(), and crabFunctions.TaskStats.updateStats().

def crabFunctions.TaskStats.updateStats (   self,
  tasklist 
)

This function updates the statistics for a given tasklist.

self: TaskStats

Parameters
self,:The object pointer. tasklist: List of CrabTask objects
tasklist,:List of CrabTasks for which statistics should be calculated

Definition at line 641 of file crabFunctions.py.

References crabFunctions.TaskStats.clearStats().

Referenced by crabFunctions.TaskStats.__init__().

642  def updateStats(self,tasklist):
643  self.clearStats()
644  self.nTasks = len(tasklist)
645  for task in tasklist:
646  if not task.isUpdating:
647  self.nUnsubmitted += task.nUnsubmitted
648  self.nIdle += task.nIdle
649  self.nRunning += task.nRunning
650  self.nTransferring += task.nTransferring
651  self.nCooloff += task.nCooloff
652  self.nFailed += task.nFailed
653  self.nFinished += task.nFinished
654  self.nComplete += task.nComplete
def clearStats
This function sets all counts to zero.
def updateStats
This function updates the statistics for a given tasklist.

Member Data Documentation

crabFunctions.TaskStats.nComplete

Definition at line 668 of file crabFunctions.py.

crabFunctions.TaskStats.nCooloff

Definition at line 665 of file crabFunctions.py.

crabFunctions.TaskStats.nFailed

Definition at line 666 of file crabFunctions.py.

crabFunctions.TaskStats.nFinished

Definition at line 667 of file crabFunctions.py.

crabFunctions.TaskStats.nIdle

Definition at line 662 of file crabFunctions.py.

crabFunctions.TaskStats.nRunning

Definition at line 663 of file crabFunctions.py.

crabFunctions.TaskStats.nTasks

Definition at line 643 of file crabFunctions.py.

Referenced by crabFunctions.TaskStats.clearStats().

crabFunctions.TaskStats.nTransferring

Definition at line 664 of file crabFunctions.py.

crabFunctions.TaskStats.nUnsubmitted

Definition at line 661 of file crabFunctions.py.