package require Tk package require EventBuilder
EVB::getConnections
EVB::setDisconnectCallback script
EVB::setConnectionCallback script
EVB::Start ?name?
EVB::setSourceTimeout timeout
EVB::getSourceTimeout
EVB::startRingFragmentSource url tsex id desc exitmsg
EVB::startS800FragmentSource url id ?desc?
EVB::startGretinaFragmentSource url id ?desc?
EVB::getConnections
Returns a list of information about connected clients. Each element of the list is itself a sublist containing the following elements in order:
The host name of the client.
Description of the client as supplied by the client when it connected.
The connection state.
Either an empty string or yes if the connection has not recently sent any fragments but other source clients have. This datum is called the stalled flag. When yes it is possible that the source has failed without exiting.
EVB::setDisconnectCallback script
Sets a new script
that will be
called when an event
source disconnects. The host and description of the
connection will be appended in that order to
script
prior to invoking it.
EVB::setConnectionCallback script
Sets a new script
that will be
called when the event builder receives a new
data source client connection. The host and description
will be appended, in that order, to the script
prior to invoking it.
EVB::Start ?name?
Starts the event builder. Naturally this must
be the first thing called as without it the event
builder does not yet exist. The optional
name
parameter supplies the
event builder name. EVB::Start will
pop up a Tk dialog warning you if you choose a duplicat name.
EVB::setSourceTimeout timeout
Sets the source stall timeout. If other sources are
contributing data any source that is not contributing
data for more than timeout
seconds is considered stalled.
A source becomes un-stalled by sending a fragment.
EVB::getSourceTimeout
Returns the source stall timeout as the command result.
EVB::startRingFragmentSource url tsex id desc exitmsg
Starts an event fragment source that takes data from an NSCLDAQ ring, extracts timestamps and inserts the data into the event orderer. The fragment source runs on the same system as the event builder but, of course the ring buffer could be remote.
url
speceifies the source data
ring. tsex
specifies the
shared library that extracts timestamps from event
fragments. id
specifies the
source id that will be used for data from this ring
and desc
specifies the description
the source will provide the event builder when it starts.
The event source runs as a child process whose
stdout and stderr are a pipeline that is monitored.
If an end of file is sensed on that pipe, a message
including exitmsg
is displayed
as a dialog on the UI.
EVB::startS800FragmentSource url id ?desc?
This is really a call to EVB::startRingFragmentSource with the time stamp extractor set to a library that is suitable for S800 data and an exit message that indicates the S800 event source exited.
The larger implications of this are that the connection between the S800 DAQ and the producer for this ring are not setup by this command. Typically that is done in readout callouts for the ReadoutGUI.
EVB::startGretinaFragmentSource url id ?desc?
Really a call to EVB::startRingFragmentSource supplying a timestamp extractor suitable for most GRETINA event data. The exit message in this case indicates the GRETINA data source has exited.
Typically the producer for the ring is set up by a readoucallouts extension in the Readout GUI.
The actual timestamp used is the timestamp of the first fragment in the glommed data from the ring.k