spectcldaq -- Pipe data source for SpecTcl in spectrodaq buffer mode.


spectcldaq ring-url


This script sets up a pipe data source consisting of ringselector and compatibilitybuffer. The result is a pipe data source from the ring buffer daq system that presents data to SpecTcl in spectrodaq buffer format. This allows existing SpecTcl data analysis software to attach to the ring buffer data acquisition system without modification to anything but the attach scripts.

The ring-url parameter provides the URL for the ring into which the readout program is putting data. This is of the form: tcp://hostname/localringname where hostname is the name of the host on which your Readout program is running and localringname is the name of the ring into which Readout is putting data. By default the ring name is the username under which Readout is running which, in turn, is usually your logged in username. Note that if Readout is running in the same host as this program a host of localhost is more efficient than specifying the host name itself.


The BUFFERSIZZE environment variable sets the size of the spectrodaq buffers emitted in bytes. This defaults to 8192.


The example below shows a proc that attaches SpecTcl to a ring buffer using spectcldaq and starts analyzing data from that ring. It is assumed that the environment variable DAQROOT is defined to point to the root of the ring buffer data acuisition system (e.g. /usr/opt/daq/10.0). The host is a parameter to the procecdure:

Example 1. Attaching SpecTcl to a ring buffer in compatibility mode

proc attachOnline host {
    global tcl_platform
    global env

    set user    $tcl_platform(user)
    set daqroot $env(DAQROOT)
    set spectcldaq [file join $daqroot bin spectcldaq]

    attach -pipe $spectcldaq tcp://$host/$user


Note that the variables tcl_platform and env are built-in Tcl variables. tcl_platform is an array whose elements are various platform specific itesm the user element contains the logged in user name. env is an array whose indices are environment variable names and whose values are the values of those variables.