DELPHI Collaboration 94-2 DAS 146 January 1994

The DELPHI Run DataBase presenter

R. Schulze2, B. Schulze1,2

ABSTRACT

The DELPHI Run Database(DRDB) Presenter is a software tool to monitor the characteristics of the data taking contained in this database of the CERN DELPHI LEP experiment. The pertinent information residing on the DRDB data base is updated along with the experiment running. The Presenter enables the user to con- sult this information as a function of time, by means of simple listing, summaries or more elaborated histograms analysis. The DRDB Presenter is running under the VMS environment with an X based user interface developed using OSF/Motif, the interface builder VUIT and the CERN library HIGZ graphics tools.

1Universita di Roma II and INFN, Tor Vergata, I-00173 Rome, Italy

2 LAFEX/CBPF/CNPq, Rua Dr. Xavier Sigaud, 150, Urca, CEP 22290, Rio de Janeiro, Rj, Brazil 1 - Introduction

In the data acquisition environment of an High Energy Physics detector it is very use- ful to give the user a natural access to the needed information, in particular when there is the stress of a potential problem. As other tools of the DELPHI experiment, the DRDB Pre- senter has been developed to provide the user with a friendly environment to follow the evolution of the data taking operation. The DRDB keeps track of runs recorded and of the status of process of the physics data.As such it is a bookkeeping data base containing information on the characteristics of the data taking such as run number, run start time, LEP fill number, magnet current, etc... The DRDB Presenter provides the user with the facilities to consult its content, make listings according to different formats, analysis through plots and statistics, make print-outs and refer to an on-line help. The implementation of this presenter is based on: a) already existing tools to manipulate the bookkeeping data base and the run time library of access routines, and b) new tools defined according to the user’s need. An X based interface was added integrating analysis plots & statistics, listing and an on-line help. With that interface one can navigate through the database and get a sensible follow up of the behavior of the data taking by tracing back and correlating problems. Section 2 presents on which basis the presenter was conceived, focusing on its pur- pose and its planning. Section 3 describes the software implementation after a brief descrip- tion of DELPHI On-line cluster, the structure of the User Interface, the languages, packages and tools used and how they were integrated. It also presents some examples of the current implementation. In section 4, we draw preliminary conclusion from the experience gained in running Version 1.0 in the experiment site.

2 Author 2 - Software conception

2.1 Software purpose

The purpose of the DRDB Presenter is to provide a standard X11 framework to the former DRDB so that it could run at DELPHI on-line cluster and the display can be made on any remote X11 display connected through network, add new tools to it using graphics visualization, and provide the user with an easy-to-use package.

2.2 Design goals

The DRDB Presenter was designed on a structured analysis basis to add new tools and also to incorporate the tools that already existed. The interface was planned on a “GUI” way () characterized by: pull-down menus, multiple windows, icons, and mouse-driven commands, which implies thinking in an object-oriented approach. This software should be modular to allow easy portability.

DRDB Plot details Display plots DRDB Plots Plots displayed Run,Fill,Date, details Detail of Generate option analysis analysis Statistics User’s Verify User’s Verify USER command command details Statistics Display displayed is valid of statistics USER command valid option Details of option Generate list listings Details Listings Listings option Display displayed listings List DRDB details DRDB

Figure 2.1 An expansion of the DFD

Author 3 3 - Software implementation

3.1 DELPHI On-line cluster

The main on-line computer capacity is provided by a Local Area VAX Cluster run- ning VMS . The principle component of the On-line cluster consists of two main frames VAX 6510 and VAX 8700 which are dedicated to handle the data flow from the central readout.

By run By fill Plot / Listing Display By date

X Protocol DecNet TCP/IP Plot / DRDB List Presenter

DRDB file

Write Data

characteristics of the data physics CERN taking data

LEP DELPHI Experiment

Figure 3.1 DELPHI data flow for DRDB Presenter

3.2 Software Architecture

For the implementation of the software, it was necessary to integrate different envi- ronments, following the short description below. For the user interface, it was decided to use OSF/Motif, generated with a Interface Builder, DEC-VUIT (Visual User Interface Tool). The main program which starts the appli- cation and runs as the Xclient is written in C. The routines to produce the plots display were

4 Author written in FORTRAN 77, using calls to the HIGZ/CERNLIB. All the other routines for checking, validation, etc were written in C.

UIL

Motif Toolkit

XToolkit HIGZ

XLibrary DRDB Toolkit Former DRDB

VAX-VMS

Requests/XEvents to /from XServer

Display

Figure 3.2 Hierarquical dependence of the DRDB Presenter

In the present implementation, the interface is composed of two basics windows: one for the interface itself and another one for the plots. For the interface, it was created one main using Motif widgets while for the plots, it was used the HIGZ default win- dow. The interface is an Xserver process running on the Xdisplay, talking to its correspond- ing Xclient process running on the cluster where the database resides. This client-server processing is already inherent to the usage of the Motif/X11 and the transport is either TCP/IP or DECnet.

Callbacks Motif Interface Motif Motif Main Program (.UIL) string program (.C) struct System Calls

Routines per RUN (.C) Routines per FILL (.C) DRDB List (DCL)

DRDB Toolkit (.C)

$DESCRIPTOR

DRDB (.FOR)

$DESCRIPTOR $DESCRIPTOR

Routines make plot (.FOR)

Figure 3.3 Diagram of routines

Author 5 The basic integration of the different pieces and tools is based on the possibility to pass strings between these different parts. These strings can be seen as objects which con- tain basic pieces of information and which are either concatenated or split accordingly. To manipulate strings between C and FORTRAN and vice-versa, the $DESCRIPTOR (ref) structure is used, which is similar to an equivalent X structure which translates strings from the UIL to C. The basic fields in these structures are size, string and string type. They are needed since strings are seen differently by each language. While strings are used to inte- grate C and FORTRAN, they are also used to integrate the existing tools under DCL(VMS). For example, to implement the LIST module, command strings are issued with system calls, and the returned strings are send to a file, for print/list on the DRDB screen.

3.3 The structure of the User Interface

Six basic modules are proposed:

■ DESCRIPTION: Display the description of the DRDB file. At the moment, it is implemented using the “label widget” from Motif which leads it to be static.

■ LIMITS: Selection of either run, fill intervals. Currently, only run limits is implemented. Fill limits and Date Limits are under implementation.

■ LIST: Lists the contents of the DRDB file. This module is being implemented as similar as possible to the one present in the former DRDB except that now the display is on an X11 window and the commands are available in a pull down menu.

■ ANALYSIS: Analysis of the run data either through “Plots” or “Statistics”. Pres- ently, only the module “Plots” is implemented.

■ PRINT: printout of the plots and of the listing.

■ HELP: Information on the DRDB Presenter such as how to use the presenter and how the presenter is organized.

3.4 Current implementation

Presently, there is a version being tested at DELPHI with the appearance as shown by the figures.

6 Author a

d e c

b

Figure 3.4 User Interface Windows

window a: Selection of limits to be used both by plot and by list modules; window b: Set first limit. In this example, it is showed the First Run window; window c: On-line help; window d: Plotting and/or listing; window e: An example of a plot.

3.4.1 Options available

The following options are available for PLOTS:

■ a) DAS

■ Make plots for the DAS family according the interval given by the first & last run.The results are given per run or per fill, depending on the plot. For some plots average is also given. #TRIG/RUN Make plots with the number of triggers per run within the given interval;

#TRIG/FILL Make plots with the number of triggers per fill within the given interval;

Author 7 #TRIG/FILE Make plots with the number of triggers per file within the given interval. It also gives the average of the number of triggers per file; RUN DURATION Make plots for the duration of the run. The result is given in minutes. It also gives the average, in minutes, of the duration of the runs within the given interval; #FILES/RUN Make plots with the number of files per run. It also gives the average of the number of files per run; DAS Rate Make plots for the DAS Rate per fill. The result is given in Hz. It also gives the average, in Hz, of the DAS Rate within the given interval; RUN_LIVE Make plots for the Run_Live per run within a given interval;

■ b) LEP

■ Make plots for the LEP family according the interval given by the first & last run.The results are given per run or per fill, depending on the plot. For some plots average is also given; BEAM CURRENT/FILL Make plots for the current per fill. The result is given in uA; FILL DURATION Make plots for the duration of the fill. The result is given in hours. It also gives the average, in hours, of the duration of the fills within the given interval; ENERGY/FILL Make plots for the energy per fill within the given interval. The result is given in GeV; LEP e+ Make plots for current of e+ within the interval given. The result is given in mA; LEP e- Make plots for current of e- within the interval given. The result is given in mA;

■ c)TRIGGER

■ Make plots for the TRIGGER family according the interval given by the first & last run.The results are given per run or per fill, depending on the plot. For some plots average is also given; T1 Make plots with the number of triggers, in Hz, from T1 per run within the given interval. It also gives the average, in Hz, of the number of trig- gers from T1;

8 Author T2 Make plots with the number of triggers, in Hz, from T2 per run within the given interval. It also gives the average, in Hz, of the number of trig- gers from T2; T3 Make plots with the number of triggers, in Hz, from T3 per run within the given interval. It also gives the average, in Hz, of the number of trig- gers from T3; T4 Make plots with the number of triggers, in Hz, from T4 per run within the given interval. It also gives the average, in Hz, of the number of trig- gers from T4; Z0_Had Make plots for the number of Z0 Hadronic within the interval given. It also gives the average of the Z0 Hadronic within the given interval; Z0_Rate Make plots for the number of Z0 rate, in Hz, within the interval given. It also gives the average of the Z0 rate, in Hz, within the given interval;

3.4.2 How to run DRDB Presenter

To run DRDB_PRESENTER: Include in your session manager: @vxdeop::delphi$online:[MOTIF.DRDB]drdb_presenter or call the command file above from your area

3.4.3 How to use DRDB Presenter

To use DRDB_PRESENTER: See: vxdeop::delphi$online:[MOTIF.DRDB] brief_guide.doc or the ON_LINE HELP on the DRDB Presenter

Author 9 4 - First Experience

Version 1.0 was installed at PIT8, Ferney_Voltaire, in the DELPHI control room. It was debugged and upgraded and from the feedback received from the users, a second ver- sion was worked on and it is installed in the same place the first was installed.

10 Author 5 - Conclusions

During its first two weeks of running, the usage of the DRDB Presenter has shown the importance of an user-friendly package provided with graphical interface during the data taking period. The possibility to navigate the data base and visualize the characteristics of the data taking in form of plots, have summaries and listings of these characteristics have shown the importance of this package. Due to an “ever demanding for new solution” characteristic of a data acquisition soft- ware for High Energy Physics, new features are already envisaged, like: -enable the user to define his own plots besides the plots that are already pre-defined; - a child process running in parallel with the main process, handling the database access, in order to give the user faster response. This child process should act like a memory cache of the data file; - for the graphical interface, it is more comfortable to get a feedback from the data when positioning the pointer at some specific point of the plot, instead of referring to the listing; -provide the software with natural language interface. For example, the “on-line help” and generation of report. The natural languages should be, to start with, those official ones at CERN and the one that is the CNPq official language, that is, English, French and Portu- guese. This software is a good example of re-using existing code and integrating it with new software definitions. Although this is not the more comfortable approach from the designer point of view, it is a compromise of previous validated software with new pieces of code, in a step wise approach to validate the whole new product.

Author 11 6 - Acknowledgment

This work is being done as a contribution to the DELPHI experiment collaboration at CERN within the CERN-CNPq collaboration and it was born inside the DELPHI DAS & Trigger projects, with their contribution and support.

12 Author 7 - Bibliography

1-Booch,G. Object-Oriented Design with Applications. Benjamin/Cummings Publishing Company, Inc. Redwood City, California 94065, 1991. 2-Brun. R, Couet. O, Cremel. N. HIGZ - High level Interface to Graphics and ZEBRA, CERN Program Library Q120 and Y251. 3-Coad. Y, Yourdon, E. Object-Oriented Analysis. Yourdon Press Computing Series. Prentice-Hall, Inc, Englewood Cliffs, New Jersey 07632, 1991. 4-DEC VUIT User’s Guide, Digital Equipment Corporation, Maynard. 5-Gane.C, Sarson.T. Structured Systems Analysis: Tools and Techniques. Pren- tice Hall, Inc, Englewood Cliffs, New Jersey 07632, 1979. 6-Jonker.M. DELPHI online run and tape bookkeeping, DELPHI Note, 1-nov-1990. 7-OSF/Motif TM- Programmers Guide, Prentice Hall 8-OSF/Motif TM- ReferenceGuide, Prentice Hall

Author 13