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 620 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 628 of file crabFunctions.py.

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

628  def __init__(self, tasklist = None):
629  if tasklist is not None:
630  self.updateStats(tasklist)
631  else:
632  self.clearStats()
633 
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 658 of file crabFunctions.py.

References crabFunctions.TaskStats.nTasks.

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

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

◆ 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 640 of file crabFunctions.py.

References crabFunctions.TaskStats.clearStats().

Referenced by crabFunctions.TaskStats.__init__().

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

Member Data Documentation

◆ nComplete

crabFunctions.TaskStats.nComplete

Definition at line 667 of file crabFunctions.py.

◆ nCooloff

crabFunctions.TaskStats.nCooloff

Definition at line 664 of file crabFunctions.py.

◆ nFailed

crabFunctions.TaskStats.nFailed

Definition at line 665 of file crabFunctions.py.

◆ nFinished

crabFunctions.TaskStats.nFinished

Definition at line 666 of file crabFunctions.py.

◆ nIdle

crabFunctions.TaskStats.nIdle

Definition at line 661 of file crabFunctions.py.

◆ nRunning

crabFunctions.TaskStats.nRunning

Definition at line 662 of file crabFunctions.py.

◆ nTasks

crabFunctions.TaskStats.nTasks

Definition at line 642 of file crabFunctions.py.

Referenced by crabFunctions.TaskStats.clearStats().

◆ nTransferring

crabFunctions.TaskStats.nTransferring

Definition at line 663 of file crabFunctions.py.

◆ nUnsubmitted

crabFunctions.TaskStats.nUnsubmitted

Definition at line 660 of file crabFunctions.py.