The history of CODA

A rambling webpage

 

The data acquisition group was formed in the late 1980's as the construction of the laboratory was beginning. The goal was to provide a uniform data acquisition system for the three main experiments.

CODA Version 1

The development of CODA began with an evaluation of data acquisition hardware and software available in 1989-1991 to determine which course of action would lead to a design which would be able to run the experiments. These tests lead to the development of CODA 1 which was used during detector development and for early runs of the first experiments in experiment halls A and C.

The 1.x versions of CODA were based on code originally written on ULTRIX workstations starting in 1990 with the first useable version released within the lab in 1992. Many lessons were learned during the use of the early CODA versions and were included in revisions and updates. The original plan was that the next version of CODA after 1.2 would be version 2.0. (A decision made during the last months of Chip Watson's tenure as head of the data acquisition group at CEBAF). At about the same time the laboratory was in the throes of introducing the HP-UX operating system to run along side ULTRIX. Version 1.3 of CODA was introduced in 1993 to provide cross platform support for ULTRIX, VxWorks and HP-UX from common source code. This later proved to be a good investment as, at the end of 1995, the decision was made by the laboratory to phase out ULTRIX and introduce AIX and SOLARIS.

CODA was never ported to AIX, by the end of the port to Solaris AIX had fallen out of favor as a recommended operating system at Jefferson lab. Versions 1.4 and 1.4.1 of CODA were a response to the use of CODA in hall C and contained updates to facilitate the running of "real experiments". During late 1993 and through 1994 the focus of the group was to prepare and support the first physics experiments in Hall C and the work detector development work being undertaken by the hall A and B collaborations to prepare for data taking. Version 1.4.1 proved to be so stable that no further major modifications were made and CODA development effort after 1994 focussed on CODA version 2 which was a redesign focussed on the requirements for the CLAS detector in hall-B. 

 

CODA Version 2

Given the predicted, for the time, high data rates (>10 Mbytes/Sec) and complexity of the CLAS spectrometer in Hall B it was clear that a major rewrite of large sections of code was advisable. This allowed us to take advantage of lessons learned from running CODA 1 in halls A and C, and advances in programming techniques and operating system features since the project started. The name CODA 2.0 was reserved for this new, mostly re-written version of CODA. The 1.X numbering system was continued for bug fixes (versions 1.3a, 1.3b, 1.3c) and for the release of CODA2.0 features on top of an essentially CODA 1.3 core (versions 1.4, 1.4a and 1.5). Versions 1.4 and above were actually prototypes for CODA 2.0.

CODA 2 was designed to be highly modular so that individual modules could evolve to meet future needs.  It used a minimum of commercial software but did make extensive use of third party packages. The embedded controllers still required VxWorks but the version 1 reliance on Eiffel, Dataviews and RPC was removed. CODA was now extremely portable since it is now written entirely in C, C++ and the Tcl scripting language which were available on all VxWorks and UNIX platforms. The GNU build configuration tools allowed automatic generation of Makefiles so that porting to new platforms was simplified and could in many cases be done by users without help from the data acquisition support group. All of the third party packages, mostly extensions to the Tcl language but also the MSQL database, were either "freeware", GNU, or free to non-commercial organizations. Care was taken that third party packages were extensively tested. Unfortunately in some cases we were forced to modify third party software, such as itcl, to add functionality which was useful in our application but were not adopted by the software's original authors. For these reasons many third party packages were frozen at stable versions and not subsequently modified except for bug fixes. In particular we froze Tcl at tcl7.4 but added packages that gave us most of the functionality of tcl8 without having to wait several years for tcl8 to stabilize.

The Run Control program, which provides central control of the data acquisition system, was originally written in the Eiffel object oriented programming language. Eiffel never reached the mainstream and was overtaken by C++. As a consequence Run Control was re-written in C++ based losely on the output of an Eiffel to C++ translation. The CODA version 2 Run Control was actually two programs, a GUI called runcontrol, and a server called rcServer. Multiple copies of "runcontrol" could be run and connected to a single server. Separating user interface from the server meant that control could be transferred between user interfaces without interrupting data taking. Although this was a highly requested feature, transferring control between user interfaces never saw a great deal of use. The run control server was part of the "session management" system of CODA 2.0. One problem with CODA 1.x was it's inability to have multiple copies of the data acquisition system (sessions) sharing the same set of configuration files. In CODA 2.0 each instance of rcServer is defined to be a "CODA session" and an entry is placed in the database describing the session. The CODA software keeps track of which configurations of hardware and software are being used by each session and attempts to ensure that two people do not try to control the same device or process at the same time. This concept was designed for use in the early stages of data taking when "experts" on different aspects of the detector need to run independent data acquisition on their own part of the detector.

By the end of 1998 all three major experiments, plus experiments such as Rad-Phi which shared space in hall-B alongside CLAS, were using the same version ( 2.1 ) of CODA. The Continuous Electron Beam Accelerator Facility was renamed "The Thomas Jefferson National Accelerator Facility" or "Jefferson Lab" in 1996 to mark the end of the construction phase of the facility. CODA had already gained enough recognition in the data acquisition community that the name CODA was retained even though the C in the name was for CEBAF.