Difference between revisions of "Hall D Detector Specification (HDDS)"

From GlueXWiki
Jump to: navigation, search
m (HOWTO use HDDS moved to Hall D Detector Specification (HDDS): Need a global page to document the system, HOWTO is too narrow a category.)
(No difference)

Revision as of 11:44, 9 February 2010

Code Location

The source code and data files are kept in the Hall D Subversion repository. The version on the trunk is in

Tagged versions are kept in locations like

How to Build

under construction

How to Build src against HDDS

under construction

old documentation

  • 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 variable
    For other programs to access geometry information, a new environment variable is needed: HDDS_HOME. Makefiles should use the paths $HDDS_HOME/src and $HDDS_HOME/lib to access the files they need.
    Note: When running the reconstruction, you need to define a location for the main HDDS file, via the JANA_GEOMETRY_URL environment variable. The definition of that variable needs to be consistent with the new scheme. So instead of doing something like
     setenv JANA_GEOMETRY_URL xmlfile://$HALLD_HOME/src/programs/Simulation/hdds/main_HDDS.xml # old system

    you should now do something like

     setenv JANA_GEOMETRY_URL xmlfile://$HDDS_HOME/main_HDDS.xml # new system

Changed files

Specifically, these are the changes in the src tree:

  • directory deleted:
    • src/programs/Simulation/hdds
  • files modified:
    • src/programs/Simulation/HDGeant/Makefile.bms
    • src/programs/Simulation/Makefile
    • src/libraries/HDGEOMETRY/Makefile
    • src/Makefile

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

If you are not ready to upgrade, don't. Your working version is obviously not affected by this change. You can upgrade when you are ready. If you do want to upgrade and neither of these situation fits yours, please contact me and we will figure out a solution.

1. 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 and
(c) you already have a basic environment set-up for building the src tree

  • 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
  • 3. set-up the hdds environment variable
      setenv HDDS_HOME /home/user/hdds
  • 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.

2. 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 (i. e., do steps 1, 2, 3, 4a, 4b, 4c, 5):

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