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

Class FoamLogAnalyzer

source code

object --+
         |
        FoamLogAnalyzer
Known Subclasses:
StandardLogAnalyzer.StandardLogAnalyzer, UtilityAnalyzer.UtilityAnalyzer, EchoLogAnalyzer.EchoLogAnalyzer

Base class for all analyzers

Administrates and calls a number of LogLineAnlayzers for each line

Instance Methods [hide private]
  __init__(self, progress=False)
  tearDown(self)
Remove reference to self in children (hoping to remove circular dependencies)
  setTime(self, time)
Sets the time and alert all the LineAnalyzers that the time has changed
  addTimeListener(self, listener)
  listAnalyzers(self)
  getAnalyzer(self, name)
Get the LogLineAnalyzer name
  addAnalyzer(self, name, obj)
Adds an analyzer
  analyzeLine(self, line)
Calls all the anlyzers for a line
  analyze(self, fh)
Analyzes a file (one line at a time)
  goOn(self)
Checks with all the analyzers
  getTime(self)
Gets the current time
  setDirectory(self, d)
Sets the output directory for all the analyzers
  getDirectory(self)
Gets the output directory
  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
  checkTriggers(self)
Check for and execute the triggered functions

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 
Parameters:
  • progress - Print time progress on console?
Overrides: object.__init__

tearDown(self)

source code 
Remove reference to self in children (hoping to remove circular dependencies)

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

getAnalyzer(self, name)

source code 
Get the LogLineAnalyzer name

addAnalyzer(self, name, obj)

source code 

Adds an analyzer

obj - A LogLineAnalyzer name - the name of the analyzer

analyzeLine(self, line)

source code 
Calls all the anlyzers for a line

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

getTime(self)

source code 
Gets the current time

setDirectory(self, d)

source code 
Sets the output directory for all the analyzers

getDirectory(self)

source code 
Gets the output directory

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

checkTriggers(self)

source code 
Check for and execute the triggered functions