You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Page Contents

Root-dependent package template

While writing simple macros or python scripts can be an effective way to quickly
get started with ROOT, cases frequently arise where it would be most effective
to create a library of compiled functions or even a compiled executable. Here is
the setup of a template package for compiling ROOT-dependent C++ classes and applications.

First, determine which ROOT installation you will use.

On lxplus5 (i.e., slc5 operating system), set environment variables with values like these:

export ROOTSYS=/afs/cern.ch/sw/lcg/app/releases/ROOT/5.22.00d/i686-slc5-gcc43-dbg/root
export LD_LIBRARY_PATH=${ROOTSYS}/lib:/afs/cern.ch/sw/lcg/external/Python/2.5/i686-slc5-gcc43-opt/lib:${LD_LIBRARY_PATH}
export PATH=${ROOTSYS}/bin:/afs/cern.ch/sw/lcg/external/Python/2.5/i686-slc5-gcc43-opt/bin:${PATH}
export PYTHONPATH=$ROOTSYS/lib

  1. Create a directory where you will run ROOT and cd to it.
  2. Download the CompiledRootAnalysis template package, e.g.,
    wget http://mgwilson.web.cern.ch/mgwilson/Software/CompiledRootAnalysis_V01.tgz
  3. tar -xzvf CompiledRootAnalysis_V01.tgz
  4. Edit the top of CompiledRootAnalysis/scripts/RenamePackage.sh with a new package name and namespace for the code in
    your package; this will be denoted <package> below.
  5. CompiledRootAnalysis/scripts/RenamePackage.sh
  6. cd <package>; gmake dylib; gmake apps; gmake setup; cd ..

Athena-dependent package template

Template package for building and running Athena algorithms and tools

General C++ questions and answers

  • No labels