Debugging facilities

+-------------+                                               +----------##
| Geant 3.12  |               GEANT User's Guide              | BASE400  ##
+-------------+                                               +----------##
                                   

Author(s) : R.Brun Submitted: 01/10/84 Origin : R.Brun,F.Carena Revised: 10/12/92

The flags IDEBUG, ITEST and ISWIT(1-10) are available to the user in the common /GCFLAG/ for debug control [BASE030]. The array ISWIT is user defined and filled through the data record SWIT. (Warning: some flags are used by GHEISHA [PHYS510] and by the routine GDEBUG).

The flag IDEBUG is set to 1 in GTRIGI for the events with sequence number from IDEMIN to IDEMAX, as specified by the user on the data record DEBU. If IDEMIN is set negative debug is activated also in the initialisation phase.

The flag ITEST, set by the user via the data record DEBU, is also used by GTRIGI. The sequence number, the event number and the random numbers seeds are printed at the beginning of each event every ITEST from IDEMIN to IDEMAX.

Debug of data structures

The contents of the data structures can be dumped by calls to the routine

              +--------------------------------------------+
              | CALL GPRINT (NAME,NUMB) |
              +--------------------------------------------+
                                  

NAME
Name of a fan out Mother Data Structure
NUMB
Link position in Mother of substructure to be printed, 0 for all.
Examples

  1. CALL GPRINT('KINE',0) prints all banks JKINE
  2. CALL GPRINT('KINE',8) prints JKINE bank for track 8
  3. CALL GPRINT('VOLU',0) prints all existing volumes

The following names are recognized:

          DIGI,HITS,KINE,MATE,VOLU,ROTM,SETS,TMED,PART,VERT,JXYZ
                                  

GPRINT calls selectively the routines GPxxxx where xxxx of the names above. These routines can be called directly by the user.

Debug of events

The development of an event can be easily debugged via the routine:

                    +--------------------------------+
                    |CALL GDEBUG  |
                    +--------------------------------+
                                  

which operates under the control of the ISWIT array. It is the user responsability to call this routine from GUSTEP. If the DEBUG flag is active, the routine will perform as follows:

ISWIT(1)
2 =
The content of the temporary stack for secondaries in the common /GCKING/ is printed
ISWIT(2)
1 =
The current point of the track is stored in the JDXYZ bank via the routine GSXYZ.
2 =
The current information on the track is printed via the routine GPCXYZ.
3 =
The current step is drawn via the routine GDCXYZ.
4 =
The current point of the track is stored in the JDXYZ bank via the routine GSXYZ. When the particle stops the track is drawn via the routine GDTRAK and the space occupied by the track in the structure JDXYZ released.
ISWIT(3)
1 =
The current point of the track is stored in the JDXYZ bank via the routine GSXYZ.