next up previous contents index
Next: Hardware I/O Up: Language Elements Previous: Trigger Elements   Contents   Index

Event Building

The CODA event format is built upon a bank structure. Typically, one event from a ROC contains a single bank of data of a specific type (i.e. longwords as read from the front end modules). However, it is often useful to build a ROC event that has a multi-bank structure. The following open event...close event and open bank...close bank constructs are available to facilitate event building on the ROC:

open event type <xxx> of data_type 
open bank <xxx> of data_type [code <zzz>] 
close bank 
close event

The variable $<xxx>$ typically contains a unique bank or event type identifier (16 bits).For an event bank this is typically the physics event type (1-15). The data_type is a string indicating the type of data that is in the bank or event. For example:

BT_UI4                   4 byte integers 
BT_UI2                   2 byte integers 
BT_CHAR                  null terminated ASCII string 
BT_BANK                  a bank containing banks
The code variable $<zzz>$ is an optional 8-bit value entered into the low byte of the bank header. For an event bank this defaults to the event number (modulo 256).



Mohammad Ahmed 2003-07-23