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 25 of file edmTracerLogToSimpleConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def edmTracerLogToSimpleConfig.PathParser.__init__ (   self)

Definition at line 26 of file edmTracerLogToSimpleConfig.py.

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

Member Function Documentation

◆ finish()

def edmTracerLogToSimpleConfig.PathParser.finish (   self)

Definition at line 44 of file edmTracerLogToSimpleConfig.py.

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

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 32 of file edmTracerLogToSimpleConfig.py.

32  def parse(self,line):
33  if line[:len(self.__preamble)] == self.__preamble:
34  if self._presentPathName:
35  self._pathToModules[self._presentPathName] = self._presentPath
36  self._presentPathName = line.split(" ")[3][:-2]
37  if -1 != line.find('end path'):
38  self._isEndPath.add(self._presentPathName)
39  self._presentPath = []
40  else:
41  n = line.strip()
42  if self._presentPathName != n:
43  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:22