Setting up ROOT
To use ROOT, you need to have a couple environment variables defined.
I've provided scripts to set these up, depending on whether you are working on the cluster or on the Tier 3.
On the HEPLinux cluster
Root is installed on the cluster below
/cern/root
You can check what versions are available with the following command:
$ ls /cern/root/
A suffix of _64 (eg v15.22.00_64) indicates that it is a 64 bit version.
Simply run the setup script in the directory of the version you wish to use (pro is the most recent version)
$ source /cern/root/pro/rootsetup.sh
On the Tier 3
Root is installed on the cluster below
/msu/cern/root
You can check what versions are available with the following command:
$ ls /msu/cern/rootSL6/
A suffix of _64 (eg v15.22.00_64) indicates that it is a 64 bit version.
Simply run the setup script in the directory of the version you wish to use (pro_64 is the most recent 64 bit version)
$ source /msu/cern/rootSL6/pro_64/rootsetup.sh
If you use a csh type shell, source the script rootsetup.csh.
Using ROOT
Once you've set up ROOT with the instructions above, you can start it from your terminal:
$ root
or use the following command to skip the splash intro screen:
$ root -l
A simple job
A very simple job is included in the directory where the root installations are located. You can run this job with the following command:
$ root -l $ROOTSYS/../RootTest.C
root [0]
Processing /msu/cern/root/v5.22.00/../RootTest.C...
This is how to output text
Creating, populating, and iterating over a std::vector.
Resulting output should be lines of 2,3,6,8,3
2
3
6
8
3
Test file saved as test.root
(int)0
A root file test.root will be created that contains a histogram filled with the elements of the vector.
Versions
Versions of Root available from CERN are listed at
http://root.cern.ch/twiki/bin/view/ROOT/Download
We try to keep the locally installed versions in sync with that page. (There may be some time lag, if you need a new version contact
James Koll )
Other ROOT pages
ROOT Tutorials
ROOT User's Guide
--
JamesKoll - 24 Jun 2009