Package PyFoam :: Package LogAnalysis :: Module RegExpLineAnalyzer :: Class RegExpLineAnalyzer
[hide private]
[frames] | no frames]

Class RegExpLineAnalyzer

source code

                         object --+        
                                  |        
    LogLineAnalyzer.LogLineAnalyzer --+    
                                      |    
GeneralLineAnalyzer.GeneralLineAnalyzer --+
                                          |
                                         RegExpLineAnalyzer
Known Subclasses:
RegExpTimeLineLineAnalyzer

Parses lines for an arbitrary regular expression

Only one data-set is stored per time-step

One pattern group of the RegExp can be used as a unique identifier, so that more than one data-sets can be stored per time-step

The string %f% in the regular expression is replaced with the regular expression for a floating point number

Instance Methods [hide private]
  __init__(self, name, exp, idNr=None, titles=[], doTimelines=False, doFiles=True)
  startAnalysis(self, match)
Method at the start of a successfull match
  addToFiles(self, match)
Method that adds matched data to files
  addToTimelines(self, match)
Method that adds matched data to timelines
  sub(self, ID)
get the data set for the identifier ID
  getTimes(self, ID=None)
get the available time for the identifier ID
  getIDs(self)
get a list of the available IDs
  getLast(self, ID=None)
get the last time for the identifier ID
  getData(self, time=None, ID=None)
get a data value at a specific time for a specific ID

Inherited from GeneralLineAnalyzer.GeneralLineAnalyzer: doAnalysis, endAnalysis, getTimeline, setDirectory, setTitles, timeChanged

Inherited from LogLineAnalyzer.LogLineAnalyzer: getTime, goOn, setParent

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]
  floatRegExp = '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?'

Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, name, exp, idNr=None, titles=[], doTimelines=False, doFiles=True)
(Constructor)

source code 
Parameters:
  • name - name of the expression (needed for output
  • exp - the regular expression, %f% will be replaced with the regular expression for a float
  • idNr - number of the pattern group that is used as an identifier
  • titles - titles of the columns
Overrides: GeneralLineAnalyzer.GeneralLineAnalyzer.__init__

startAnalysis(self, match)

source code 
Method at the start of a successfull match
Overrides: GeneralLineAnalyzer.GeneralLineAnalyzer.startAnalysis
(inherited documentation)

addToFiles(self, match)

source code 
Method that adds matched data to files
Overrides: GeneralLineAnalyzer.GeneralLineAnalyzer.addToFiles
(inherited documentation)

addToTimelines(self, match)

source code 
Method that adds matched data to timelines
Overrides: GeneralLineAnalyzer.GeneralLineAnalyzer.addToTimelines
(inherited documentation)

sub(self, ID)

source code 
get the data set for the identifier ID

getTimes(self, ID=None)

source code 
get the available time for the identifier ID

getIDs(self)

source code 
get a list of the available IDs

getLast(self, ID=None)

source code 
get the last time for the identifier ID

getData(self, time=None, ID=None)

source code 
get a data value at a specific time for a specific ID

Class Variable Details [hide private]

floatRegExp

None
Value:
'[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?'