Output command

The OUTPUT command allows whole events or data words, 16-bit sortwords and parameter lists to be output on up to 4 different streams. The output stream number must be an integer value between 1 and 4 (inclusive). The data will automatically be output in Eurogam-style format with an event-header, etc. per event.

This form of the command will output all elements of the event as defined in the *FORMATS section. Note that any data items in the event, but not defined in the *FORMATS section, will not be output.

Although several such statements can be included (e.g. within if clauses), only the first statement reached will be executed.

Example

SELECT (I)
(1) OUTPUT  1  EVENT
(2) OUTPUT  2  EVENT
(3) OUTPUT  1  EVENT

This command can be used to output partial event components and generated simple variables.

Example

*FORMATS
TRIG[255] (MUSER,MTAC)
GE[1:54] (E1,E2)
*COMMANDS
OUTPUT  1   TRIG(MTAC) GE(E2)

If WORD type variables are output in the format specified above they must also be defined with an associated address to make them simulate real ADCs. See Sortwords section.

Note

If any commands have been used to alter any event parameters, e.g. GAIN, INVALIDATE or arithmetic operations, prior to OUTPUT EVENT then the altered values will be output.

Example

OUTPUT  1 GROUP 234  ( A, B)

This command can be used either to output an existing group with a modified item list, or a new group.

Care must be taken that group numbers are not duplicated within an event. The following example is illegal if group 15 is present in the raw data, but would not be checked for by the compiler.

Example

OUTPUT  1  EVENT
...
OUTPUT  1  GROUP 15 (A, B, C)