XAL Applications Development

Which account should I use?

XAL applications development should be done from the "softegr" account, preferably on lcls-builder.
XAL applications being used in production running of LCLS should be run from the "physics" account, on lcls-srv01.
If you are authorized to use these accounts, you should hav the RSA credentials in your AFS account. You must first log onto lcls-prod02 to access either lcls-builder or lcls-srv01. So, your locing process will be one these two, starting from a SLAC network machine:

ssh -l<your-SLAC-username> -Y lcls-prod02
followed by either
ssh -lsoftegr -Y lcls-builder
or
ssh -lphysics -Y lcls-physics

softegr has the SAME Java Channel Access properties (~softegr/.JCALibrary/JCALibrary.properties) as the physics account, so when you are using softegr you are connected to the prodction PVs and can change them, so be careful. The difference between softegr and physics accounts, is in the default model files and data file locations.

How do I develop and release an XAL application for LCLS?

Follow the README file in /usr/local/lcls/physics/xal4lcls/README

Which version of java is required for XAL?

On linux (such as lcls production machines) Java v 1.5 (1.6 is not compatible, due to a bug in java's handling of Preferences on Linux)

How do I start XAL apps?

XAL applications are started by a luncher system symlinked from the directory /usr/local/lcls/bin/ which is in the PATH. Each app's own launch script uses /usr/local/lcls/tools/script/xalapplauncher to set basic environment and actually run the executable. See the README named above for instructions on how to add an app to this system. To start an XAL app "by hand", as an example:

export JAVA_HOME=/usr/local/lcls/package/java/jdk1.5.0_14
export PATH=$JAVA_HOME/bin:$PATH
java -jar /usr/local/lcls/physics/xal4lcls/build/jar/apps/mpx.jar &

Data Locations

Where do applications store data and configurations?

The data directories of XAL applications, are defined with respect to the DEFAULT_FOLDER Java preference value. Apps use it as the Root directory of the folder into which they store either configuration data, scientific data, or both. That is, they use the name: DEFAULT_FOLDER/<appname>. DEFAULT_FOLDER has the following values:
For softegr:

/usr/local/lcls/physics/data/

For physics:

/u1/lcls/physics/data/

The named directories are also used as the default folder in the Dialog Box of XAL apps, when running in softegr or physics respectively.

Where is DEFAULT_FOLDER defined:

In ~/.java/.userPrefs/gov/sns/application/prefs.xml. Since ~ is different for physics and softegr accounts, this how the value is different in the two accounts.

XAL Model Files for LCLS

Where are the XAL model (.xdxf and .xal) files?

There are 3 locations of the XAL model files:

  1. The production model is in:
    /usr/local/lcls/physics/config/model/
    
    This is the CVS checked out production model directory. That directory is symlinked from /u1/lcls/physics/config/model@, so the Default Accelerator is the same file whether accessed from physics or softegr accounts.
    This is what you get in XAL apps with Accelerator -> Default Accelerator.
    The main.xdxf file contains the hardware information, as specified in the db. Version 1.1 of lcls.xdxf is in CVS is at http://www.slac.stanford.edu/cgi-wrap/cvsweb/physics/config/model/lcls.xdxf?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=LCLS (this is XML, so may not display properly in some browsers, eg IE (since no stylesheet), Safari. Should work in Firefox).
  2. Test models are in:
    /usr/local/lcls/physics/config/model/test/
    
    This is where test models of the LCLS accelerator are kept. That is, this directory is primarily for physicists and operations, to experiment with model changes. In XAL applications, use the Accelerator -> Load Accelerator ... dialog to navigate to this directory.
  3. Software development models are here:
    /usr/local/lcls/physics/xal4lcls/xal_xmls
    
    These are primarily for software engineers, to develop modelling itself.

MATLAB and XAL

Where are XAL matlab files?

Presently, XAL matlab files are in CVS module matlab/src/. This is checked out to /usr/local/lcls/tools/matlab/src/.

Where is the development README for Matlab development with XAL?

/usr/local/lcls/tools/matlab/src/README

Scripts

Where are scripts located?

Scripts that are specific to an application are kept with the application. Eg /usr/local/lcls/physics/xal4lcls/gov/sns/apps/knobs/knobs is a script called "knobs", which starts the knobs application. This script would then be in the CVS module physics/xal4lcls/gov/sns/apps/knobs.
Scripts which are common across apps are in /usr/local/lcls/tools/script/ (CVS module tools/script).

How do I edit and release scripts for an app?

As said above, scripts that are specific to an application are kept with the application. Eg /usr/local/lcls/physics/xal4lcls/gov/sns/apps/knobs/knobs.

Standards

Are the GUI Standards?

At the time of writing we have emerging standards for XAL Applications. They're in sharepoint here

Where are standard header files, such as for Matlab and bash scripts?

CVS module physics/common/standards. This is checked out to:

/usr/local/lcls/physics/common/standards/
  • No labels

1 Comment

  1. TODO: Add where modelling sections are defined:

    • Paul's powerpoint
    • Tables in the db