48.3. Using the S800 integration package

To use the S800 integration package you must

The following is a minimal example:

Example 48-1. A ReadoutCallouts.tcl for the s800


lappend auto_path /usr/opt/daq/10.1/TclLibs (1)
package require s800

s800::Initialize spdaq48                   (2)
proc OnBegin run {
    s800::OnBegin                          (3)
}
proc OnEnd run {
    s800::OnEnd                            (4)
}

            
(1)
This line adds the Tcl library directory for nscldaq 10.1 (as installed at the NSCL) to the Tcl package search path. The next line loads the s800 package and its commands.
(2)
Initializes the S800 package. In this case, spdaq48 is the host on which the S800 readout program must already be running. One side effect of this is to form a connection with the S800 readout program and set its GUI into slave mode.
(3)
The OnBegin proc in ReadoutCallouts.tcl is ivoked as the run is beginning. The s800::Onbegin function sets up, if needed, the necessary bits and pieces of software needed to get data from the S800 event builder and insert it into the ring (by default named s800). It then requests the the s800 Readout program start taking data.
(4)
Similarly, the call to s800::OnEnd asks the S800 readout software to end the run as a result of a click on the End button.