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

Class FoamLogAnalyzer

source code

object --+
         |
        FoamLogAnalyzer

Base class for all analyzers

Administrates and calls a number of LogLineAnlayzers for each line

Instance Methods [hide private]
 
__init__(self, progress=False)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
tearDown(self)
Remove reference to self in children (hoping to remove circular dependencies)
source code
 
setTime(self, time)
Sets the time and alert all the LineAnalyzers that the time has changed
source code
 
addTimeListener(self, listener) source code
 
listAnalyzers(self)
Returns: A list with the names of the Analyzers
source code
 
hasAnalyzer(self, name)
Is this LogLineAnalyzer name there
source code
 
getAnalyzer(self, name)
Get the LogLineAnalyzer name
source code
 
addAnalyzer(self, name, obj)
Adds an analyzer
source code
 
analyzeLine(self, line)
Calls all the anlyzers for a line
source code
 
analyze(self, fh)
Analyzes a file (one line at a time)
source code
 
goOn(self)
Checks with all the analyzers
source code
 
getTime(self)
Gets the current time
source code
 
setDirectory(self, d)
Sets the output directory for all the analyzers
source code
 
getDirectory(self)
Gets the output directory
source code
 
addTrigger(self, time, func, once=True, until=None)
Adds a trigger function that is to be called as soon as the simulation time exceeds a certain value
source code
 
checkTriggers(self)
Check for and execute the triggered functions
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, progress=False)
(Constructor)

source code 

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

Parameters:
  • progress - Print time progress on console?
Overrides: object.__init__

setTime(self, time)

source code 

Sets the time and alert all the LineAnalyzers that the time has changed

Parameters:
  • time - the new value of the time

addTimeListener(self, listener)

source code 
Parameters:
  • listener - An object that is notified when the time changes. Has to implement a timeChanged method

listAnalyzers(self)

source code 
Returns:
A list with the names of the Analyzers

addAnalyzer(self, name, obj)

source code 

Adds an analyzer

obj - A LogLineAnalyzer name - the name of the analyzer

analyze(self, fh)

source code 

Analyzes a file (one line at a time)

fh - handle of the file

goOn(self)

source code 

Checks with all the analyzers

If one analyzer returns False it returns False

addTrigger(self, time, func, once=True, until=None)

source code 

Adds a trigger function that is to be called as soon as the simulation time exceeds a certain value

Parameters:
  • time - the time at which the function should be triggered
  • func - the trigger function
  • once - Should this function be called once or at every time-step
  • until - The time until which the trigger should be called