Version: 8.3.0
YACS.proc_i Class Reference
Inheritance diagram for YACS.proc_i:
Collaboration diagram for YACS.proc_i:

Public Member Functions

def __init__
 
def getNodeState
 
def getNodeProgress
 
def getXMLState
 
def getInPortValue
 
def setInPortValue
 
def getOutPortValue
 
def getErrorDetails
 
def getErrorReport
 
def getContainerLog
 
def shutdownProc
 
def getExecutorState
 
def getIds
 
def getNumIds
 
def getNames
 
def runProc
 
def Run
 
def RunFromState
 
def RestartFromState
 
def addObserver
 
def setExecMode
 
def setListOfBreakPoints
 
def getTasksToLoad
 
def setStepsToExecute
 
def resumeCurrentBreakPoint
 
def isNotFinished
 
def stopExecution
 
def saveState
 
def setStopOnError
 
def unsetStopOnError
 

Public Attributes

 l
 
 e
 
 run1
 
 p
 
 xmlFile
 

Detailed Description

Definition at line 36 of file YACS.py.

Constructor & Destructor Documentation

def YACS.proc_i.__init__ (   self,
  xmlFile 
)

Definition at line 37 of file YACS.py.

37 
38  def __init__(self, xmlFile):
39  self.l = loader.YACSLoader()
40  self.e = pilot.ExecutorSwig()
41  self.e.setExecMode(1) # YACS::STEPBYSTEP
42  self.run1 = None
43  self.p = self.l.load(xmlFile)
44  self.xmlFile=xmlFile
45  pass

Member Function Documentation

def YACS.proc_i.addObserver (   self,
  obs,
  numid,
  event 
)

Definition at line 181 of file YACS.py.

182  def addObserver(self, obs, numid, event):
183  disp = SALOMERuntime.SALOMEDispatcher_getSALOMEDispatcher()
184  disp.addObserver(obs, numid, event)
185  pass
def YACS.proc_i.getContainerLog (   self,
  nodeNumid 
)

Definition at line 82 of file YACS.py.

82 
83  def getContainerLog(self, nodeNumid):
84  return self.p.getNodeContainerLog(nodeNumid)
def YACS.proc_i.getErrorDetails (   self,
  nodeNumid 
)

Definition at line 76 of file YACS.py.

76 
77  def getErrorDetails(self, nodeNumid):
78  return self.p.getNodeErrorDetails(nodeNumid)
def YACS.proc_i.getErrorReport (   self,
  nodeNumid 
)

Definition at line 79 of file YACS.py.

79 
80  def getErrorReport(self, nodeNumid):
81  return self.p.getNodeErrorReport(nodeNumid)
def YACS.proc_i.getExecutorState (   self)

Definition at line 88 of file YACS.py.

88 
89  def getExecutorState(self):
90  return self.e.getExecutorState()
def YACS.proc_i.getIds (   self)

Definition at line 91 of file YACS.py.

91 
92  def getIds(self):
93  numids = self.p.getNumIds()
94  ids = self.p.getIds()
95  return (numids,ids)
def YACS.proc_i.getInPortValue (   self,
  nodeNumid,
  portName 
)

Definition at line 55 of file YACS.py.

55 
56  def getInPortValue(self, nodeNumid, portName):
57  try:
58  return self.p.getInPortValue(nodeNumid, portName)
59  except:
60  traceback.print_exc()
61  return ""
def YACS.proc_i.getNames (   self)

Definition at line 99 of file YACS.py.

99 
100  def getNames(self):
101  return self.p.getIds()
def YACS.proc_i.getNodeProgress (   self,
  numid 
)

Definition at line 49 of file YACS.py.

49 
50  def getNodeProgress(self,numid):
51  return self.p.getNodeProgress(numid)
def YACS.proc_i.getNodeState (   self,
  numid 
)

Definition at line 46 of file YACS.py.

46 
47  def getNodeState(self,numid):
48  return self.p.getNodeState(numid)
def YACS.proc_i.getNumIds (   self)

Definition at line 96 of file YACS.py.

96 
97  def getNumIds(self):
98  return self.p.getNumIds()
def YACS.proc_i.getOutPortValue (   self,
  nodeNumid,
  portName 
)

Definition at line 69 of file YACS.py.

69 
70  def getOutPortValue(self, nodeNumid, portName):
71  try:
72  return self.p.getOutPortValue(nodeNumid, portName)
73  except:
74  traceback.print_exc()
75  return ""
def YACS.proc_i.getTasksToLoad (   self)

Definition at line 202 of file YACS.py.

203  def getTasksToLoad(self):
204  return self.e.getTasksToLoad()
def YACS.proc_i.getXMLState (   self,
  numid 
)

Definition at line 52 of file YACS.py.

52 
53  def getXMLState(self, numid):
54  return self.p.getXMLState(numid)
def YACS.proc_i.isNotFinished (   self)

Definition at line 211 of file YACS.py.

212  def isNotFinished(self):
213  return self.e.isNotFinished()
def YACS.proc_i.RestartFromState (   self,
  xmlFile 
)
Reset the procedure state to ready state for all nodes in error
   if xmlFile exists first try to load the state from this file.
   then start execution

Definition at line 152 of file YACS.py.

References YACS.proc_i.p, YACS.proc_i.run1, and YACS.proc_i.runProc().

153  def RestartFromState(self, xmlFile):
154  """Reset the procedure state to ready state for all nodes in error
155  if xmlFile exists first try to load the state from this file.
156  then start execution
157  """
158  if self.run1 is not None:
159  execState = self.e.getExecutorState()
160  if execState >= pilot.FINISHED:
161  self.run1.join()
162  self.run1 = None
163  else:
164  return
165 
166  try:
167  if os.path.exists(xmlFile):
168  self.p.init()
169  sp = loader.stateParser()
170  sl = loader.stateLoader(sp,self.p)
171  sl.parse(xmlFile)
172 
173  self.p.resetState(1)
174  self.p.exUpdateState();
175  except:
176  pass
177 
178  if self.run1 is None:
179  self.run1 = threading.Thread(None, self.runProc, "CORBAExec", (0,True,False))
180  self.run1.start()
def YACS.proc_i.resumeCurrentBreakPoint (   self)

Definition at line 208 of file YACS.py.

209  def resumeCurrentBreakPoint(self):
210  return self.e.resumeCurrentBreakPoint()
def YACS.proc_i.Run (   self)

Definition at line 107 of file YACS.py.

References YACS.proc_i.run1, and YACS.proc_i.runProc().

108  def Run(self):
109  if self.run1 is not None:
110  execState = self.e.getExecutorState()
111  if execState >= pilot.FINISHED:
112  self.run1.join()
113  self.run1 = None
114 
115  if self.run1 is None:
116  self.run1 = threading.Thread(None, self.runProc, "CORBAExec", (0,True,True))
117  self.run1.start()
def YACS.proc_i.RunFromState (   self,
  xmlFile 
)
Start an execution from the state given by the file xmlFile
   If xmlFile == "", start execution from the current state

Definition at line 118 of file YACS.py.

References YACS.proc_i.p, YACS.proc_i.run1, and YACS.proc_i.runProc().

119  def RunFromState(self, xmlFile):
120  """Start an execution from the state given by the file xmlFile
121  If xmlFile == "", start execution from the current state
122  """
123  if self.run1 is not None:
124  execState = self.e.getExecutorState()
125  if execState >= pilot.FINISHED:
126  self.run1.join()
127  self.run1 = None
128 
129  if xmlFile:
130  try:
131  self.p.init()
132  self.p.exUpdateState();
133  sp = loader.stateParser()
134  sl = loader.stateLoader(sp,self.p)
135  sl.parse(xmlFile)
136  except IOError, ex:
137  print "IO Error: ", ex
138  return
139  except ValueError,ex:
140  print "Caught ValueError Exception:",ex
141  return
142  except pilot.Exception,ex:
143  print ex.what()
144  return
145  except:
146  print "Unknown exception!"
147  return
148 
149  if self.run1 is None:
150  self.run1 = threading.Thread(None, self.runProc, "CORBAExec", (0,True,False))
151  self.run1.start()
def YACS.proc_i.runProc (   self,
  debug,
  isPyThread,
  fromscratch 
)

Definition at line 102 of file YACS.py.

References YACS.proc_i.p, and YACS.proc_i.xmlFile.

Referenced by YACS.proc_i.RestartFromState(), YACS.proc_i.Run(), and YACS.proc_i.RunFromState().

103  def runProc(self,debug, isPyThread, fromscratch):
104  print "**************************Begin schema execution %s**************************" % self.xmlFile
105  self.e.RunPy(self.p,debug, isPyThread, fromscratch)
106  print "**************************End schema execution %s****************************" % self.xmlFile
def YACS.proc_i.saveState (   self,
  xmlFile 
)

Definition at line 218 of file YACS.py.

219  def saveState(self, xmlFile):
220  return self.e.saveState(xmlFile)
def YACS.proc_i.setExecMode (   self,
  mode 
)

Definition at line 186 of file YACS.py.

187  def setExecMode(self, mode):
188  if mode == YACS_ORB.CONTINUE:
189  self.e.setExecMode(0)
190  pass
191  if mode == YACS_ORB.STEPBYSTEP:
192  self.e.setExecMode(1)
193  pass
194  if mode == YACS_ORB.STOPBEFORENODES:
195  self.e.setExecMode(2)
196  pass
197  pass
def YACS.proc_i.setInPortValue (   self,
  nodeName,
  portName,
  value 
)

Definition at line 62 of file YACS.py.

62 
63  def setInPortValue(self, nodeName, portName, value):
64  try:
65  return self.p.setInPortValue(nodeName, portName, value)
66  except:
67  traceback.print_exc()
68  return ""
def YACS.proc_i.setListOfBreakPoints (   self,
  listOfBreakPoints 
)

Definition at line 198 of file YACS.py.

199  def setListOfBreakPoints(self, listOfBreakPoints):
200  self.e.setListOfBreakPoints(listOfBreakPoints)
201  pass
def YACS.proc_i.setStepsToExecute (   self,
  listToExecute 
)

Definition at line 205 of file YACS.py.

206  def setStepsToExecute(self, listToExecute):
207  return self.e.setStepsToExecute(listToExecute)
def YACS.proc_i.setStopOnError (   self,
  dumpRequested,
  xmlFile 
)

Definition at line 221 of file YACS.py.

222  def setStopOnError(self, dumpRequested, xmlFile):
223  self.e.setStopOnError(dumpRequested, xmlFile)
224  pass
def YACS.proc_i.shutdownProc (   self,
  level 
)

Definition at line 85 of file YACS.py.

85 
86  def shutdownProc(self, level):
87  return self.p.shutdown(level)
def YACS.proc_i.stopExecution (   self)

Definition at line 214 of file YACS.py.

215  def stopExecution(self):
216  self.e.stopExecution()
217  pass
def YACS.proc_i.unsetStopOnError (   self)

Definition at line 225 of file YACS.py.

226  def unsetStopOnError(self):
227  self.e.unsetStopOnError()
228  pass

Member Data Documentation

YACS.proc_i.e

Definition at line 39 of file YACS.py.

YACS.proc_i.l

Definition at line 38 of file YACS.py.

YACS.proc_i.p

Definition at line 42 of file YACS.py.

Referenced by YACS.proc_i.RestartFromState(), YACS.proc_i.RunFromState(), and YACS.proc_i.runProc().

YACS.proc_i.run1

Definition at line 41 of file YACS.py.

Referenced by YACS.proc_i.RestartFromState(), YACS.proc_i.Run(), and YACS.proc_i.RunFromState().

YACS.proc_i.xmlFile

Definition at line 43 of file YACS.py.

Referenced by YACS.proc_i.runProc().


The documentation for this class was generated from the following file: