next up previous index
Next: IOPA400 ZEBRA direct Up: GEANT Previous: IOPA200 ZEBRA sequential

IOPA300 Data structure I/O with sequential files

Routine ID: IOPA300
Author(s): Submitted: 01.06.83
Origin: R. BrunRevised: 17.12.93

CALL GFIN (LUN,CHOBJ,NKEYS,IDVERS*,CHOPT,IER*)

LUN
( INTEGER) logical unit;
CHOBJ
( CHARACTER*4) array with the data structures to be read:
MATE
material;
TMED
tracking medium;
VOLU
volumes;
ROTM
rotation matrix;
SETS
detector set;
PART
particle;
SCAN
scan geometry;
DRAW
drawing;
INIT
all of the above;
KINE
this keyword will trigger the read of KINE and VERT unless the flag S is set;
DIGI
digitisation;
HEAD
event header;
HITS
hits;
RUNG
run;
STAK
particle temporary stack;
STAT
volume statistic;
VERT
vertex;
JXYZ
track points;
TRIG
this keyword will trigger the read of DIGI, HEAD, HITS, KINE, VERT and JXYZ unless the S flag is set;
NKEYS
( INTEGER) number of keys in array CHOBJ;
IDVERS
( INTEGER) version of the data structure to be read in, if 0 it will read any version, on output it contains the version of the data structure read in;
CHOPT
( CHARACTER*(*)) option:
I
among the data structures specified in CHOBJ read only the initialisation ones;
K
among the data structures specified in CHOBJ read only KINE and TRIG, if present;
T
among the data structures specified in CHOBJ read only DIGI, HEAD, HITS, KINE, VERT and JXYZ, if present;
S
interpret KINE to mean only the KINE data structure and ignore TRIG and INIT;
Q
quiet option, no message is printed;
IER
( INTEGER) error flag:
<0
ZEBRA error flag as returned in IQUEST(1);
0
read completed successfully;
>0
if only IER] structures read in out of the NKEYS requested;

Routine to read GEANT object(s) from a ZEBRA/FZ file. The data structures from disk are read in memory. The FZ data base must have been been created via GOPEN/GFOUT. Example:

      CALL GOPEN(1,'I',1024,IER)
      IDVOLU = 0
      IDMATE = 0
      IDTMED = 0
      IDROTM = 0
      IDPART = 0
      IDSCAN = 0
      IDSETS = 0
      CALL GFIN (1,'VOLU',1,IDVOLU,' ',IER)
      CALL GFIN (1,'MATE',1,IDMATE,' ',IER)
      CALL GFIN (1,'TMED',1,IDTMED,' ',IER)
      CALL GFIN (1,'ROTM',1,IDROTM,' ',IER)
      CALL GFIN (1,'PART',1,IDPART,' ',IER)
      CALL GFIN (1,'SCAN',1,IDSCAN,' ',IER)
      CALL GFIN (1,'SETS',1,IDSETS,' ',IER)

CALL GFOUT (LUN,CHOBJ,NKEYS,IDVERS,CHOPT,IER*) The arguments have the same meaning than for GFIN with the following differences:

IDVERS
( INTEGER) version identifier of the data structures to be written out;

Routine to write GEANT object(s) into a ZEBRA/FZ file. The data structures from memory are written on the file. The FZ data base must have been been created via GOPEN/GFOUT. Example:

      CALL GOPEN(1,'O',1024,IER)
      CALL GFOUT (1,'VOLU',1,IDVOLU,' ',IER)
      CALL GFOUT (1,'MATE',1,IDMATE,' ',IER)
      CALL GFOUT (1,'TMED',1,IDTMED,' ',IER)
      CALL GFOUT (1,'ROTM',1,IDROTM,' ',IER)
      CALL GFOUT (1,'PART',1,IDPART,' ',IER)
      CALL GFOUT (1,'SCAN',1,IDSCAN,' ',IER)
      CALL GFOUT (1,'SETS',1,IDSETS,' ',IER)

Note: the routines GGET and GSAVE are obsolete and should not be used.

IOPA400


next up previous index
Next: IOPA400 ZEBRA direct Up: GEANT Previous: IOPA200 ZEBRA sequential


Janne Saarela
Mon Apr 3 12:46:29 METDST 1995