next up previous contents index
Next: Logical Data Structures Up: ZEBRA - An Previous: ZEBRA - An

Why ZEBRA?

All off-line programming in high-energy physics is carried out, for various reasons, in the Fortran 77 programming language. While this language offers certain advantages over its competitors, it does suffer from one serious defect, namely its lack of dynamic data structuring facilities. The only data structures it contains at all are the array of homogeneous elements and the common block for shared data. Neither of these structures can be manipulated as an entity, and neither of them can be defined dynamically at execution-time. No pointers are available to link these structures together at a higher level. If we were to attempt to define structures using standard Fortran they would thus, at best, be in the following style:

Example of defining data structure with Fortran

      PARAMETER (NTRACKS = 100 , NPTS = 20)
      COMMON/POINTS/PTRACK(3,NTRACK),XYZ(NPTS,NTRACK),...

and almost the whole program would have to be regenerated and recompiled every time one of the symbolic constants is altered. Relationships between data items would have to be programmed explicitly using integer arrays of indices.

It is to overcome these limitations that the ZEBRA system has been designed and written. It allows not only a truely dynamic creation of data structures at execution-time, but also the added advantage of being able to manipulate those structures, and even to write them to an external storage medium and to recover them intact on some other computer. In order to achieve this, the user has to communicate with the ZEBRA system by (mostly) simple calls to ZEBRA routines, and by following a number of rules and conventions. Once a program has been written in this fashion, it becomes easy for anyone knowing rather few of the details to use and to modify the program, without having to worry about the side-effects of any changes he or she makes, and without having to recompile large sections of the code solely in order to obtain a few extra storage locations.

ZEBRA provides a significant extension to the power of Fortran, in general at an insignificant cost in terms of execution-time overheads. However, even that small cost is tiny compared with the extra time which would otherwise be wasted in developing large programs using only the conventional facilities.

The purpose of this chapter is to introduce the novice user to the basic terms and concepts of ZEBRA. The actual use of the system is described in later chapters, where all the relevant information on calling sequences and so forth is set out.



next up previous contents index
Next: Logical Data Structures Up: ZEBRA - An Previous: ZEBRA - An


Janne Saarela
Mon May 15 08:34:47 METDST 1995