This document explains the ``g4.prim format'' which is able to describe visualizable 3D (three-dimensional) scenes transferred from GEANT4 with help of its visualization manager and Fukui Renderer driver (DAWN driver). In the following, we use the term ``3D data'' meaning a data to construct a 3D scene or a hint information for the construction, e.g., shape, color, body-coordinate definition, and bounding box of the whole scene. On the other hand, the term ``g4.prim-format data'' means a set of 3D data plus several rendering commands to control DAWN.
DAWN receives the g4.prim-format data from GEANT4 via the TCP/IP socket of the default port number 40701, or via the named pipe by specifying -G and -g options, respectively:
% dawn -G (invoking DAWN with socket mode) % dawn -g (invoking DAWN with named pipe mode)
GEANT4 invokes DAWN with -G option by default,
and with -g option if the environmental variable
``G4DAWN_NAMED_PIPE'' is set to 1.
How GEANT4 sends the g4.prim-format data to DAWN is demonstrated in
the test programs, ``g4test_inet.cc
'' and ``g4test_unix.cc
'',
included in the DAWN package.
G4.prim-format data sent from GEANT4 are automatically saved
to a file with the name ``g4.prim" in current directory of DAWN.
G4.prim-format data can also be visualized with the stand alone (off-line) use of DAWN, giving a g4.prim-format file name from a command line as an argument.
% dawn g4.prim-format-filename
The g4.prim format is designed with the following philosophy: