next up previous contents index
Next: DZDOC with the Up: DZDOC -- Bank Previous: #DZEDIT>DZEDITa program

The interactive bank display tool

 

The following routines are provided to visualise the bank structure, the layout of banks in divisions or the contents of RZ directories in an interactive session. The routine DZDISP is used to step through bank trees, display the contents of system words, links and datawords together with the documentation contained in an RZ file if available. Since ZEBRA provides forward and backward linkage of banks, the routine can reach each bank of a datastructure if it is provided with the link to any bank of the structure. Any picture may be written to a plotfile (GKS, PostScript, LaTeX) to get a hardcopy of it.

Routine DZDDIV is used to graphically display the bank layout in a division. Banks are marked with their hollerith Identifier. One can interactivley select any division of any store and zoom out regions of divisions. By clicking on a bank in the division one can directly enter DZDISP to display the corresponding bank tree. Both routines assume that the graphics package ([8] or [9]) and a workstation have been opened by the appropriate calls.

DZDIRZ is used to display and step through RZ directories.

#DZDISP>DZDISP -- Display bank trees in an interactive session

Example of output generated by DZDISP  

CALL DZDISP (ISTOR,*LTREE*,RZPATH,CHOPT,IWDISP,IWMETA,ILOCNR,IWKTYP)

Input parameter description:

ISTOR
Index of the store with the bank tree to be analyzed
LTREE
Entry address into the bank tree structure
RZPATH
Character variable specifying the path name of a RZ-directory containing the DZDOC bank descriptions. If no RZ-file is available one sets RZPATH = ' '.
CHOPT
Character variable specifying the desired options:
'N'
Do not activate and deactivate workstation, assumed to be done by caller
'M'
write on plotfile also the menu boxes
'L'
return link of selected bank to caller in LTREE
'R'
handle ``Modify data'' as ``Quit''
IWDISP
Workstation identifier for the display
IWMETA
Workstation identifier for a possible plotfile, a value of 0 means no plotfile.
ILOCNR
Locator number (normally = 1)
IWKTYP
The workstation type (display screen)

Output parameter description:

LTREE
Address of the selected bank, if 'L' option is given.

Interaction with #DZDISP>DZDISP

Routine DZDISP activates the workstation (IWDISP) if the `N' option is not given, clears the screen and draws the bank tree. Then it adds menu boxes on the picture allowing the user to choose one of the following options

Quit
Return to caller
Cont
Continue to draw down banks which did not fit on page
=>plotfile
Output onto plotfile (if IWMETA > 0)
Drop bank(tree) IDBK
Drop the currently selected top bank with hollerith Identifier IDBK and its dependents. A possible next bank is not dropped.
Modify data in bank IDBK
Modify data words in the currently selected top bank. It asks for the first and last word to be modified. If the first and last word are the same only one word is affected, otherwise all selected words will be set to the same value. System words may be modified by choosing offsets less or equal zero. Only INTEGER values are allowed in this case. A $ in front of an INTEGER allows hexadecimal input.
Help
Print instructions
=>LaTeX
Print current picture in LaTeX format to UNIT (see below)
CHOPT
Character options for DZSHOW with the following extensions: 'W' bitwise dump of data words with modifiers '1', '2', '3' giving the field width, '0' forces also the bits with zero value to be shown as 0, the default is blank. The option 'C' forces only the data content to be shown without any other text like sequence numbers etc., this is useful if the dump should be read by another program (e.g. PAW).
FIRST
First word to show (with DZSHOW)
LAST
Last word to show (with DZSHOW)
UNIT
Unit for printed output (DZSHOW, LaTeX, etc., (6 = terminal). If a number ≠6 is specified, then a file forxxx, where xxx is set equal to UNIT will be opened and used. Whenever UNIT changes the old file is closed.

It then requests activation of the locator (mouse) and takes the following actions according to its location:

  1. If it is inside the (shaded) bank center or in the arrow indicating a possible next bank or in the box at top of the picture indicating the Up-bank it calls DZDRAW for the selected bank, i.e. it draws the tree for the selected bank.
  2. If it is inside the data box it displays the selected datawords by a call to DZSHOW for this bank.
  3. If it just above the data box it lists the selected datawords together with the documentation (if it is provided in the RZ file ). (See also routine: DZDDWD)
  4. If it is inside the link region (or just left of the bank center if there are no links) it outputs the system words and links of the bank to the selected unit.
  5. If the cursor is just above the shaded bank center the documentation for the bank as contained in the RZ file is displayed. If it does not exist a template of the documentation is written to the selected output stream (see UNIT above).

#DZDDWD>DZDDWD -- display contents of data words with documentation

CALL DZDDWD (ISTOR, LBANK, CHOPT, IFIRST, LAST, LUNPRT)

Input parameter description:

ISTOR
Index of the store with the bank tree to be analyzed
LBANK
Address of the bank about which information has to be displayed
CHOPT
Character variable specifying the following options:
'C'
short display, show contents of data words only, useful if data should subsequently read by a program again.
'U'
do not display if mnemonic is UNDEFIND.
'Z'
force hexadecimal
'T'
force one line of output/4 characters in case of hollerith text. By default text is assembled in lines of 60 characters, no formatting is attempted.
'E'
Check if values are within allowed range (Examine), if a range is defined in documentation.
IFIRST
First word to show
LAST
Last word to show
LUNPRT
Unit number for output

Examples of #DZDISP>DZDISP output

Documentation for a bank (click above bank center)

------------------------------------------------------------------------------
| EV   | Event header bank.
 ---------------------------------------------- entered file at 19-Oct-92  9: 3
 Bank IDH  EV       Event header bank.
 Author             S.Holmes
 Version            402
 NL               2
 NS               2
 ND              10
 Next      None
 Up        None
 Origin    None
 IO-Charac          3H 3I -F
              ---------- Description of the links  ----------
 1         VX       Vertex bank
              ---------- Description of the data words   ----------
 1         LABNA    Name of laboratory
 2         EXPTNA   Name of experiment
 3         DAQNA    Initials of shift crew
 4         IHDAT    Data type
 4         C1       Experiment data
 4         C3       Test beam data
 4         C4       Cosmic ray data
 4         C5       Monte-carlo data
 5         IIEVT    Trigger number
 6         IIFITY   Filter type (Bit string)
 6         BITVAL00 Sum E(clus) > 2 GeV
 6         BITVAL01 E(EB cls/blk) > 200MeV
 6         BITVAL04 Lumi Event
 7         IITHRU   Thrust * 10000
 8         IICTHR   Cosine of the thrust axis * 10000
 9         IIECAL   Total Electromagnetic Energy
 10        IIHCAL   Total Hadronic Energy

Display of Undocumented data (click in data box)

 DZSHOW ---  DZSHOW called from DZDISP
 
EV  .     1     8781(QDIV2   ) SY/US/IO    1/    0/2153 
NL/NS/ND    7/    7/      10 N/U/O/@O       0/       0/       1/
   8781
 --------  DATA part of bank  --------
 
       1 /       "Cern       "Mars       "McKi           5      123456
                         3   9945.       8678.       .9120E+05   1300.

Display of documented data (DZDDWD)(click above data box)

 -------- Data of Bank/UpBank: EV  /NONE Doc Version: 402 ----------
     1    1  LABNA          "Cern  Name of laboratory
     2    2  EXPTNA         "Mars  Name of experiment
     3    3  DAQNA          "McKi  Initials of shift crew
     4    4  IHDAT              5  Data type
     4    4                        Monte-carlo data
     5    5  IIEVT         123456  Trigger number
     6    6  IIFITY             3  Filter type (Bit string)
     6    6                        Sum E(clus) > 2 GeV
     6    6                        E(EB cls/blk) > 200MeV
     7    7  IITHRU     9945.      Thrust * 10000
     8    8  IICTHR     8678.      Cosine of the thrust axis * 10000
     9    9  IIECAL     .9120E+05  Total Electromagnetic Energy
    10   10  IIHCAL     1300.      Total Hadronic Energy

List system words (click in link area)

 System words + links
 Offset to Bank-Centre              20
 I/O characteristic          3H 3I -F
 Bank status word (HEX)          40000
 Link to the bank                 8781
 Hollerith ID                     EV
 Numerical ID                        1
 Total number of links               7
 Number of structural links          7
 Number of data words               10
 Next link                           0
 Up - link                           0
 Origin link                         1
     1. down link                 8595 VX
     2. down link                    0 
     3. down link                    0
     4. down link                    0
     5. down link                    0
     6. down link                    0
     7. down link                    0

#DZDDIV>DZDDIV -- Display the layout of stores and divisions

DZDDIV does a sequential search through the specified division and displays the location of the banks graphically. Hence it displays all banks (also dropped ones) regardless of their linkage. In this respect it is principally different from DZDISP. Active banks are marked by one horizontal line in the box representing the bank, dropped banks are shaded. The program tries to fit the hollerith identifier of the bank into the box. Characters which do not fit in a box are truncated from the end of the string. The whole division is represented by about 30 horizontal boxes. To the left of each box the LQ-address in the store is shown. The length of the box is adjusted to represent an integer multiple of powers of ten (e.g. 200 or 3000) words. In addition to the selected division the layout of the store containing the division is displayed at top of the picture showing the locations and printing names of all divisions in the store. DZDISP may be directly entered by clicking on a bank in the display.

Example of a display of DZDDIV

CALL DZDDIV (IXDIV,L,RZPATH,CHOPT,IWDISP,IWMETA,ILOCNR,IWKTYP)

Input parameter description:

IXDIV
Index of the division to be displayed, if just the store index is given division 2 is taken as default.
L
not used at present.
RZPATH
CHARACTER variable specifying the pathname of the RZ file containing the bank documentation, if no RZ file is available one sets RZPATH= ' '.
CHOPT
CHARACTER variable specifying the desired option:
'I'
Interactive (i.e. request cursor input after display)
'N'
Do not activate and deactivate workstation, assumed to be done by caller
'P'
print addresses of banks to terminal (or file)
IWDISP
workstation Identifier for the display, IWDISP must be open, activation and deaction is done by the routine if the 'N' option is not given.
IWMETA
Workstation Id for a possible Meta file (0 means no plotfile)
ILOCNR
locator number (normally = 1)
IWKTYP
the workstation type (display screen)

Interaction with #DZDDIV>DZDDIV

If the interactive option has been choosen additional menu boxes are drawn and the program expects input of the locator with the following choices.

QUIT
Return to caller
=>Plotfile
Write current picture on GKS--plotfile
ZOOM
Show enlarged part of division. The program expects then 2 inputs by the locator indicating the area to be enlarged. It chooses the start of the bank with the lower address and the end of the bank with the higher address.
In division list
Allows selection of a division.
In store list
Allows selection of a store.

If the locator is activated on a division in the box at the top representing the store then the picture is erased and redrawn with the selected division expanded.

If the locator is activated on a bank in the division display DZDISP is called with the corresponding bank selected. This allows to acces and display any bank tree in a store without prior knowledge of its entry address.

#DZDIRZ>DZDIRZ display RZ directory trees in an interactive session

This routine displays RZ--directories and the keys in a similiar manner as DZDISP does it for bank trees. A bank structure reflecting the RZ file structure is lifted and displayed by the routines of DZDISP. To distinguish the output from bank trees the boxes are drawn like diamonds rather then rectangular. The keys are indicated with rectangular boxes. By default only the 10 most recent keys in a directory are displayed. This might be overwritten by specifying a parameter NKnnn

in the CHOPT argument where nnn represents an integer number. Additional keys (of the selected working directory) may be shown using the menu option "more keys". The first 4 keywords are shown in the box. To the left of the box the sequence and cycle number of the key are displayed. If there are more they may be shown by clicking above the box (see below). The data of the key can be brought into memory by clicking into the box representing the key and subsequently examined by calls to DZDISP. Optionally the contents of the key vector is returned in a next bank (Option 'K' ). At the upper left corner the full name of the current working directory is displayed which remains selected when returning to the caller. So this routine may be used to select interactively a working directory. The routine needs about 20 words/directory or key depending on the length of the name or number of keywords in division 2 of the selected store. On return from DZDIRZ the datastructure is dropped by default, if the 'S' -option is given it is kept and must be dropped explicitly ("drop+quit"). This is useful for very big RZ file s to save time building the datastructure. Note however if a directory tree which is not part of the current one in memory should be shown one needs to do a "drop+quit". before the change of RZPATH containing the directory to be displayed has an effect.

A simple implementation of a documentation scheme for RZ-directories is supported. The documentation is contained in a formatted text file, where a line starting with '/' gives the directory name followed by any number of comment lines not starting with '/' in the first column. The directory name should be unique, i.e. leading directories may be omitted. The first comment line is put into the box representing the directory on the display. Clicking above this box shows all lines. The file must be open when DZDIRZ is called, the logical unit is passed in the CHOPT argument as LUnn where nn is the unit number.

Interaction with #DZDIRZ>DZDIRZ

The following actions can be triggered by clicking the mouse at the following places:

  1. If it is inside the (shaded) center or in the box at top of the picture indicating the mother directory it changes the current working directory to the selected one and calls DZDIRZ again, i.e. one st.gif down or up the directory tree.
  2. If it is inside the big box of a directory, which shows the number of keys and its quota, it lists the contents of this directory (RZLDIR).
  3. If it is above a rectangular box representing a key all keywords will be shown.
  4. If it is inside a rectangular box representing a key, this key is read into memory (RZIN) at link LDATA with offset JBIAS (or as top bank if JBIAS=1).

Example of output generated by DZDIRZ

CALL DZDIRZ (ISTOR, LD*, JB, RZPATH, CHOPT, IWDISP, IWMETA, ILOCNR)

Input parameter description:

ISTOR
Index of the store to be used
JB
The link offset (or 1 if top link)
RZPATH
Character variable specifying the path name of a RZ-directory
CHOPT
Character variable specifying the options desired:
'N'
Do not activate and deactivate workstation, assumed to be done by caller
'A'
Show all keys (default 10)
'S'
Save (time) i.e. do not drop banks containing the RZ-structure on return.
'K'
Return the keyvector in a next bank if the data for a key a read into a bank (RZIN). In this case control is immediatly returned to the caller.
'DUnn'
nn is the logical unit number of an open file containing documentation. This (an the following 2) must follow the previous options (NASK).
'LUnn'
nn is the logical unit number of an open file receiving printed output.
'NKnn'
Maximum number of keys to show on display.
IWDISP
Workstation identifier for the display
IWMETA
Workstation identifier for a possible plotfile, a value of 0 means no plotfile
ILOCNR
Locator number (normally = 1)

Output parameter description:

LD
Link to a possibly read in data structure or bank containing a vector


next up previous contents index
Next: DZDOC with the Up: DZDOC -- Bank Previous: #DZEDIT>DZEDITa program


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