Initially new banks are created in some temporary file, say SCRATCH.DAT (see 8.1.3), following standard ZEBRA TZ (Titles Handling) format. See the ZEBRA TZ Reference Manual for full details, but the following example will serve to illustrate the most important features:-
*LOG *--- Standard Titles File: geometry.dat 11 Aug 1995 *--- Banks: GEDP, GEDS, TGEO *LOG OFF *--- *--- Geometry (GEO): Detector Geometry control bank. *--- *--- Contact: N. West Oxford. *--- *--- *DO TGEO 1 -i(31I 2F -I) -n20 #. Detector Geometry control bank. #. #. #. Standard Database Header #. 19750101 0 20380516 223319 #. 1..4 0 0 0 #. 5..7 0 0 0 #. 8..10 19750101 0 20380516 223319 #. 11..14 0 0 #. 15..16 4*0 #. 17..20 10*0 #. 21..30 #. #. End of Standard Database Header #. #. User Data. 0 #. Partial fill flag 20. #. Partial fill D2O level. 50. #. Partial fill H2O level. 0 #. Debug flags. 6*0 #. Spare.Note that:-
*---
lines are comment lines used between titles banks. They
are written to the log file.
Companion/ZEBRA: A Beginner's Guide/Bank FormatNote: Formats are essential for SNO to permit the bank to be stored in the SNO database. It is also essential to limit lines to a maximum of 80 characters.
The -n followed by a number gives an upper limit on the bank size. The default upper limit is 2000 so isn't required in this case and is only shown as an illustration. Here is an example where the -n isn't optional:-
*DO GEDP 462 -i(31I -I) -n48010ZEBRA needs to know the maximum size before it reads the file; it lifts the bank and then stores data as it reads. There is not need to be precise so long as you don't underestimate; ZEBRA will trim away the excess afterwards. If a bank overflows then ZEBRA will fail with a:-
"ZFATAM. !!!!! Going to ZFATAL for TZINIT fails.
*---
).
Note: the format is not taken from the supplied format
It is essential that the format supplied exactly matches the bank contents, as it is used to translate the data in the bank into a machine-independent format for distribution to the various platforms throughout the collaboration. If not, the contents may be damaged when store and retrieved from the database!
#B100001 #O017777 #X177AB
Titles files should only be used to input only those banks which have been editted by the user; default titles banks will be read in binary format from the SNO database. However, before new banks (titles) can be entered into the database, they will have to be allocated a directory and alias. Please contact database people (database specialist?) and discuss your requirements with them.