next up previous contents index
Next: TZ -- Title Up: DZDOC -- Bank Previous: DZDOC with the

Examples

 

Example session with #DZEDIT>DZEDIT

The following example shows how to get the (graphical) bank documentation for a subtree of banks. It assumes that the RZ file previously created by DZEDIT is available and the command dzedit (DZEDIT EXEC on IBMVM, RUN DZEDIT on VAXVMS or dzedit on Unix) is defined.

Comment in the example below are put between /* .. */. Help is available by typing help commandname.

Example session with DZEDIT

dzedit                                         /* Invoke DZEDIT                         */
Workstation type (?=HELP) <CR>=0 :             /* Answer 0 if not a graphics terminal   */
OPEN dztest.rzbank                             /* Open RZ-file                          */
DRAWONE EV NONE                                /* Draw bank tree below CT (UpBank CD)   */
   Draw tree below: EV                         
   Total # of banks in tree:       3       
   # of documented banks           3       
 3 banks documented with  1 pictures on  2 pages
 PostScript output on: ev.gif                  
 
                                               /* The ZEBRA bank tree corresponding     */
                                               /* to the document is still in memory    */
                                               /* It is thus possible to visualize it   */
                                               /* on a workstation or graphics terminal */
DZDISP                                         /* Display bank tree                     */
                                               /* All banks have ND=3 at this moment    */
DZDDIV                                         /* Draw physical layout of Division      */
DZDIRZ                                         /* Show structure of RZ-directory of     */
                                               /* documentation file.                   */
QUIT                                           /* end of DZEDIT session                 */

Example of code calling #DZDDIV>DZDDIV

The following code fragment assumes that ZEBRA is initialized and some banks are booked (or read in via FZIN). Routines DZDDIV (or DZDISP) can be called without providing a bank descriptor file. For details on the graphics package HIGZ please consult the user guide [9].

Using routine DZDDIV

      INTEGER NWPAW,NWHIGZ
      PARAMETER (NWPAW=100000,NWHIGZ=30000)
      REAL PAW(NWPAW)
      COMMON/PAWC/PAW(NWPAW)
      CHARACTER*9 CHRZDD
      INTEGER LUNRZD,ISTAT,IXDIV,LDUMMY,IWMETA,IWKTYP
      INTEGER IERFIL,LUNMET,ILOCNR,IWKID
      PARAMETER (IERFIL=6, LUNMET=10,ILOCNR=1,IWKID=1)
 
C--   Open HIGZ and workstations
 
      CALL MZPAW(NWPAW,' ')
      CALL IGINIT(NWHIGZ)
 
C--   query workstation type
 
      CALL IGWKTY(IWKTYP)
      IF(IWKTYP .GT. 0)THEN
          CALL IGSSE(IERFIL,IWKTYP)
      ELSE
          WRITE(*,*)'Illegal workstation type'
          GOTO 99
      ENDIF
 
C--   open a plot file (if needed) otherwise put: IWMETA=0
 
      CALL KUOPEN(LUNMET,'myplot.gif','UNKNOWN',ISTAT)
      IF(ISTAT.NE.0)THEN
         WRITE(*,*)' Error opening plotfile',ISTAT
         IWMETA=0
      ELSE
 
C--      initialize a PostScript plotfile
 
         CALL IGMETA(LUNMET,-111)
         IWMETA=2
 
C--      deactivate output to plot file at start, it will be
C        activated by DZDDIV if requested
 
         CALL IGMETA(0,-111)
      ENDIF
 
C     Open the RZ file for bank descriptors.
C     If you do not have a descriptor file (yet) just put:
C     CHRZDD=' ' to notify it to DZDDIV
 
      CALL RZOPEN(LUNRZD,CHRZDD,'mydoc.rzdoc',' ',0,ISTAT)
 
*     specify directory name to be used or signal error
 
      IF(ISTAT.EQ.0)THEN
         CHRZDD = '//BANKDOC'
         CALL RZFILE(LUNRZD, CHRZDD(3:),' ')
      ELSE
         CHRZDD = ' '
         WRITE(*,*)' Error opening descriptor file',ISTAT
      ENDIF
 
C--   now display division layout
 
      CALL DZDDIV(IXDIV, LDUMMY, CHRZDD,'I',
     &            IWKID, IWMETA, ILOCNR, IWKTYP)
99    CONTINUE
      .....

Description of the banks used in previous examples

Description of EV bank (see chapter gif)

*B..EV  Event header bank.
*B.AU    S.Holmes
*B.VE    402
*B.ND    10
*B.NL    2
*B.NS    2
*B.NX    None
*B.UP    None
*B.OR    None
*B.IO    '3H 3I -F'
*B.LINK
*B.1   VX       Vertex bank
*B/LINK
*B.DATA
*B.1   LABNA     Name of laboratory
*B.2   EXPTNA    Name of experiment
*B.3   DAQNA     Initials of shift crew 
*B.4   IHDAT     Data type
*B.4   C1        Experiment data
*B.4   C3        Test beam data
*B.4   C4        Cosmic ray data
*B.4   C5        Monte-carlo data
*B.5   IIEVT     Trigger number
*B.6   IIFITY    Filter type (Bit string)
*B.6   BITVAL00  Sum E(clus) > 2 GeV
*B.6   BITVAL01  E(EB cls/blk) > 200MeV
*B.6   BITVAL04  Lumi Event
*B.7   IITHRU    Thrust * 10000
*B.8   IICTHR    Cosine of the thrust axis * 10000
*B.9   IIECAL    Total Electromagnetic Energy
*B.10  IIHCAL    Total Hadronic Energy
*B/DATA
*B/

Description of VX bank (see chapter gif)

*B..VX     VerteX bank (V0)
*B.AUTH    S.Holmes 
*B.VERS    403
*B.ND      12
*B.NL      1
*B.NS      1
*B.UP      EV
*B.OR      EV
*B.NX      VX
*B.IO      '3I -F'
*B.LINK
*B.1   TK       Track bank
*B/LINK
*B.DATA
*B.1   JVTYPE   Vertex type
*B.2   JVALGO   Algorithm
*B.3   JVNCTR   Number of tracks associated with this vertex
*B.4   JVCSRP   Cos(r.p) in the x-y plane
*B.5   JVD0     Abs(d0) w.r.t. event vertex            [cm]
*B.6   JVFLEN   Flight length w.r.t. event vertex      [cm]
*B.7   JVSD0    Sum of abs(d0) w.r.t. event vertex     [cm]
*B.8   JVCSVP   Cosine of opening angle at vertex point
*B.9   JVDXY    Separation in x-y at vertex point      [cm]
*B.10  JVDZ     Separation in z at vertex point        [cm]
*B.11  JVMPP    Invariant mass assuming pi+pi-        [GeV]
*B.12  JVMPPR   Invariant mass assuming pi+ p-bar     [GeV]
*B/DATA
*B/

Description of TK bank (see chapter gif)

*B..TK     Track bank
*B.AUTH    Watson
*B.VERS    3.13
*B.ND      12
*B.NL      0
*B.NS      0
*B.UP      VX
*B.OR      VX
*B.NX      TK
*B.IO      F
*B.DATA
*B.1      JCPX       best value for px at primary vertex    [GeV]
*B.2      JCPY       best value for py at primary vertex    [GeV]
*B.3      JCPZ       best value for pz at primary vertex    [GeV]
*B.4      JCQ        charge                                 [e]
*B.5      JCKAPP     Kappa=1/2rho                           [1/cm]
*B.6      JCPHI0     phi0                                   [rad]
*B.7      JCD0       d0 = phi x d.z                         [cm]
*B.8      JCTLAM     TAN(lambda) = COT(theta) track polar angle
*B.9      JCZ0       z at p.c.a of track                    [cm]
*B.10     JCCHIR     Chisq/DGF in r-phi
*B.11     JCCHI3     Chisq/DGF in s-z
*B.12     JCEM11     <kappa0 kappa0>                    [1/cm**2]
*B/DATA
*B/

Example using pointers, repetition counts etc.

Description of RZ top bank (for output see page gif)

*B..RZ  RZ system top bank
*B.AU   R.Brun
*B.ST   0
*B.DV   SYSTEM
*B.UP   NONE
*B.NX   RZ0
*B.ND   *
*B.NL   10
*B.NS   9
*B.IO   I
*B.LINK
*B.1    LSDIR      Pointer to first subdirectory
*B.2    LFREE      Pointer to list of free records
*B.3    LUSED      pointer to list of used records
*B.4    LFROM      Pointer to copied directory
*B.5    LPURG      Pointer to list of purged records
*B.6    LROUT      Pointer to output buffer
*B.7    LRIN       Pointer to input buffer
*B.8    LCORD      Pointer to ordered cycles (RZCOPY)
*B.9    LSNUSED    Free 
*B/LINK
*B.RLINK
*B.1    LRNUSED    Free reference link                     *
*B/RLINK
*B.DATA
*B.1     Z:IDNAME1     Directory name  (up to 16 characters)    
*B.2     Z:IDNAME2                 "                              
*B.3     Z:IDNAME3                 "                              
*B.4     Z:IDNAME4                 "                              
*B.5     RECPT1        Record number of the mother directory,   
*B.6     RECPT2        or C file pointer (words 5 and 6)        
*B.7     B:IWPW1       Write password (1st part)                
*B.8     B:IWPW2                      (2nd part)                
*B.9     NCHDRW        No. of char. DIR(1:5),WPW(6:10), 
*B.                    and  bit 12 eX mode   
*B.10    D:IDATEC      Creation date/time                       
*B.11    D:IDATEM      Last mod date/time                       
*B.12    NQUOTA        Maximum number of records QUOTA          
*B.13    N:NRUSED      Number of used records                   
*B.14    NWUSED        Number of words used MOD 1000000         
*B.15    NMEGA         Number of megawords used                 
*B.16    RESERVED      Reserved                        
*B.17    IRIN          Record number currently in LRIN          
*B.18    IROUT         Record number currently in LROUT         
*B.19    IRLOUT        Number of the last record written        
*B.20    IP1           Pointer to first free word in IRLOUT     
*B.21    ICONT         Record number continuation               
*B.22    NFREE         Number of words free in F                
*B.23    N:NSD         Number of subdirectories                 
*B.24    P:LD          Pointer to directory records             
*B.25    P:LB          Pointer to file descriptor (only for TOP)
*B.26    P:LS          Pointer to first subdirectory S          
*B.27    P:LK          Pointer to first KEY   K                 
*B.28    P:LF          Pointer to free space  F                 
*B.29    LC            Pointer to last cycle  C                 
*B.30    LE            Pointer to end of directory              
*B.31    N:NKEYS       Number of keys in that directory         
*B.32    N:NWKEY       Number of elements in one key 
*B.REP                 N:NWKEY + 9 / 10           
*B.1     B:KDES        KEYS descriptor (3 bits per el. ,
*B.                    10 keys per word) 
*B/REP    
*B.REP               N:NWKEY           
*B.1     Z:TAG1       First part of CHTAG(1) 4 characters      
*B.2     Z:TAG2       Second part                              
*B/REP    
*B.1     L:LD          Directory records structure
*B.1     N:NRD         Number of records to describe this dir.  
*B.REP               N:NRD           
*B.1     IREC(I)       Record number I of directory             
*B/REP
*B.1     L:LB          file descriptor (only for TOP)
*B.1     N:NWREC       Number of words for bitmap descriptor      
*B.2     LREC          Physical record length (in words)          
*B.3     D:IDATE       Creation date of the file                  
*B.REP               N:NWREC            
*B.1     B:BITMAP      1 bit per record on the file                       
*B/REP
*B.1     L:LS          Subdirectory  structure
*B.REP               N:NSD            
*B.1     Z:NAM1        Name of subdirectory                   
*B.2     Z:NAM2        "                                          
*B.3     Z:NAM3        "                                          
*B.4     Z:NAM4        "                                          
*B.5     NCHSD         Number of characters in subdirectory name  
*B.6     IRECSD        Record number of this subdirectory         
*B.7     D:IDTIME      Date and Time of creation of subdirectory  
*B/REP
*B.1     L:LK          KEYS structure
*B.REP               N:NKEYS        ! I=1,NKEYS   
*B.1     P:LCYC        Pointer to highest cycle in C for key I
*B.REP               N:NWKEYS       ! K=1,NWKEYS 
*B.1     KEYS(I,K)     Element K of key I                     
*B/REP
*B/REP
*B.1     L:LF          Start of free space
*B.REP   NFREE
*B.1     EMPTY         Free space
*B/REP
*B.1     L:LCYC        Cycles structure
*B.1     PTOCYCLE       
*B.1     P:BI0015      LCYC Pointer to prev cycle of KEY (0 if no)
*B.1     P:BI1631      SECREC Second record (if there)
*B.2     D:CREATD      Creation date/time relative to 1986
*B.2     BITVAL04      RZKEEP
*B.2     BITVAL03      Append mode
*B.2     BITS0002      Vector format (if RZVOUT)
*B.3     PTODATA       Pointer to the data
*B.3     BITS1631      Record number where data str. starts
*B.3     BITS0015      Offset in record
*B.4     CYWORD4       
*B.4     BITS0019      Number of words in data structure
*B.4     BITS2031      Cycle number
*B/

Example where titles are contained in the bank itself

Fragment of the bank description

*B..EXTR HID@D(23:24) TITLE@D(25:30) NID@D(31:34) ND@D(35:39)
*B.ND    40
*B.NX    None
*B.UP    EXTR -1
*B.OR    EXTR -1
*B.IO    10I 12F -H

Data values of the actual bank

    11  TRPX          4.940      Px
    12  TRPY          26.85      Py
    13  TRPZ         -36.53      Pz
    14  TRE           45.64      Energy
    15  TRM           1.784      Mass
    16  TRCH         -1.000      Charge
    17  TRSX          .5641E-01  Start x
    18  TRSY          .5541E-01  Start y
    19  TRSZ          .3131      Start z
    20  TREX          .8039E-01  End x
    21  TREY          .1857      End y
    22  TREZ          .1357      End z
    23  NAME              "[t^-
    24  NAME              "
    25  START             "Prim
    26  START             " Par
    27  START             "t ->
    28  END               " Dca
    29  END               "yed_
    30  END               "in_G
    31  P                 "p= 4
    32  P                 "5.60
    33  P                 "5 Ge
    34  P                 "V
    35  RANGE             "R:
    36  RANGE             " .1-
    37  RANGE             ">
    38  RANGE             ".2 c
    39  RANGE             "m

   


Figure: Picture produced using the above indicated documentation and data values. Note: The escape characters defined in HIGZ to produce greek characters are recognized.


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