next up previous
Up: How to Use PRIMEX_MY Previous: 2 Environment Variables

3 An Example

Let's assume that we want to make a change in the hycal library and test it out its effect when running prim_ana. Let us further assume that your username is janed. There are five steps:

1. Set up the environment.
 

  source /group/primex/scripts/primex_jlab

Your PRIMEX_MY now points to /work/hallb/primex/pdisk/janed.

2. Get the code.
 

Assuming that you have already created a directory in your home area, called /home/janed/primex,

  > cd /home/janed/primex
  > cvs checkout src/libraries/hycal src/programs/prim_ana
  cvs checkout: Updating src/libraries/hycal
  U src/libraries/hycal/HYCALCLUSTER_GetHycalClusters.cc
  U src/libraries/hycal/HYCALHIT_GetHycalHits.cc
  ...
  cvs checkout: Updating src/programs/prim_ana
  U src/programs/prim_ana/Makefile
  U src/programs/prim_ana/hist_book.cc
  ...

This creates the directory /home/janed/primex/src with the indicated sub-directories.

3. Make the modification.
 

What you do here is up to you. Presumably you will want to edit some of the code you just checked out.

4. Build the code
 

  > cd /home/janed/primex/src/libraries/hycal
  > make

This creates the file libhycal.a in /work/hallb/primex/pdisk/janed/lib/Linux.

  > cd /home/janed/primex/src/programs/prim_ana
  > make

This creates the file prim_ana in /work/hallb/primex/pdisk/janed/bin/Linux. This version of prim_ana uses your private version of libhycal.a and not the one in the production build.

5. Run it.
 

  > $PRIMEX_MY/bin/Linux/prim_ana

$Id: primex_my.tex,v 1.10 2004/01/22 14:51:28 marki Exp $


next up previous
Up: How to Use PRIMEX_MY Previous: 2 Environment Variables
Mark M. Ito 2004-01-22