Run Control system description
The control of the run is performed by means of two processes, runctl and operator.
In each DAQ node a command server (cmdsrv) runs, which role is also important to understand how the system works.
- Runctl controls and synchronizes all the distributed processes that take part to the DAQ and manages run conditions.
- All information about the run is hold by runctl and distributed to the DAQ nodes, usually as parameters of the run control commands.
- Runctl is a finite state machine: its run states correspond to the states of the DAQ system.
- Each run control command triggers actions in the DAQ processes and causes a state transition of the whole DAQ system.
- Operator is the graphic user interface of runctl.
- It displays the run parameters and messages received from the DAQ processes.
- Its buttons allow to issue the run control commands, that change the run state.
- Several menus allow to set run conditions in runctl, to start monitoring tools, to configure and to reset the DAQ system. DAQ configuration depends on the run type.
- Cmdsrv manages the remote communication, based on the SNMP protocol, in the KLOE messaging system.
- Through the cmdsrv any process in the system can receive messages (in the form of commands) by any other process. The command server itself can receive commands.
- Run control commands are not addressed directly to the DAQ processes, but distributed to the DAQ nodes addressing to the node cmdsrvs.
- At configuration time, a node type is assigned to each DAQ node, that determines the function of the node in the DAQ system, i.e. which processes run on the node.
- According to the node type, the command server distributes the run control commands to the processes running on the node.
Run states
The DAQ system state is represented by runctl run state. Each DAQ process has its own state, that is consistent to the run state unless errors occur, and works according to it. Four states are possible for the DAQ system:
- When processes are started the run state is UNDEFINED. When an error occurs in a process, it falls in UNDEFINED state. This is reported to runctl, which state changes to UNDEFINED.
- After process initializations, the system is ready to take data and its state is INITIALIZED. When a run is closed its state is again INITIALIZED.
- RUNNING is data taking state.
- Run state is PAUSED when data taking is temporarily suspended, without closing the current run.
Run control commands Five commands are issued by runctl to cause run state transitions: Init, Start, Pause, Resume, End The following scheme shows the permitted transitions in each run state.
Run conditions The main run conditions are set choosing the run type and whether data are recorded on disk or discarded. Runctl manages more conditions, such as the run number, the max number of events to be acquired, the number of events to be transmitted in a packet, the enabling of zero suppression.
Run types Several run types are available, each corresponding to a DAQ configuration. Every time you change the run type, you are asked to configure DAQ again.
- Physics runs can be global or partitioned: Normal (all DAQ chains), CALorimeter chains, Drift CHamber chains.
- A SIMulated run is possible, where data coming from FEE are randomly simulated by the collector process.
- Calibration runs are available for the different parts of the detector: PED and PLS run for calorimeter calibration, ADS and PRE runs for drift chamber calibration.
Node types The type of a node determines its function in the DAQ system, i.e. which processes run on the node. Node role in the system and corresponding processes are listed for each node type:
L2 sub-events are collected from FEE and sent to the online farm l2collector, l2send FARM sub-events are received from all L2 chains, complete events are built and recorded farmreceiver, farmbuilder, farmrecorder, farmspydaemon RC Run Control runctl, operator DFC Data Flow Control dfc, dfcd, latmon TRIG Trigger Supervisor l2trigger MONI System monitoring physmon SLOW Slow control node (does not belong to DAQ system) Slow_RC