CMS 3D CMS Logo

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

Public Member Functions

def __init__ (self)
 
def finish (self)
 
def parse (self, line)
 

Private Attributes

 __preamble
 
 _isEndPath
 
 _pathToModules
 
 _presentPath
 
 _presentPathName
 

Detailed Description

Definition at line 24 of file edmTracerLogToSimpleConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def edmTracerLogToSimpleConfig.PathParser.__init__ (   self)

Definition at line 25 of file edmTracerLogToSimpleConfig.py.

25  def __init__(self):
26  self._pathToModules = dict()
27  self._isEndPath = set()
28  self._presentPath = []
29  self._presentPathName = None
30  self.__preamble = 'modules on '

Member Function Documentation

◆ finish()

def edmTracerLogToSimpleConfig.PathParser.finish (   self)

Definition at line 43 of file edmTracerLogToSimpleConfig.py.

43  def finish(self):
44  if self._presentPathName:
45  self._pathToModules[self._presentPathName] = self._presentPath
46 

References edmTracerLogToSimpleConfig.PathParser._pathToModules, edmTracerLogToSimpleConfig.PathParser._presentPath, and edmTracerLogToSimpleConfig.PathParser._presentPathName.

Referenced by progressbar.ProgressBar.__next__().

◆ parse()

def edmTracerLogToSimpleConfig.PathParser.parse (   self,
  line 
)

Definition at line 31 of file edmTracerLogToSimpleConfig.py.

31  def parse(self,line):
32  if line[:len(self.__preamble)] == self.__preamble:
33  if self._presentPathName:
34  self._pathToModules[self._presentPathName] = self._presentPath
35  self._presentPathName = line.split(" ")[3][:-2]
36  if -1 != line.find('end path'):
37  self._isEndPath.add(self._presentPathName)
38  self._presentPath = []
39  else:
40  n = line.strip()
41  if self._presentPathName != n:
42  self._presentPath.append( fixName(n) )

References edmTracerLogToSimpleConfig.PathParser.__preamble, edmTracerLogToSimpleConfig.PathParser._isEndPath, edmTracerLogToSimpleConfig.PathParser._pathToModules, edmTracerLogToSimpleConfig.PathParser._presentPath, edmTracerLogToSimpleConfig.PathParser._presentPathName, PVValHelper.add(), mps_setup.append, and edmTracerLogToSimpleConfig.fixName().

Member Data Documentation

◆ __preamble

edmTracerLogToSimpleConfig.PathParser.__preamble
private

◆ _isEndPath

edmTracerLogToSimpleConfig.PathParser._isEndPath
private

◆ _pathToModules

edmTracerLogToSimpleConfig.PathParser._pathToModules
private

◆ _presentPath

edmTracerLogToSimpleConfig.PathParser._presentPath
private

◆ _presentPathName

edmTracerLogToSimpleConfig.PathParser._presentPathName
private
dumpparser.parse
def parse(path, config)
Definition: dumpparser.py:13
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition: PVValidationHelpers.cc:12
mps_setup.append
append
Definition: mps_setup.py:85
edmTracerLogToSimpleConfig.fixName
def fixName(name)
Definition: edmTracerLogToSimpleConfig.py:21