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

 _f
 
 _moduleNames
 

Detailed Description

Definition at line 137 of file edmStreamStallGrapher.py.

Constructor & Destructor Documentation

def edmStreamStallGrapher.StallMonitorParser.__init__ (   self,
  f 
)

Definition at line 138 of file edmStreamStallGrapher.py.

References createfilelist.int, and split.

138  def __init__(self,f):
139  numStreams = 0
140  moduleNames = {}
141  for rawl in f:
142  l = rawl.strip()
143  if l and l[0] == 'M':
144  i = l.split(' ')
145  if i[3] == '4':
146  #found global begin run
147  numStreams = int(i[1])+1
148  break
149  if len(l) > 5 and l[0:2] == "#M":
150  (id,name)=tuple(l[2:].split())
151  moduleNames[id] = name
152  continue
153  self._f = f
154  self.numStreams =numStreams
155  self._moduleNames = moduleNames
156  self.maxNameSize =0
157  for n in moduleNames.iteritems():
158  self.maxNameSize = max(self.maxNameSize,len(n))
159  self.maxNameSize = max(self.maxNameSize,len(kSourceDelayedRead))
160 
double split
Definition: MVATrainer.cc:139

Member Function Documentation

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 161 of file edmStreamStallGrapher.py.

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

161  def processingSteps(self):
162  """Create a generator which can step through the file and return each processing step.
163  Using a generator reduces the memory overhead when parsing a large file.
164  """
165  self._f.seek(0)
167 
168 #----------------------------------------------
169 # Utility to get time out of Tracer output text format
def processingStepsFromStallMonitorOutput(f, moduleNames)

Member Data Documentation

edmStreamStallGrapher.StallMonitorParser._f
private
edmStreamStallGrapher.StallMonitorParser._moduleNames
private
edmStreamStallGrapher.StallMonitorParser.maxNameSize

Definition at line 156 of file edmStreamStallGrapher.py.

edmStreamStallGrapher.StallMonitorParser.numStreams

Definition at line 154 of file edmStreamStallGrapher.py.