HOWTO use the stand-alone HDDS system

From GlueXWiki
Revision as of 12:11, 8 December 2009 by Marki (Talk | contribs) (rough draft)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

As we decided at the the ??? Offline meeting, HDDS will be split off into a directory distinct from src.

What changed

  • hdds directory The directory trunk/src/programs/Simulation/hdds was moved to trunk/hdds. It must now be checked out and build separately from src. This eliminates the need to do a make in programs/Simulation/hdds before making the rest of src.
  • new build scheme for hdds The new top-level hdds creates a source directory, a libraries directory and a binaries directory.
    • bin: stores the binaries needed for source code generation
    • src: stores the "made" source code files including any include files
    • lib: stores libraries of objects compiles from files in src

With this structure, all hdds geometry dependent programs will be able to access what they need from src and lib.

  • new environment variables For other programs to access src and lib, two environment variables are needed: HDDS_SRC and HDDS_LIB. Makefiles should use these to access the files they need.

Here are the steps you will need to follow to use the new structure.

In the following I will assume that (a) You checkout latest version of src and that (for definiteness) you want to put it in /home/user/halld/src and that (b) the desired location of the hdds tree is /home/user/hdds

  1. checkout hdds
 cd /home/user
 svn checkout https://halldsvn.jlab.org/repos/trunk/hdds
  1. build hdds BMS_OSNAME must be defined. The makefile will check that it is and will fail if it is not.
 cd /home/user/hdds
 make
  1. set-up hdds environment variables
 setenv HDDS_SRC /home/user/hdds/src
 setenv HDDS_LIB /home/user/hdds/lib/$BMS_OSNAME
  1. checkout the src tree
 cd /home/user/halld
 svn checkout https://halldsvn.jlab.org/repos/trunk/src
  1. build the src tree
 cd /home/user/halld/src
 make LOCAL_HALLD_HOME=1

Note: the LOCAL_HALLD_HOME variable will force make to use to set HALLD_HOME and HALLD_MY to be consistent with this local src directory. Other definitions of these variables will be ignored.

Now some of you may not be able to get all of your stuff checked in and want preserve the working version you have already checked out. That is OK as long as you can stand to do upgrade to the latest version in situ. In that case, you replace step 4 above with the following

  1. update the src tree
 cd /home/user/halld/src
 svn update
  1. get rid of old files left over from the old system:
 rm \
 /home/user/halld/src/programs/Simulation/HDGeant/hddsGeant3.F \
 /home/user/halld/src/programs/Simulation/hdds/hddsGeant3.F \
 /home/user/halld/src/libraries/HDGEOMETRY/hddsroot.h \
 /home/user/halld/src/programs/Simulation/hdds/hddsroot.h
  1. clean up the old build
 cd /home/user/halld/src
 make clean