Starting ROOT


Before starting up a ROOT project

Make sure you have a valid UserName on the Linux systems. This is NOT necessarily your PC name and password. If you choose you may SSH to a Linux system from a PC.


Starting ROOT

If you are logging in directly to a Linux system then go to step 5

1) SSH to Linux system.

2) If X-Win32 is not running start it on your PC.

3) Make sure the permissions are set correctly.

4) Make sure SSH tunneling is set up at the prompt

(See Tutorial if you are having trouble)

5)To make things a little easier I suggest you add the following line to your .bashrc file

export ROOTSYS=/opt/root/rootX.xx/, where X.xx is the version you wish to run, e.g. 5.14

export PATH=$PATH:$ROOTSYS:$ROOTSYS/bin

export LD_LIBRARY_PATH=$ROOTSYS/lib/root:$LD_LIBRARY_PATH

Remember the above does not take effect until you login again or you "source" the file.

Do the following at the prompt:

>cp $ROOTSYS/etc/system.rootrc .rootrc (copy to home directory)

>cp $ROOTSYS/etc/root.mimes .root.mimes (copy to home directory)

You can also type at the prompt:

>gorootX.xx, where X.xx is the version number. This will set up version X.xx

To start ROOT type:

>root

you will see a window like this:

Compiled for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.36, Apr 23 2002

Type ? for help. Commands must be C++ statements.

Enclose multiple statements between { }.

root [0]


Running ROOT

This is the ROOT CINT prompt:

root [x] ; where x is the line number.

7) Now type at the prompt:

root[0] cout << "hello world"<< endl;

Type ".q" to quit ROOT, i.e.

root [1] .q

You now have run a one line ROOT program in the interpreter CINT. See "Programming in Root" to learn how to do more complex programs

back