Added Tcl features
The readout program extends the Tcl/Tk language in several important ways:
- Several commands are added to allow you to control
data acquisition
- const variables have been added to allow Readout and
your application to display status information that cannot
be altered by the command interpreter.
- Run Variables have been added to allow you to
periodically log relevant time varying parameters to the
event stream.
- State variables have been added to allow you to define
variables that are write protected during the run, and are
logged at state transitions to the event stream.
Added commands include:
- begin Enable data taking for a new run. The state variables
are write protected and internally maintained const variables are
updated to reflect the current state of the system. Active runs
may be paused or ended.
- const Defines or manipulates a const variable. As far as Tcl/Tk is
concerned, a const is a variable that refuses to be modified by
scripts. It can, however be modified by the C/C++ application. The
intention is that you use const variables to reflect internal program
state.
- end Ends a run that is in progress. Data taking is disabled and
the state variables are unprotected so that you can modify them
between runs.
- exit Exit has been redefined to refuse to exit unless
data taking is inactive (never begun or end was the last run
state command).
- pause Pauses a run. When the run is paused, state variables
are still locked, but data taking is disabled. Paused runs may be
resumed or ended.
- resume Resumes a paused run. Data taking is re-enabled.
- runvar Creates or manipulates a run variable. Run variables
are automatically logged to the event stream with the same
periodicity as scaler reads. This allows you to log parameters
that may change during the run simply by maintaning them in
run variables.
- statevar Creatse or manipulates state variables. State
variables are write protected during runs (between begin and end).
The may be modified freely while the run is halted. State
variables are logged to the event stream at the beginning of
the run. State variable are intended to represent invariant
features of the run, for example, the run number, the beam, target
etc.
The readout software pre-defines several run variables and consts:
Variables maintained by Readout
Name | Contains | Type |
events | Events accepted since last begin run | const |
experiment | Experiment description | run variable |
period | Seconds beetween scaler readouts | run variable |
run | Run number of current run | run variable |
starttime | Time at which most recent run started | const |
state | State of the run Active | Paused | Inactive | const |
title | Run title | run variable |
tkloaded | true if --window mode | const |
words | Number of words of data taken since last begin | const |
|
Report documentation errors to
Ron Fox
(fox@nscl.msu.edu)or
NSCL's Bugzilla page