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 63-1. Using the EVBC state manager callback bundle
package require evbcallouts proc OnStart {} { EVBC::useEventBuilder EVBC::configure -gui 1 -destring foxy -glombuild 1 -glomdt 10 } proc startEVBSources {} { EVBC::startRingSource tcp://localhost/fox1 stampextractor.so 1 {Source 1} EVBC::startRingSource tcp://localhost/fox2 stampextractor.so 2 {Source 2} }
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.
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.
EVBC::startRingSource
to start a ring data source.