next up previous contents
Next: GRASP Routines: Reading/using Caltech Up: Introduction Previous: How to add your   Contents

How to use the GRASP library from ROOT.

ROOT is an interactive public-domain environment for data analysis developed at CERN. Details about it can be found at http://root.cern.ch/ http://root.cern.ch/. Within the root environment, you can make use of the GRASP library. To do this, however, you need to produce a shared-object version of the GRASP library, and then load it into ROOT. The following instructions on how to do this were contributed by Damir Buskulic (buskulic@lapp.in2p3.fr), and have been tested under Linux.

  1. In building libgrasp.a and librecipes_c.a be sure that you have a position independent code option. For the gcc compiler this is -fPIC. This is needed to build a proper shared library.
  2. The ROOT environment variables should have been set during install, especially $ROOTSYS.
  3. Issue the following three commands: Note: it is important to put the files and libraries in the order given above.
  4. Launch ROOT and use the command gSystem->Load("libgrasp"); to have the routines from the GRASP library available within ROOT.
Note that cint has some trouble with prototypes for variable-length-argument (varargs) functions. These types of functions are used to implement the GRASP error handler [*]. For this reason the GRASP include file include/grasp.h has some lines which are automatically not included if the file is being read by cint. Thus the GRASP error-handling functions can't be called from within ROOT (but you wouldn't want to do this anyway).

Note that one can compile the Frame library for use with ROOT in exactly the same way. You replace grasp.h by FrameL.h and libgrasp.a by libFrame.a (always compiled with -fPIC). There is no need for librecipes in the Framelib case, because it does not make use of Numerical Recipes.


next up previous contents
Next: GRASP Routines: Reading/using Caltech Up: Introduction Previous: How to add your   Contents
Bruce Allen 2000-11-19