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

Class RegExpLineAnalyzer

source code

                         object --+        
                                  |        
    LogLineAnalyzer.LogLineAnalyzer --+    
                                      |    
GeneralLineAnalyzer.GeneralLineAnalyzer --+
                                          |
                                         RegExpLineAnalyzer

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, accumulation=None, singleFile=False, startTime=None, endTime=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
startAnalysis(self, match)
Method at the start of a successfull match
source code
 
addToFiles(self, match)
Method that adds matched data to files
source code
 
addToTimelines(self, match)
Method that adds matched data to timelines
source code
 
sub(self, ID)
get the data set for the identifier ID
source code
 
getTimes(self, ID=None)
get the available time for the identifier ID
source code
 
getIDs(self)
get a list of the available IDs
source code
 
getLast(self, ID=None)
get the last time for the identifier ID
source code
 
getData(self, time=None, ID=None)
get a data value at a specific time for a specific ID
source code

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

Inherited from LogLineAnalyzer.LogLineAnalyzer: addListener, getTime, goOn, notify, 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, accumulation=None, singleFile=False, startTime=None, endTime=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

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
  • accumulation - How multiple values should be accumulated
Overrides: object.__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

Parameters:
  • match - data matched by a regular expression
Overrides: GeneralLineAnalyzer.GeneralLineAnalyzer.addToFiles
(inherited documentation)

addToTimelines(self, match)

source code 

Method that adds matched data to timelines

Parameters:
  • match - data matched by a regular expression
Overrides: GeneralLineAnalyzer.GeneralLineAnalyzer.addToTimelines
(inherited documentation)