Code maintenance

Insertion into CVS

The code was committed to the CVS directory using the following sequence of commands. This is usefull as a help to deal with this in the future. cvs update geant ... gets a list of mods (no conflicts) cd /rhic_data/code/geant/geant cvs commit geant ... get editting windows fill in commands - remember to save temporary files anser yes

Recompiling code in the working directory

The code should be recompiled and relinked using the gmake files present in the library directory for the working copy. cd ../geant/lib brahms.bld The executable will reside in ../geant/bin/[arch]/gbrahms , where the [arch] indicates the architecture of the machine e.g. irix aix etc. Note that this new script call gmake and in addition will create the directories needed for the binaries and libraries e.g. bin/linux or bin/aix etc.

The current Makefiles will remove the temporary files [lib/[arch]/*.f files before executing gbrahms.bld. Note this kind of files only exists in the directory in case of a failed compilation

Tagging version of geant

The CVS system has convinient commands for keeping track of release version. For many more details see the cvs manual. To insert the tag in to proper form one should use (probably) the rtag command. csv rtag GBRAHMS-1-1 geant Note that the tag GBRAHMS-1-1 cannot contain charecters .@?

Maintaining package versions.

The directory structure of packages and official version is to be setup as follows. The BRAHMS_LIB contains a directory for each package. At the package level there will be different versions where each version corresponds to a release tag in the cvs directory. The way to checkout a new version is the following cd BRAHMS_LIB/geant mkdir VER_1.5 cvs export -r GBRAHMS-1-5 -d VER_1.5 geant In addition there will be a directory VER_DEV which is the current development version i.e. bug fixes from the previous released version of the codes.

Internal organization of code.

Materials and tracking media

All tracking materials and tracking media are referred to internally using symbolic names, defined via fortran parameter statements. Thus the author of a detector need not be concerned with the actual numbering. As an example Aluminum is defined by the name med_al. To see what names already have been defined one must examine the files umate.f and umedia.f in the directory src/user and the include files umate.inc and umedia.inc in the directory inc. These are the only files which should be modified if a new material is needed.

To see interactively what materials are already defined use the command
CONT/PRINT TMED 0.

Detector code

The code used to define a given detector is in most cases located in a few files only. The detector is found under one of the catagories
  • mids : Mid rapidity spectrometer
  • fms1 : Front Forward spectrometer
  • fms2 : Back Forward spectrometer
  • global : Global detectors

For each detector global variables are defined in geo_[detector].inc, the variables are set to default values ie. initialised in bd_[detector].F and the geometry layout in eg_[detector].F

Code depositories

The code is now maintained using the CVS code manager.The master CVS repository is on the RHIC /afs directory. In order to checkout the code and work on it you must
  1. Have an account on the RHIC cluster.
  2. be registered with an afs account.
  3. be a member of the rhbrahms group.
  4. be a member of the bramhsoft afs-group (see McBreen, FV) .
This should only be done if you want to modify the existing code. If the purpose is to run GBRAHMS the released version on the afs disks should be accessed. Those directories do also have complete listings.