CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
edmStreamStallGrapher.StallMonitorParser Class Reference
Inheritance diagram for edmStreamStallGrapher.StallMonitorParser:

Public Member Functions

def __init__ (self, f)
 
def processingSteps (self)
 

Public Attributes

 maxNameSize
 
 numStreams
 

Private Attributes

 _esModuleNames
 
 _f
 
 _moduleNames
 

Detailed Description

Definition at line 153 of file edmStreamStallGrapher.py.

Constructor & Destructor Documentation

◆ __init__()

def edmStreamStallGrapher.StallMonitorParser.__init__ (   self,
  f 
)

Definition at line 154 of file edmStreamStallGrapher.py.

References createfilelist.int, submitPVValidationJobs.split(), and mkLumiAveragedPlots.tuple.

154  def __init__(self,f):
155  numStreams = 0
156  numStreamsFromSource = 0
157  moduleNames = {}
158  esModuleNames = {}
159  for rawl in f:
160  l = rawl.strip()
161  if l and l[0] == 'M':
162  i = l.split(' ')
163  if i[3] == '4':
164  #found global begin run
165  numStreams = int(i[1])+1
166  break
167  if numStreams == 0 and l and l[0] == 'S':
168  s = int(l.split(' ')[1])
169  if s > numStreamsFromSource:
170  numStreamsFromSource = s
171  if len(l) > 5 and l[0:2] == "#M":
172  (id,name)=tuple(l[2:].split())
173  moduleNames[id] = name
174  continue
175  if len(l) > 5 and l[0:2] == "#N":
176  (id,name)=tuple(l[2:].split())
177  esModuleNames[id] = name
178  continue
179 
180  self._f = f
181  if numStreams == 0:
182  numStreams = numStreamsFromSource +2
183  self.numStreams =numStreams
184  self._moduleNames = moduleNames
185  self._esModuleNames = esModuleNames
186  self.maxNameSize =0
187  for n in moduleNames.items():
188  self.maxNameSize = max(self.maxNameSize,len(n))
189  for n in esModuleNames.items():
190  self.maxNameSize = max(self.maxNameSize,len(n))
191  self.maxNameSize = max(self.maxNameSize,len(kSourceDelayedRead))
192 
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

◆ processingSteps()

def edmStreamStallGrapher.StallMonitorParser.processingSteps (   self)
Create a generator which can step through the file and return each processing step.
Using a generator reduces the memory overhead when parsing a large file.

Definition at line 193 of file edmStreamStallGrapher.py.

References edmStreamStallGrapher.StallMonitorParser._esModuleNames, edmStreamStallGrapher.StallMonitorParser._f, edmStreamStallGrapher.StallMonitorParser._moduleNames, and edmStreamStallGrapher.processingStepsFromStallMonitorOutput().

193  def processingSteps(self):
194  """Create a generator which can step through the file and return each processing step.
195  Using a generator reduces the memory overhead when parsing a large file.
196  """
197  self._f.seek(0)
198  return processingStepsFromStallMonitorOutput(self._f,self._moduleNames, self._esModuleNames)
199 
200 #----------------------------------------------
201 # Utility to get time out of Tracer output text format
def processingStepsFromStallMonitorOutput(f, moduleNames, esModuleNames)

Member Data Documentation

◆ _esModuleNames

edmStreamStallGrapher.StallMonitorParser._esModuleNames
private

◆ _f

edmStreamStallGrapher.StallMonitorParser._f
private

◆ _moduleNames

edmStreamStallGrapher.StallMonitorParser._moduleNames
private

◆ maxNameSize

edmStreamStallGrapher.StallMonitorParser.maxNameSize

Definition at line 186 of file edmStreamStallGrapher.py.

◆ numStreams

edmStreamStallGrapher.StallMonitorParser.numStreams

Definition at line 183 of file edmStreamStallGrapher.py.