Program geooraupdate

for update of geometry and media in the database Oracle

by Ilse Koenig, April 15, 1998



The program has three options (you are asked to choose one when starting the program): Each option is possible for the following modules:
rich, sect, mdc, coils, tof, shower, frames, target

Option write

This option allows you to write any version of a module to a file which can be read by the Geant program.
The program asks you for the module you want to read from database and if you want to select a special version. If you answer 'n', the newest version is selected. If you answer 'y', there are three possibilities: you can enter the index desired or a date (e.g. 01-Jan-1998) or '0' to see all versions and then to choose one. You also have to enter the output directory.


Option compare

This option allows you to compare a geometry file with any version of this module in the database to see e.g. if the geometry has changed since a certain date.
The program asks you for an geometry inputfile and if you want to compare it with a special version in the database. A log-file with the diagnose will be written to the given output directory.


Option update

The program asks for in initialization file with the filenames of the modules which should be updated (if necessary) in the database. A media-file is optinal.
The initialization file is necessary to save all changes in all of these modules with the same new version index.

Successively each module is read from file and from database (latest version) in two lists. The program compares every parameter of each volume in the lists and writes the diagnose into a log-file.
The diagnose will e.g. look like this:
********************************************************************
log file for update of sect: /d/ilse/tmp/sectdbupdate150498.log
********************************************************************
All volumes from file found also in database
6 volumes need update
SEC1 geo: 0 points: 1 trans: 0
SEC2 geo: 0 points: 1 trans: 0
SEC3 geo: 0 points: 1 trans: 0
SEC4 geo: 0 points: 1 trans: 0
SEC5 geo: 0 points: 1 trans: 0
SEC6 geo: 0 points: 1 trans: 0
************************************************************

geo: diagnose of table GEOM_PROPERTIES (shape mother medium)
points: diagnose of table GEOM_PPOINTS
trans: diagnose of table GEOM_TRANSFORMATIONS
0 means no changes
1 means update of this table is necessary

Similar messages will show if new volumes have to be created or if volumes found in the database are not used anymore.
If a media-file is include in the initialization file all media used by the module are also checked for changes in the different tables for media and material definitions.

All changes are stored with the new version index in the respective tables. This procedure garanties, that old information is not lost.
To minimize the number of new lines in the tables a redesign of the tables was neccessary.

All code including the (new) read and store routines can be found in the HADES CVS-module gora.