next up previous contents index
Next: Compiler Flags Up: CODA Readout Language (CRL) Previous: CODA Readout Language (CRL)   Contents   Index

File Format

Each ROC configuration file is composed of 1 or more sections of code to be executedupon receipt of a corresponding event, either a hardware trigger or a change-of-state command from Run Control. In addition there may be a section of declarations and/or definitions at the top of the file, for example to define constants, global variables, and compiler options. Each section other than the declaration/definition section starts with a"begin section-name" and ends with "end section-name". More experienced programmers can take advantage of the ability to embed their own c code into the crl file directly or via an optional include statement:

# comments start with pound signs 
readout list Fred              # give list a name 
sfi readout                    # set compiler for SFI hardware 
const SLOTS = 5                # constant definition 
variable i                     # global variable declaration 
include "mycode.h"             # include users c code  
begin usercode                 # begin section for user specific routine 
%%                             /* imbed section of c code using %% */

... 
%%                             /* c comments also allowed anywhere */ 
end usercode                   # end must have matching name 

begin prestart                  # hardware initialization

... usercode();                 /*single line c code requires semicolon*/ 
end prestart



Mohammad Ahmed 2003-07-23