You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

This page describes the process of running an XAL model of the LCLS accelerator, and uploading that model to Oracle, from where it can be accessed by Matlab and Java applications through AIDA.

Run a model

Copy the file to the following directory. It's necessary to copy it to here because it has to be in a directory that can be accessed by the web browser used in the following step.

/u1/lcls/physics/onlinemodel/xal

Upload the files.

Start a browser

Start a browser on lcls-prod02, such as by hitting the browser icon on a control room OPI. The reason it's important to run the browser on lcls-prod02, is that the browser has to be able to access a URL in the SLAC internet space, and simultaneously access the filesystem directory where the models have been put. Don't complain to me about this complexity, talk to the Controls Department Systems Group. It should of course be that any browser should be able to access LCLS model data output.

So, either, on lcls-prod02:

kinit (to get a token, which is necessary to start firefox)
firefox &

or, go to a control room OPI and use the icon.

Use APEX to upload the file.

https://oraweb.slac.stanford.edu/apex/slacprod/f?p=400

Supply your Windows username and password. Don't tell firefox to remember your password.

Hit the Browse button next to "Select Device File".

In the filebrowser, browse to /mccfs2/u1/lcls/physics/onlinemodel/xal and select the file "modelDevices.xml".

Update the AIDA Directory service

Having uploaded a new model, we have to tell Aida to update its database of the names of XAL modelled devices. We will teach first aidadev, then aidaprod databases. These are, respectively, the Oracle usernames (ie subschema) of the Aida directory services used on the aida development and production networks.

  1. Log into an AFS Solaris machine like tersk02, and set up the cdsoft environment
    ssh -l<your-username> tersk09
    tersk> source /afs/slac/g/cd/soft/dev/script/ENVS.csh
  1. Enter sqlplus for user AIDADEV on database SLACPROD (SLACPROD will be set by sourcing ENVS.csh above).
    sqlplus AIDADEV/<aidadevpassword> 
    

Run the updating procedure. This will look in the ELEMENT_MODELS which was updated by the APX load above, and, for every row that has a match in LCLS_ELEMENTS, it will update Aida's directory service with a name composed of the EPICS name of the device + '//twiss' and '//R', and tell Aida that that device's model is to be acquired from the XAL Aida data provider (service id 202).

SQL> exec aida_all_changes;

PL/SQL procedure successfully completed.   <-- you should see this

At the time of writing aida_all_changes will overwrite the service id of all the matching names it finds in LCLS_ELEMENTS whose name it finds in the aida directory database, from service 63 (SLC Dimad) to 202 (XAL). That is, for the names in both SLC and EPICS namespaces, as writen, it will assign them to XAL. So, this should be changed before uploading a new model to AIDAPROD unless the XAL model in ELEMENT_MODELS is completely certified.

You can see which names are assigned to the XAL model server by AIDA, use the following sql script

SQL> @show_IA_given_serviceid 202

Now go over and update the AIDAPROD names too (don't wait, all names should be in sync), run aida_all_changes again, and verify the names added again.

SQL> connect aidaprod/g1v_erdi
Connected.
SQL> exec aida_all_changes;
SQL> @show_IA_given_serviceid 202
  • No labels