3.7 Databases

The DELPHI databases are based on the CARGO [129] hierarchical database system, which in turn uses a modified version of CERN's KAPACK [130] keyed-access file management routines.

CARGO provides facilities for creating, updating, and interrogating the database, either interactively or from a program. Its special features are the timestamping of updates to a record, and the ability to create a formatted ASCII file. Each update has a period of validity, which is usually from the time of the update until the next update. This allows an analysis program to read the data item that was valid at any past time, such as at the time that a particular physics event was recorded. The ASCII file contains a representation of all of, or a selected subset of, the binary database file. This is particularly convenient for the periodic transport of database updates from the online to the offline computers, which also use CARGO to store the detector calibration and alignment.

Each of the main CARGO databases used in the online system (Slow Controls configuration, Slow Controls status update, and LEP machine parameters) has an access package, which provides a set of routines through which all database accesses are performed. Application programs can either call these routines directly to access a private database file, or can make a remote procedure call to a database server process to access the common database files. The use of RPC provides automatic protection against conflicts, such as two programs attempting to write to the same record at the same time, since the server executes only one command at a time. It also greatly simplifies the task of coordinating the export of update ASCII files to the offline computers, since all updates go through the same process.


3.7.1 Slow Controls Configuration Database

The Slow Controls Configuration Database [131] lists characteristics, physical addresses, default values and error limits for each channel associated with an Elementary Process. It also defines the correspondence between G64 channel number and the Status Update Database word or words where changes will be recorded, and the tolerance on the readings before an update is made.

Since updates to this database are only made at experts' request (normally only when the detector hardware or default running values are changed, i.e. via HIPE), it is usually found to be more convenient for each detector partition to have an individual database file.


3.7.2 Status Update Database

The Status Update Database [132] is used by the offline analysis to determine the state of the different parts of DELPHI as each physics event is analysed. The granularity of description depends on the detector partition concerned (see [96] for an example).

Updates are written by the Elementary Processes using the database server, called via RPC. These updates are periodically exported to the offline computers. During datataking, the frequency of updates from each detector partition is checked online using time-development plots integrated into the quality checking system.

Tim Adye 2002-11-06