Install a customisable version of ROOT
In case you don't already have such an installation, here's a simple step by step guide.
Download ROOT
Navigate to
http://root.cern.ch/drupal/content/downloading-root. Let's say we choose version
5.34.18: download and unpack as explained in there, and you have a working copy of ROOT.
Recompile with gcc from CERN AFS
Now let's say we want to modify and/or recompile our new version of ROOT. Easiest way I found is to use the AFS gcc, by sourcing:
. /afs/cern.ch/sw/lcg/external/gcc/4.7/x86_64-slc5/setup.sh