Data from the detector is digitized by electronic modules such as TDCs and ADCs which are read out by a program called the "Readout Controller". The software to hardware interface is via standard libraries. In this way a CODA readout controller can be run on a wide variety of hardware. Currently LINUX, UNIX and VxWorks are the supported operating systems for the readout controller software. The trigger may take one of several forms, a software trigger, a polled hardware trigger and a system interrupt. In the case of hardware triggers (i.e. external events) the interface between the CODA software and the hardware is a software layer called the trigger dispatcher. This software has a standard API which allows trigger interfaces to be defined. In this way most hardware can be accommodated. In the case where the trigger hardware does not fit the CODA API the user can directly code the trigger interface in C. The standard trigger interface code is generated automatically for the user depending upon the type of hardware that the readout controller software is running on. For example an SFI trigger interface is assumed if the readout controller is running on FASTBUS hardware.
Trigger signals may be fed directly into readout controller hardware or into the Trigger Supervisor (TS). This is a high speed custom trigger interface designed at Jefferson Lab to coordinate triggers in systems containing a large number of readout controllers. The Trigger Supervisor supports up to 12 trigger inputs with pre-scaling by up to 224. As many as 3 levels of experiment specific trigger logic may be connected to the TS for hardware event selection.
Since the type and distribution of digitizing electronics often varies during the life of an experiment the Readout Controller must be customizable. Firstly the algorithm to read out the digitizing hardware is required. Secondly the user provides an algorithm which formats the data in a way that offline analysis can understand. This second step could, for example, involve translating physical addresses of modules into logical addresses describing the function that the module performs. Both of these algorithms could be combined into a single package. In CODA the possibility exists to split the readout and formatting into two separate user provided packages called Readout Lists (ROL). The primary reason for doing this is to decrease deadtime. The first readout list holds up the trigger until it is completed and contributes to deadtime. By splitting off the formatting into a second readout list the digitizing hardware can be cleared and the trigger enabled as soon as possible after the data has been read off the hardware. In many cases no address translation and other formatting steps are required and only one ROL is used.