23.05.2014 Views

Athena Developer Guide

Athena Developer Guide

Athena Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Athena</strong> Chapter 6 Scripting Version/Issue: 2.0.0<br />

1. This creates a new Python object of type Sequencer, having the same name as the newly<br />

created <strong>Athena</strong> Sequencer.<br />

2. This creates a new Python object of type Algorithm, having the same name as the newly<br />

created <strong>Athena</strong> Algorithm.<br />

The Python commands that might require a subsequent synchronization are shown in Listing 6.7:<br />

Listing 6.7 Examples of Python commands that might create new Algorithms or Services<br />

theApp.ExtSvc = [...]<br />

theApp.TopAlg = [...]<br />

Sequencer.Members = [...]<br />

Sequencer.BranchMembers = [...]<br />

OutStream.AcceptAlgs = [...]<br />

OutStream.RequireAlgs = [...]<br />

OutStream.VetoAlgs = [...]<br />

6.8 Controlling job execution<br />

This is very limited in the prototype, and will be replaced in a future release by the ability to call<br />

functions on the Python objects corresponding to the ApplicationMgr (theApp), Algorithms, and<br />

Services.<br />

In the prototype, control is returned from the Python shell to the <strong>Athena</strong> environment by the command<br />

in Listing 6.8:<br />

Listing 6.8 Python command to resume <strong>Athena</strong> execution<br />

>>> theApp.Go [1]<br />

Notes:<br />

1. This is a temporary command that will be replaced in a future release by a more flexible<br />

ability to access more functions of the ApplicationMgr.<br />

This will cause the currently configured event loop to be executed, after which control will be returned<br />

to the Python shell.<br />

Typing Ctrl-D (holding down the Ctrl key while striking the D key) at the Python shell prompt will<br />

cause an orderly termination of the job. Althernatively, the command shown in Listing 6.9 will also<br />

cause an orderly application termination.<br />

Listing 6.9 Python command to terminate <strong>Athena</strong> execution<br />

>>> theApp.Exit [1]<br />

page 40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!