EVBLite is a Linux pipeline. The evblite Tcl package makes it easy to define, start and stop the EVBLite pipeline passing the evbtagger and glom programs any options required to make the function properly. The evblite package can be used in the ReadoutCallouts.tcl script to automatically start the pipeline. It is recommended that this be done in OnStart as the pipeline is persistent.
Here's a sample fragment from a ReadoutCallouts.tcl script that sets up and starts EVBLite when the system transitions from not ready to halted:
Example 9-1. Starting EVBLite from ReadoutCallouts.tcl
package require evblite... set evbInstance [evblite::evblite %AUTO% \ -insid 0 -inring rawdata -outring builtdata -dt 1000]
... proc OnStart {} { ... $::evbInstance start
... }
Let's deconstruct this step by step. Note, however, that the example above assumes the script is running in an environment wich includes $DAQROOT/TclLibs in the Tcl package search path. This is the case in ReadoutCallouts.tcl. When using the manager, the container initialization script can source an appropriate daqsetup.tcl and the program definition can define the TCLLIBPATH environment to be $DAQROOT/TclLibs.
configure
subcommand to configure the event builder
after instantiation. Configuration is done using the option database. The full set of options
accepted by evblite objects can be found in the refrence pages. We use:
-insid
specifies the input source id. If non physics items are found
with no body header, this is the sourcde id that will be put in its fragment header.
Note; EVBLite requires that all physics items have body headers.
Specifies the ringbuffer (name not URL) that will be the source of data for EVBLite. If a remote ring is desired you can specify the proxy ring for the remote ring in the localhost.
Specifies the name of the ringbuffer into which EVBLite will put built event data. Ringbuffer producers must be local so the ring buffer is specified by name rather than URL.
Specifies the event builder coincidence window. Events will all lie in a time interval where their timestamps will be at most 1000ticks larger than the initial fragment.