This software is a set of pre-packaged device drivers that are layered on top of The SBS Readout framework. You can use this to quickly set up readout software without any C++ programming, provided that your readout requirements are simple and supported by the drivers provided by this framework. You can also write your own device drivers and link together a custom version of this program if you have a device that is not supported by the driver but supported by the general concept of the program.
The remainder of this chapter will:
Introduce the general concepts behind the scripted readout software. Sample setup files are provided as well.
Describe how to write drivers for additional hardware. This section will also describe how to build a custom scripted Readout programs that incorporate your customized drivers.
Describe how to build a hybrid Scripted Readout program which incorporates one or more scripted event segments together with hand written C++ event segments.
The SBS scripted readout framework allows you to configure simple readout programs by providing a Tcl script that describes and configures the modules you are using as well as the order in which you want them read out. Currently supported modules are:
The V775 is a TDC, the V785 a peak sensing ADC. The V792 and V862 are charge integrating ADCs (QDCs) where the V862 has independent per channel gates.
This is a 32 channel scaler module that is most often used in scaler segments.
This is an 8 channel flash adc. The command provides support for the SIS 3301 as well as the SIS 3300.
This is a family of multi-hit TDC modules that range from 16 to 128 channels.
This is a container for other modules that prefaces data from a group of modules with a size and identifier.
See Writing a driver for information about how to extend the support of the scripted readout to other drivers. See Hybrid scripted readouts for information about how to mix the scripted readout with custom code that is not scriptable. Unless modified, the system requires a CAEN V977 to act as both the trigger and the busy if used unmodified.
When the Scripted readout system starts, it reads an event and a scaler configuration script. These are both Tcl Scripts with extensions that will be described later in this section. Those extensions allow users to describe modules that will be used by the experiment and the order in which those modules will be read.
The configuration scripts are hardware.tcl for physic triggers and scalers.tcl for the scaler cofiguration script. These are searched for inorder, the user's home directory and the current working directory. The filename can be overridden by defining the environment variable HARDWARE_FILE to point at the event configuration script and SCALER_FILE to point to the scaler readout configuration script.
The Readout script is an ordinary Tcl script that makes use of a few extensions to the language that support the definition configuration and organization of modules.
module Primarily creates new modules. When you create a module, you assign it a name. That name then becomes both a Tcl command, which you use to configure the module, and a handle to use when other commands refer to that module. Modules also have a type that represents the hardware they know how to control.
Example 66-1. Scripted readout module command for a CAEN V775
module adc1 caenv775 adc1 configure base 0x1240000 slot 5
readout Is the command that defines which modules will be read in reponse to a trigger and in which order the readout will proceed. The readout command provides the add subcommand for adding modules to the readout list. The modules will be read in the order in which they are added.
Note that the Scaler and Readout configuration files use exactly the same command extensions. Each runs in its own interpreter however so that there is no mixup between scaler modules and their read orders and the read order for modules that respond to event triggers.