HOWTO use the stand-alone HDDS system

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

Jump to: navigation, search

As we decided at the the October 21 Offline meeting, HDDS will be split off into a directory distinct from src. See the presentation from that meeting for a discussion of the reasons for doing this.

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.

Steps for using the new structure

Here are the steps you will need to follow to use the new structure. There are two scenarios described:

  1. Fresh checkout and build
  2. Update current working version, re-build

Fresh checkout and build

In the following I will assume that
(a) You want to checkout the 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
    
  • 2. 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
    
  • 3. set-up hdds environment variables
      setenv HDDS_SRC /home/user/hdds/src
      setenv HDDS_LIB /home/user/hdds/lib/$BMS_OSNAME
    
  • 4. checkout the src tree
      cd /home/user/halld
      svn checkout https://halldsvn.jlab.org/repos/trunk/src
    
  • 5. 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.

Update current working version, re-build

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 upgrade to the latest version in situ. In that case, you replace step 4 above with the following

  • 4a. update the src tree
      cd /home/user/halld/src
      svn update
    
  • 4b. 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
    
  • 4c. clean up the old build
      cd /home/user/halld/src
      make clean