STAR   Computing  
Root Setup
Offline computing tutorial Maintained by G. Van Buren
Last modified Thu Dec 31 19:04:58 1998

The Root Environment

To use the Root framework, some environment should be provided. The Root environment is set in two steps.
  1. set the ROOTSYS environment variable (on UNIX machines it is done by STAR login script)
  2. Adjust the Root profile ".rootrc". This file contains some information useful to Root. Root looks for this file in
    1. the current directory
    2. the user's home directory
    3. the $ROOTSYS directory

The last means if you do nothing special, your Root defaults are defined by $ROOTSYS/.rootrc. Here are some examples of what parameters are defined in the Root profile:

Here is a piece of the STAR Root profile:
Unix.*.Root.DynamicPath:.:$(ROOTSYS)/lib:$(STAR_LIB):$(STAF_LIB)
Unix.*.Root.MacroPath:.:$(STAR)/StRoot/macros:$(STAR)/StRoot/test:$(ROOTSYS)/macros
WinNT.*.Root.DynamicPath:./;$(ROOTSYS)/star/bin;//Sol/afs_rhic/star/packages/dev/.intel_wnt/bin;$(ROOTSYS);$(ROOTSYS)/bin;$(PATH)
WinNT.*.Root.MacroPath:./;$(home)/root/macros;$(ROOTSYS)/tutorials;$(ROOTSYS)/star/macros;//Sol/afs_rhic/star/packages/dev/.intel_wnt/bin;$(ROOTSYS)/macros

# Rint (interactive ROOTexecutable) specific alias, logon and logoff macros
Rint.Load: $(ROOTSYS)/tutorials/rootalias.C
Rint.Logon: $(STAR)/StRoot/macros/rootlogon.C
Rint.Logoff: $(ROOTSYS)/tutorials/rootlogoff.C
Rint.History: $(HOME)/.root_hist
To see some Root startup options, just type "root4star -h" (or "root4star -h" under UNIX)
J:\Public\root> root4star -h
Usage: root [-l] [-b] [-n] [-q] [file1.C ... fileN.C]
Options:
  -b : run in batch mode without graphics
  -n : do not execute logon and logoff macros as specified in .rootrc
  -q : exit after processing command line macro files
  -l : do not show splash screen

How to start STAR Root demos on UNIX (sample log)
(Sun Solaris and Linux only, for the moment)

  1. Select on the latest STAR Library versions:
  2. Type: root4star
  3. See the Html version of the STAR_demos on the Web below.

How to quit STAR Root

To end the interactive Root session, just type the ".q" command as follows: (or see the sample log)
root [3] .q
This is the end of ROOT -- Goodbye

How to install Root and start STAR Root demos with Windows NT

  1. Click the "START" button
  2. Select "Run"
  3. Type:
  4. Double click "Root icon"
  5. Watch for Root banner:

  6. See Learning to User Root in STAR
  7. Read about using "ROOT in Windows" by Andrew Haas