Chapter 8. Interactive Athena

Table of Contents

8.1 Setting up Atlantis Interactive Athena communication
8.2 Calling the Athena vertex fitter from Atlantis

Athena can be accessed interactively from Atlantis via the Interactive Athena dialog window. This window is popped up by selecting the FileInteractive Athena menu option of the Control Window.

By means of this dialog the user is able to steer the Athena framework directly from the Atlantis display. The other necessary component is the Python script InteractiveServer.py, that is started on the Athena interactive prompt.

It is possible to perform various actions from the Atlantis dialog window as if the commands were typed on the Athena interactive prompt directly, e.g. changing/querying the values of the job options, executing the methods of Athena algtools/algorithms, directing Athena to process the next event by calling theApp.nextEvent() and eventually getting the XML event data.

InteractiveServer.py is a Python script that is used to interface the Atlantis Interactive Athena dialog and the Athena interactive Python prompt (when Athena is started by athena -i [job_option_file]). Once the script is started, the created server receives requests from the Atlantis user, processes these requests and sends the results back to Atlantis.

The CVS location of the script is offline/graphics/AtlantisJava/share/InteractiveServer.py. In the Athena environment it can be obtained by get_files InteractiveServer.py as well.

Establishing the communication between Atlantis and Athena is described in 8.1 Setting up Atlantis Interactive Athena communication.

Using the Athena vertex fitter from Atlantis is described in 8.2 Calling the Athena vertex fitter from Atlantis.

N.B.: If the user opts for some reason not to use the Athena algtools and still be able to start InteractiveServer.py, it's possible to create the server without initialising the algtools. Before starting the script on the Python prompt by execfile ("InteractiveServer.py") it is necessary to make the following assignment:

argumentInteractiveServer = "NO_ALGTOOLS"

It is not then possible to obtain the XML event data (JiveXML algtool) or run the vertexing in Athena.

N.B.: If due to network security restrictions the connection between Atlantis and the InteractiveServer.py on the Athena prompt can't be established directly, an SSH tunnel can be created throught which both parties should be able to connect.

8.1 Setting up Atlantis Interactive Athena communication

  • Atlantis has been started (most likely on the local machine)

  • Athena environment is set up (most likely run remotely)

  • Getting InteractiveServer.py to the run directory: get_files InteractiveServer.py (or copy from CVS)

  • Starting Athena in the interactive mode: athena -i myTopOptions.py

  • Type command: theApp.initialize() (it could also go at the bottom of the top options file)

  • Start server by execfile ("InteractiveServer.py") after which the interactive prompt is taken over by the script.

  • Provided that everything went well (no error messages were printed), algtools were initialised and the server was bound to the port, copy and paste this information into the Atlantis dialog:

    • server name

    • server port

    • key

    Key is a randomly generated string and is a protection against user's Athena session being driven by another user who happens to put into his Atlantis dialog window the name of the remote machine and the port that someone else is using.

  • Provided that there are no network security issues disabling direct communication, the user can now type the Athena commands in Atlantis, steer Athena and demand the actual XML event data or run the Athena vertex fitter from Atlantis.

  • theApp.nextEvent() should be the first command to execute in order to be able to obtain some XML event data.

  • Pressing Ctrl-c shuts down InteractiveServer.py and the interactive prompt is given back to the user.

  • myTopOptions.py (bottom of the file)

    doJiveXML = True

    include ("RecExCommon/RecExCommon_topOptions.py")

    include ("PyAnalysisCore/InitPyAnalysisCore.py")

    include ("InteractiveTools/jobOptionsBase.py")

    ToolSvc.EventData2XML.DataTypes += ["Vertex"]

    ToolSvc.EventData2XML.xKalmanTracks = "Tracks"

    # vertexing algorithms

    # ToolSvc.VxWrapperTool.VxToolName = "Trk::FastVertexFitter"

    ToolSvc.VxWrapperTool.VxToolName = "Trk::FullVertexFitter"