Package PyFoam :: Package Execution :: Module AnalyzedRunner
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.Execution.AnalyzedRunner

 1  #  ICE Revision: $Id: /local/openfoam/Python/PyFoam/PyFoam/Execution/AnalyzedRunner.py 5894 2009-11-27T14:09:20.728939Z bgschaid  $  
 2  """Command is run and output is analyzed""" 
 3   
 4  from BasicRunner import BasicRunner 
 5  from StepAnalyzedCommon import StepAnalyzedCommon 
 6   
7 -class AnalyzedRunner(StepAnalyzedCommon,BasicRunner):
8 """The output of a command is analyzed while being run 9 10 Side effects (files written etc) depend on the analyzer""" 11
12 - def __init__(self,analyzer, 13 argv=None, 14 silent=False, 15 logname="PyFoamSolve", 16 server=False, 17 lam=None, 18 compressLog=False, 19 restart=False, 20 noLog=False, 21 remark=None, 22 jobId=None, 23 smallestFreq=60.):
24 """ @param analyzer: the analyzer for the output 25 argv, silent, logname, server, lam, noLog - see BasicRunner""" 26 BasicRunner.__init__(self,argv,silent,logname, 27 server=server, 28 lam=lam, 29 restart=restart, 30 compressLog=compressLog, 31 noLog=noLog, 32 remark=remark, 33 jobId=jobId) 34 StepAnalyzedCommon.__init__(self, 35 logname, 36 analyzer, 37 smallestFreq=smallestFreq)
38
39 - def lineHandle(self,line):
40 """Not to be called: calls the analyzer for the current line""" 41 StepAnalyzedCommon.lineHandle(self,line) 42 BasicRunner.lineHandle(self,line)
43
44 - def lastTime(self):
45 return self.getTime()
46
47 - def firstCpuTime(self):
48 exe=self.getAnalyzer("Execution") 49 if exe==None: 50 return None 51 else: 52 return exe.timeFirst()
53
54 - def firstClockTime(self):
55 exe=self.getAnalyzer("Execution") 56 if exe==None: 57 return None 58 else: 59 return exe.clockFirst()
60
61 - def totalCpuTime(self):
62 exe=self.getAnalyzer("Execution") 63 if exe==None: 64 return None 65 else: 66 return exe.timeTotal()
67
68 - def totalClockTime(self):
69 exe=self.getAnalyzer("Execution") 70 if exe==None: 71 return None 72 else: 73 return exe.clockTotal()
74
75 - def stopHandle(self):
80