58.3. EVBC state manager callback bundle.

This provides the simplest way to incorporate the event builder into your experiment. While the 3evb manpage provides reference information, a short example is provided below for using this mechanism with an event builder for which building is enabled, with a time tolerance of 10 clock ticks, and output ring named fox and Two ring data sources from rings fox1 and fox2.

Example 58-1. Using the EVBC state manager callback bundle

package require evbcallouts                   (1)

proc OnStart {} {                            (2)

    EVBC::useEventBuilder                    (3)

    EVBC::configure -gui 1 -destring foxy -glombuild 1 -glomdt 10 (4)
proc startEVBSources {} {                    (5)
    EVBC::startRingSource tcp://localhost/fox1 stampextractor.so 1 {Source 1} (6)
    EVBC::startRingSource tcp://localhost/fox2 stampextractor.so 2 {Source 2}
Incorporates the package code into your script. This makes all three APIs visible and accessible from your script.
The OnStart is called from the ReadoutGUI when it makes a transition to the Halted state from NotReady. The registration and configuration code are done at that time to ensure that the ReadoutGUI's GUI has been fully built before building the event builder's GUI so that it can be properly placed at the bottom of the user interface.
Informs the state manager that you will be using the event builder. This call registers the event builder with the state manager which calls the event builder bundle's initializatiuon entry.
Configures the event builder to enable its user interface, place the output of the last stage of the building pipeline in the local ring named foxy, enable event building by the glom stage of the pipeline with a time tolerance of 10 clock ticks.
When the event builder is started, if you define a proc named startEVBSources, the bundle will call that proc when the event builder has been started. The purpose of that proc is to set up event sources to transmit data to the event builder.
This line and the next set up a pair of event sources using the convenience function EVBC::startRingSource to start a ring data source.