Next: References Up: The SNO Database: SNODB Previous: The Initial sndirs.dat

Titles File Format

The following documentation can be found in full form on the web at http://wwwcn.cern.ch/asdoc/zebra_html3/zebramain.html (the Titles section of the CERN Zebra online manual).


Outline

The input to TZINIT is presented on a formatted text file of 80-column
card-images, giving the titles one after the other, as shown by the
example on the next page.

Each title starts with the 'title header line' *DO ...  which selects
mode and options for the reading of its associated ``title
data''. These have to come immediately and completely after the title
header line.

Normal mode is ``free-field format'' where the data are read
line-by-line and the text is interpreted. The mode of each data word
is taken from the way it is written: integer data have neither the
decimal point nor an exponent, floating data have either or both,
Hollerith data start with : or ' or ", octal data are pre-fixed with
#O.

With ``Fortran format'' the data are read by a single Fortran READ
statement with the FORMAT taken from the -F option on the title header
line. This is useful for computer generated titles.

``Control lines'' to TZINIT may be given interspersed with the titles.
Global options are selected with control lines; other examples are the
comment line with *-- in column 1, and the input terminator *FINISH.

Control lines to TZINIT, including title-header lines starting with
*DO, are handled case-insensitive, ie. they are converted to upper
case before processing.

*-------            TITLE VERSION A3
*PRINT
*.-------1---------2---------3---------4---------5---------6---------7
*DO  RTBC  -iF                   #. 810127     CERN  ROLL 103
13.       1100.
            .99999  +.00042  +.00302
           -.00042   .99993  -.0023
           -.00302  +.0023    .99993     0.     +.015     1.963

*DO  CAM1  -e -n27 -c11 -iF      #. 810121 17.27  ROLL 103
 1 CAM       3.  12.    9.067    11.8516   75.6561     25.    -75.6561
 1 MED       2.        1.51      1.5       1.458     2.382     1.57
             4.06      1.0884
 1 DIST       -.00169     -.00004      .015        .0011      -.0001
               .00394     -.00245      .00378      .051        .0023
               .033        .09

*DO  FID1  -c11 -iF              #. 810121 17.27  ROLL 103  ERASME
            12.
 1 4   1     1.  -17.2475  -18.6369
 1 4   2     2.  -17.2595   -4.2708
 1 4   3     3.    -.7761   -4.3177
 1 1   1    11.  -13.8081  -15.9118
 1 1   2    12.  -13.7343   -7.5253
 1 1   3    13.   -4.8669   -7.5898
 1 1   4    14.   -4.8931  -15.9473
 1 2   1    21.  -13.0353  -15.6000
 1 2   2    22.  -12.8979   -7.3464
 1 2   4    24.   -3.7895  -15.6767
 1 3   3    33.   -2.6674  -17.2822
 1 3   4    34.   -3.1636  -17.8522

*DO  CAM2  -e -n27 -c11 -iF      #. 810121 17.27  ROLL 103
 2 CAM       3.  12.    9.1488  -10.3208   75.673      25.    -75.673
 2 MED       2.        1.51      1.5       1.458     2.382     1.57
             4.06      1.0884
 2 DIST       -.0017       .00005      .015       -.0011      -.0001
               .00043     -.00443     -.00278      .0065      -.0024
               .033        .05

*DO  FID2  -c11/40 -iF           #. 810121 17.27  ROLL 103  ERASME
            13.
 2 4   1     1.  -17.4350    3.9107     examples of other representations
 2 4   2     2.  -17.4786   18.2503     integer    15  -24  0
 2 4   3     3.    -.8612   18.2306     floating   -.123E-7  1E-12
 2 1   1    11.  -13.8891    7.4810     octal      #0731244600
 2 1   2    12.  -13.8296   15.8810     hex        #xffff
 2 1   3    13.   -4.9569   15.7810     Hollerith  :PISA :BARI
 2 1   4    14.   -4.9724    7.4133                :K*(1430)
 2 2   1    21.  -13.1122    7.3163                'text with blanks'
 2 2   3    23.   -3.7338   15.3468                "text with ' and blank"
 2 2   4    24.   -3.8710    7.1994
 2 3   1    31.  -15.4499    4.5935
 2 3   2    32.  -15.8947    5.0865
 2 3   4    34.   -3.2437    4.4470
*.-------1---------2---------3---------4---------5---------6---------7



Title header lines

A title-header line signals the start of data for a new title bank; it
specifies the ID of the title bank, the way the data are to be read,
and further options. Its format is:

   *DO  <idh> [idn]  [-<opt><option text>]   [#. comment ]

*DO  in cols 1/4 marks the header line;
<idh>
     is the 4 character Hollerith bank ID;
<idn>
     is the numeric bank ID, integer, if any;
<opt>
     is a single option letter,
<otx>
     is the option text, if needed.

The following options are available:

-F(format)
     read the data with a single formatted Fortran READ statement, using the
     FORMAT given, which must not contain blanks, the brackets must be
     present.
-Itext
     set the I/O characteristic for the bank, with text:
     B, I, F or D if the bank is all bits, integer, floating, or double
     precision;
     (string) where string is the I/O characteristic, (see routine MZFORM);
     the default is: type undefined
-Nn  expect n data words, for -F this must be exact; for free-field format
     this may be omitted if less than 2000 words are to be read and if the
     size is not to be changed by TZUSER. A bank will initially be lifted to
     accomodate <n> data words to be read and will be shortened when input
     processing is complete.
-Un  call TZUSER for this bank, passing n as NPARA, zero if absent.

For free-field format only:

-Ca/e
     use columns a/e only on each line, defaults: 1 for a, 80 for e
     Ex.: -C11/72 use only the text on columns 11 to 72 on each line,
     except: '*' in col. 1 is forbidden
-En  expect exactly <n> words (as given by -Nn). If less or more data words
     are found, TZINIT will print a message and go to ZFATAL on end of
     input.
-Sn  true size of the bank is <n> words (as given by -Nn). The bank is not
     reduced to the number of data words actually read.
-AnCW
     initialize Hollerith handling as though the control-item #A[n][C][W]
     had been read



Fortran formatted input

With Fortran formatted input all the data for the complete title bank are
read with a single READ statement using the format given on the header line.
For this to be possible the exact number of words to be read must be
specified with the -N option.

Example

       *DO  FIDU 1 -IF -N37 -F(10X,F10.0/(10X,3F10.0))
                   12.
        1 4   1     1.     -17.2475  -18.6369
        1 4   2     2.     -17.2595   -4.2708
        1 4   3     3.       -.7761   -4.3177
        1 1   1    11.     -13.8081  -15.9118
        1 1   2    12.     -13.7343   -7.5253
        1 1   3    13.      -4.8669   -7.5898
        1 1   4    14.      -4.8931  -15.9473
        1 2   1    21.     -13.0353  -15.6000
        1 2   2    22.     -12.8979   -7.3464
        1 2   4    24.      -3.7895  -15.6767
        1 3   3    33.      -2.6674  -17.2822
        1 3   4    34.      -3.1636  -17.8522
       *.-------1---------2---------3---------4---------5

The option -IF specifying the I/O characteristic is important in this case.
It causes the execution of a Fortran READ statement with an I/O list of type
REAL; on some machines Fortran is not able to read acting solely under
FORMAT control, ignoring the type of the I/O list.

appendix


cdsno@higgs.hep.upenn.edu
Mon Aug 10 17:56:28 EDT 1998