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

Class ContextLineAnalyzer

LogLineAnalyzer --+
                  |
                 ContextLineAnalyzer

Known Subclasses:
NameFinderLineAnalyzer

Base class for analyzers that work with a context
Method Summary
  __init__(self, trigger, nr)
  callOnMatch(self, m)
Called if the line matches
  doActualAnalysis(self, line)
Called nr lines after the match
  doAnalysis(self, line)
Analyze a line
    Inherited from LogLineAnalyzer
  getTime(self)
Return current time
  goOn(self)
If the analyzer thinks the simulation should be stopped (for instance because of convergence) it returns false
  setDirectory(self, oDir)
Set the directory to which output is to be written (if any output is written)
  setParent(self, parent)
Introduces the LineAnalyzer to its supervisor
  timeChanged(self)
The value of the time has changed in the Log-file

Method Details

__init__(self, trigger, nr=1)
(Constructor)

Parameters:
trigger - The regular expression that has to match before data is collected
nr - The number of lines after the match that data is collected
Overrides:
PyFoam.LogAnalysis.LogLineAnalyzer.LogLineAnalyzer.__init__

callOnMatch(self, m)

Called if the line matches
Parameters:
m - The match-object

doActualAnalysis(self, line)

Called nr lines after the match
Parameters:
line - The line that should be analyzed

doAnalysis(self, line)

Analyze a line

line - the line to be analyzed

This method carries the main functionality in the sub-classes
Overrides:
PyFoam.LogAnalysis.LogLineAnalyzer.LogLineAnalyzer.doAnalysis (inherited documentation)

Generated by Epydoc 2.1 on Mon Jan 22 23:52:48 2007 http://epydoc.sf.net