Introduction
The SNS is an accelerator for pulsed, high-intensity neutron production. For general-purpose, high-level accelerator physics applications for SNS commissioning and operation, a Java-based software infrastructure called XAL [1] is designed and implemented. The XAL is a programming framework providing an object-oriented model of an accelerator, interfaces to the SNS control systems for dynamic data and to the SNS global database [2] for static information, interfaces to various external modeling software packages, and a built-in lattice tool [3] mainly for quick, on-line calculation. The entire application software infrastructure is shown schematically in Fig. 1. A subset of the global database is extracted into portable extensible markup language (XML) formatted files which can be any part of the entire accelerator. The communication between the applications and the control hardware is through an EPICS Java Channel Access layer embedded in the XAL. Also, an optional data correlation engine in the XAL ensures the event data collected all occurred within a specified time window, usually the beam pulse width. The framework also provides standard user interface design such as common look-and-feel, Java logging and user preferences, and on-line help in HTML form. To test the framework and applications without a real accelerator running most of the time, we rely on an accelerator simulator called the virtual accelerator [4] with Trace-3D and PARMILA as model engines and portable channel access server as EPICS data provider. The advantages of this simulator are model-based simulation, and the same data acquisition interface and the same EPICS process variable (PV) settings as been used on the real machine.
Application software infrastructure.