CMS 3D CMS Logo

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__ (self, tasklist=None)
 The object constructor. More...
 
def clearStats (self)
 This function sets all counts to zero. More...
 
def updateStats (self, tasklist)
 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

◆ __init__()

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

The object constructor.

self: TaskStats

Parameters
selfThe 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().

629  def __init__(self, tasklist = None):
630  if tasklist is not None:
631  self.updateStats(tasklist)
632  else:
633  self.clearStats()
634 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ clearStats()

def crabFunctions.TaskStats.clearStats (   self)

This function sets all counts to zero.

self: TaskStats

Parameters
selfThe object pointer.

Definition at line 659 of file crabFunctions.py.

References crabFunctions.TaskStats.nTasks.

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

659  def clearStats(self):
660  self.nTasks = 0
661  self.nUnsubmitted = 0
662  self.nIdle = 0
663  self.nRunning = 0
664  self.nTransferring = 0
665  self.nCooloff = 0
666  self.nFailed = 0
667  self.nFinished = 0
668  self.nComplete = 0
669 

◆ updateStats()

def crabFunctions.TaskStats.updateStats (   self,
  tasklist 
)

This function updates the statistics for a given tasklist.

self: TaskStats

Parameters
selfThe object pointer. tasklist: List of CrabTask objects
tasklistList 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__().

641  def updateStats(self,tasklist):
642  self.clearStats()
643  self.nTasks = len(tasklist)
644  for task in tasklist:
645  if not task.isUpdating:
646  self.nUnsubmitted += task.nUnsubmitted
647  self.nIdle += task.nIdle
648  self.nRunning += task.nRunning
649  self.nTransferring += task.nTransferring
650  self.nCooloff += task.nCooloff
651  self.nFailed += task.nFailed
652  self.nFinished += task.nFinished
653  self.nComplete += task.nComplete
654 

Member Data Documentation

◆ nComplete

crabFunctions.TaskStats.nComplete

Definition at line 668 of file crabFunctions.py.

◆ nCooloff

crabFunctions.TaskStats.nCooloff

Definition at line 665 of file crabFunctions.py.

◆ nFailed

crabFunctions.TaskStats.nFailed

Definition at line 666 of file crabFunctions.py.

◆ nFinished

crabFunctions.TaskStats.nFinished

Definition at line 667 of file crabFunctions.py.

◆ nIdle

crabFunctions.TaskStats.nIdle

Definition at line 662 of file crabFunctions.py.

◆ nRunning

crabFunctions.TaskStats.nRunning

Definition at line 663 of file crabFunctions.py.

◆ nTasks

crabFunctions.TaskStats.nTasks

Definition at line 643 of file crabFunctions.py.

Referenced by crabFunctions.TaskStats.clearStats().

◆ nTransferring

crabFunctions.TaskStats.nTransferring

Definition at line 664 of file crabFunctions.py.

◆ nUnsubmitted

crabFunctions.TaskStats.nUnsubmitted

Definition at line 661 of file crabFunctions.py.