CMS 3D CMS Logo

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

Public Member Functions

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

Public Attributes

 maxNameSize
 
 numStreams
 

Private Attributes

 _esModuleNames
 
 _f
 
 _moduleCentric
 
 _moduleNames
 
 _recordNames
 

Detailed Description

Definition at line 943 of file edmModuleAllocMonitorAnalyze.py.

Constructor & Destructor Documentation

◆ __init__()

def edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser.__init__ (   self,
  f,
  moduleCentric 
)

Definition at line 944 of file edmModuleAllocMonitorAnalyze.py.

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

944  def __init__(self,f, moduleCentric):
945  streamBeginRun = str(Phase.streamBeginRun)
946  numStreams = 0
947  numStreamsFromSource = 0
948  moduleNames = {}
949  esModuleNames = {}
950  recordNames = {}
951  for rawl in f:
952  l = rawl.strip()
953  if l and l[0] == 'M':
954  i = l.split(' ')
955  if i[3] == streamBeginRun:
956  #found global begin run
957  numStreams = int(i[1])+1
958  break
959  if numStreams == 0 and l and l[0] == 'S':
960  s = int(l.split(' ')[1])
961  if s > numStreamsFromSource:
962  numStreamsFromSource = s
963  if len(l) > 5 and l[0:2] == "#M":
964  (id,name)=tuple(l[2:].split())
965  moduleNames[int(id)] = name
966  continue
967  if len(l) > 5 and l[0:2] == "#N":
968  (id,name)=tuple(l[2:].split())
969  esModuleNames[int(id)] = name
970  continue
971  if len(l) > 5 and l[0:2] == "#R":
972  (id,name)=tuple(l[2:].split())
973  recordNames[int(id)] = name
974  continue
975 
976  self._f = f
977  self._moduleCentric = moduleCentric
978  if numStreams == 0:
979  numStreams = numStreamsFromSource +2
980  self.numStreams =numStreams
981  self._moduleNames = moduleNames
982  self._esModuleNames = esModuleNames
983  self._recordNames = recordNames
984  self.maxNameSize =0
985  for n in moduleNames.items():
986  self.maxNameSize = max(self.maxNameSize,len(n))
987  for n in esModuleNames.items():
988  self.maxNameSize = max(self.maxNameSize,len(n))
989  self.maxNameSize = max(self.maxNameSize,len(kSourceDelayedRead))
990  self.maxNameSize = max(self.maxNameSize, len('streamBeginLumi'))
991 
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 edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser.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 992 of file edmModuleAllocMonitorAnalyze.py.

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

992  def processingSteps(self):
993  """Create a generator which can step through the file and return each processing step.
994  Using a generator reduces the memory overhead when parsing a large file.
995  """
996  self._f.seek(0)
997  return processingStepsFromFile(self._f,self._moduleNames, self._esModuleNames, self._recordNames, self._moduleCentric)
998 
def processingStepsFromFile(f, moduleNames, esModuleNames, recordNames, moduleCentric)

Member Data Documentation

◆ _esModuleNames

edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser._esModuleNames
private

◆ _f

edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser._f
private

◆ _moduleCentric

edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser._moduleCentric
private

◆ _moduleNames

edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser._moduleNames
private

◆ _recordNames

edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser._recordNames
private

◆ maxNameSize

edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser.maxNameSize

Definition at line 984 of file edmModuleAllocMonitorAnalyze.py.

◆ numStreams

edmModuleAllocMonitorAnalyze.ModuleAllocCompactFileParser.numStreams

Definition at line 980 of file edmModuleAllocMonitorAnalyze.py.