PyFoam.LogAnalysis.GeneralLineAnalyzer module

Line analyzer with output and the capability to store lines

class PyFoam.LogAnalysis.GeneralLineAnalyzer.GeneralLineAnalyzer(doTimelines=False, doFiles=False, titles=[], accumulation=None, singleFile=False, progressTemplate=None, plotIterations=False, startTime=None, endTime=None)[source]

Bases: PyFoam.LogAnalysis.LogLineAnalyzer.LogLineAnalyzer

Base class for analyzers that write data to files and store time-lines

Combines the capabilities of TimeLineLineAnalyzer and FileLineAnalyzer

_GeneralLineAnalyzer__phase = ''
__init__(doTimelines=False, doFiles=False, titles=[], accumulation=None, singleFile=False, progressTemplate=None, plotIterations=False, startTime=None, endTime=None)[source]
Parameters:
  • titles – The titles of the data elements
  • progressTemplate – Progress output to be reported
  • plotIterations – plot iterations instead of the real time
__module__ = 'PyFoam.LogAnalysis.GeneralLineAnalyzer'
addToFiles(match)[source]

Method that adds matched data to files

Parameters:match – data matched by a regular expression
addToTimelines(match)[source]

Method that adds matched data to timelines

Parameters:match – data matched by a regular expression
doAnalysis(line)[source]

General analysis method. Derived classes should instead override callbacks

endAnalysis(match)[source]

Method at the end of a successfull match

static fName(n)[source]
getCurrentData()[source]

Give back the current analyzed data in a dictionary

To be overwritten by subclasses

getTimeline(name)[source]
Parameters:name – Name of the timeline to return
Returns:the timeline as two list: the times and the values
setDirectory(oDir)[source]

Creates the OutFileCollection-object

setMaster(master)[source]

Assign another line-analyzer that will do the actual data gathering

static setPhase(p='')[source]
setTitles(titles)[source]

Sets the titles anew :param titles: the new titles

startAnalysis(match)[source]

Method at the start of a successfull match

stringToMatch(line)[source]

Returns string to match. To be overriden for multi-line expressions

tearDown()[source]

Closes files

timeChanged()[source]

Sets the current time in the timelines