CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
psClasses.queueNode Class Reference

Public Member Functions

def __init__ (self, cores=4, jay=2)
 
def append (self, item)
 
def pendingThreads (self)
 
def queueWeight (self)
 

Public Attributes

 QueueSem
 
 RunningThreads
 
 ThreadLog
 

Detailed Description

Definition at line 184 of file psClasses.py.

Constructor & Destructor Documentation

◆ __init__()

def psClasses.queueNode.__init__ (   self,
  cores = 4,
  jay = 2 
)

Definition at line 185 of file psClasses.py.

185  def __init__(self,cores = 4,jay = 2):
186  self.QueueSem = BoundedSemaphore(value=cores/jay)
187  self.RunningThreads = []
188  self.ThreadLog = []
189 
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

◆ append()

def psClasses.queueNode.append (   self,
  item 
)

Definition at line 190 of file psClasses.py.

References psClasses.queueNode.RunningThreads, and psClasses.queueNode.ThreadLog.

Referenced by diclist.diclist.add().

190  def append(self,item):
191  self.RunningThreads.append(item)
192  t=time.time()
193  self.ThreadLog.append([t,item.BuildNode.LibName,"INFO: %s thread %s added for Library %s" % (t,item.name,item.BuildNode.LibName)])
194 

◆ pendingThreads()

def psClasses.queueNode.pendingThreads (   self)

Definition at line 195 of file psClasses.py.

References psClasses.queueNode.RunningThreads.

195  def pendingThreads(self):
196  return len([x for x in self.RunningThreads if x.is_alive()])
197 

◆ queueWeight()

def psClasses.queueNode.queueWeight (   self)

Definition at line 198 of file psClasses.py.

References psClasses.queueNode.RunningThreads.

198  def queueWeight(self):
199  return sum([x.Weight for x in self.RunningThreads if x.is_alive()])
200 
201 
202 

Member Data Documentation

◆ QueueSem

psClasses.queueNode.QueueSem

Definition at line 186 of file psClasses.py.

◆ RunningThreads

psClasses.queueNode.RunningThreads

◆ ThreadLog

psClasses.queueNode.ThreadLog

Definition at line 188 of file psClasses.py.

Referenced by psClasses.queueNode.append().