CMS 3D CMS Logo

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

Public Member Functions

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

Public Attributes

 maxNameSize
 
 numStreams
 

Private Attributes

 _esModuleNames
 
 _f
 
 _frameworkOnly
 
 _moduleCentric
 
 _moduleNames
 
 _recordNames
 

Detailed Description

Definition at line 786 of file edmTracerCompactLogViewer.py.

Constructor & Destructor Documentation

◆ __init__()

def edmTracerCompactLogViewer.TracerCompactFileParser.__init__ (   self,
  f,
  frameworkOnly,
  moduleCentric 
)

Definition at line 787 of file edmTracerCompactLogViewer.py.

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

787  def __init__(self,f, frameworkOnly, moduleCentric):
788  streamBeginRun = str(Phase.streamBeginRun)
789  numStreams = 0
790  numStreamsFromSource = 0
791  moduleNames = {}
792  esModuleNames = {}
793  recordNames = {}
794  for rawl in f:
795  l = rawl.strip()
796  if l and l[0] == 'M':
797  i = l.split(' ')
798  if i[3] == streamBeginRun:
799  #found global begin run
800  numStreams = int(i[1])+1
801  break
802  if numStreams == 0 and l and l[0] == 'S':
803  s = int(l.split(' ')[1])
804  if s > numStreamsFromSource:
805  numStreamsFromSource = s
806  if len(l) > 5 and l[0:2] == "#M":
807  (id,name)=tuple(l[2:].split())
808  moduleNames[int(id)] = name
809  continue
810  if len(l) > 5 and l[0:2] == "#N":
811  (id,name)=tuple(l[2:].split())
812  esModuleNames[int(id)] = name
813  continue
814  if len(l) > 5 and l[0:2] == "#R":
815  (id,name)=tuple(l[2:].split())
816  recordNames[int(id)] = name
817  continue
818 
819  self._f = f
820  self._frameworkOnly = frameworkOnly
821  self._moduleCentric = moduleCentric
822  if numStreams == 0:
823  numStreams = numStreamsFromSource +2
824  self.numStreams =numStreams
825  self._moduleNames = moduleNames
826  self._esModuleNames = esModuleNames
827  self._recordNames = recordNames
828  self.maxNameSize =0
829  for n in moduleNames.items():
830  self.maxNameSize = max(self.maxNameSize,len(n))
831  for n in esModuleNames.items():
832  self.maxNameSize = max(self.maxNameSize,len(n))
833  self.maxNameSize = max(self.maxNameSize,len(kSourceDelayedRead))
834  self.maxNameSize = max(self.maxNameSize, len('streamBeginLumi'))
835 
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)
#define str(s)

Member Function Documentation

◆ processingSteps()

def edmTracerCompactLogViewer.TracerCompactFileParser.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 836 of file edmTracerCompactLogViewer.py.

References edmStreamStallGrapher.StallMonitorParser._esModuleNames, edmTracerCompactLogViewer.TracerCompactFileParser._esModuleNames, edmStreamStallGrapher.StallMonitorParser._f, edmTracerCompactLogViewer.TracerCompactFileParser._f, edmTracerCompactLogViewer.TracerCompactFileParser._frameworkOnly, edmTracerCompactLogViewer.PreSourceTransitionParser._moduleCentric, edmTracerCompactLogViewer.PostSourceTransitionParser._moduleCentric, edmTracerCompactLogViewer.PreEDModuleTransitionParser._moduleCentric, edmTracerCompactLogViewer.PreEDModulePrefetchingParser._moduleCentric, edmTracerCompactLogViewer.PostEDModulePrefetchingParser._moduleCentric, edmTracerCompactLogViewer.PreEDModuleAcquireParser._moduleCentric, edmTracerCompactLogViewer.PostEDModuleAcquireParser._moduleCentric, edmTracerCompactLogViewer.PreESModulePrefetchingParser._moduleCentric, edmTracerCompactLogViewer.PostESModulePrefetchingParser._moduleCentric, edmTracerCompactLogViewer.TracerCompactFileParser._moduleCentric, edmStreamStallGrapher.StallMonitorParser._moduleNames, edmTracerCompactLogViewer.TracerCompactFileParser._moduleNames, edmTracerCompactLogViewer.TracerCompactFileParser._recordNames, and edmTracerCompactLogViewer.processingStepsFromFile().

836  def processingSteps(self):
837  """Create a generator which can step through the file and return each processing step.
838  Using a generator reduces the memory overhead when parsing a large file.
839  """
840  self._f.seek(0)
841  return processingStepsFromFile(self._f,self._moduleNames, self._esModuleNames, self._recordNames, self._frameworkOnly, self._moduleCentric)
842 
def processingStepsFromFile(f, moduleNames, esModuleNames, recordNames, frameworkOnly, moduleCentric)

Member Data Documentation

◆ _esModuleNames

edmTracerCompactLogViewer.TracerCompactFileParser._esModuleNames
private

◆ _f

edmTracerCompactLogViewer.TracerCompactFileParser._f
private

◆ _frameworkOnly

edmTracerCompactLogViewer.TracerCompactFileParser._frameworkOnly
private

◆ _moduleCentric

edmTracerCompactLogViewer.TracerCompactFileParser._moduleCentric
private

◆ _moduleNames

edmTracerCompactLogViewer.TracerCompactFileParser._moduleNames
private

◆ _recordNames

edmTracerCompactLogViewer.TracerCompactFileParser._recordNames
private

◆ maxNameSize

edmTracerCompactLogViewer.TracerCompactFileParser.maxNameSize

Definition at line 828 of file edmTracerCompactLogViewer.py.

◆ numStreams

edmTracerCompactLogViewer.TracerCompactFileParser.numStreams

Definition at line 824 of file edmTracerCompactLogViewer.py.