The Database client slow control interface



                              The system requirements
                              The technology opportunities
                              Use cases
                              Chosen solution and alternatives

    Design of the Slow Control data in the HERA-B Information System

    How to link slow control applications

    Implemented functions


With a total input of 600k channels, and a rather complex detector, HERA-B faces challenges in the area of the slow-control databases that require special solutions. To avoid the presence of too many small objects, it was created a possibility to update individual channels that are part of large collection objects. The slow control interface defines schema, data and update objects.

The system requirements:

The storage HERA-B of slow control information specifies the following requirements:

  1. All information has to stored and retrieved based on time indexes

  2. A channel identifier name is used to identify uniquely each channel using a directory like structure.

  3. The system must cope with adding and deleting channels as the detector evolves.

  4. There are clearly identified groups of channels with common shema of the information to be stored

  5. Each of this groups of channels have the source values scanned simultaneously some small change outside the predefined intervals and have to be updated. One update in general contains several objects but not all.

  6. The user must be allowed to set temporarily all values to off. Latter the recover the values stored before.

  7. The retrieval of the last valid values and the value history must be optimized for speed

The technology opportunities:

The main constraint in storing the these updates is that the storage and retrieval of very small objects in the database is not desirable. Both because of the common schema of large groups of channels that must be accessed simultaneously and because several problems arise if you store the information on too small objects ( like enormous growth of you index tables). We have to define the storage and retrieval of update objects.

Within the HERA-B used technology, the most natural options to store slow control data in the database are:

  1. All the information that gets updated from the information source in one time is put into one table with arrays containing all the values in it. The interpretation of the values is the responsibility of the code which stores and retrieves information.

  1. Each channel goes into one separate table with name

  1. Solution with relations and updates:


Use Cases:


Chosen solution and alternatives:

The solution number 3 was chosen. Even with in this solution one could:


Design of the Slow Control data in the HERA-B Information System

Class Diagrams:

wpe2.gif (26734 bytes)


The Slow Control configuration database:

The matching between the slow control channel identifier and the database server/table is was hardcoded in the program and is now done trough the slow control configuration database /CONFIGURE_SLOW table SlcConfig.

wpe2.jpg (2405 bytes)

A loop is done over chantype to find it as the leading part of our channel id. The first mach found sets dbname and table name. When adding identifiers to the description table, a check is made if they have the same leading characters in chantype. If not SlcAdd2Table() returns -2.

Event Diagrams:

An example of server invocation:

Implementation choices:

The types structures that are defined for using with the slow control objects are:

struct SlcDatabase{
    int magic;
    Tables x;
    char *dbname

struct SlcTable {
 int magic;
 SlcDatabase *db;
 int nused;
 int nmax;
 int nchardef;
 char **carray;
 char *tabledes;
 char *tabledat;
 char *tableupd;
 slctempdat *slctempdat;
 int nupd;
 char *datadesc;
 char *title;
 char *upddesc;
 int tdat,tupd;

This structures are defined in the slctable.h file and a normal user should note worry too much about them.

How to link slow control applications

Implemented functions:



















return button to first pagegoes to the beginning of the client library