mkdir workdir cd workdir
on a linux machine using bash: --------------------------------- ROOTSYS=/usr/local/root_v4.00.08 export ROOTSYS PATH=$PATH:$ROOTSYS/bin export PATH LD_LIBRARY_PATH=$ROOTSYS/lib/root export LD_LIBRARY_PATH --------------------------------- on a sun using tcsh or csh: --------------------------------- #!/bin/csh setenv ROOTSYS /usr/local/root_v3.10.02 set path = ( $path $ROOTSYS/bin ) setenv LD_LIBRARY_PATH $ROOTSYS/lib:$LD_LIBRARY_PATH ---------------------------------where ROOTSYS points towards the version of root that you want to use. Look for available versions in /usr/local on the suns and on the gslinux# GS machines. On Ken's linux machines you would say 'setup root' instead of using the setuproot file to get the same effect.
on solaris: source ~/.cshrc source ./setuproot on linux . ~/bash_profile . ./setuprootwhere the first line resets your environment and the second line sets up the environment to use the ROOT version you specified with ROOTSYS in the setuproot file.
mkdir src bin cd src
wget https://www.phy.anl.gov/gammasphere/doc/GSSort/src/src.tgz tar -zxvf src.tgz gmake GSSortthat should make GSSort in your bin directory. You may have to do something like
cp Makefile.Linux Makefile.`uname`.`uname -r` or cp Makefile.SunOS Makefile.`uname`.`uname -r`to create the Makefile that will work on the platform you are on. Look at what 'gmake GSSort' complains that it cannot find in terms of a Makefile and what Makefiles are in the src directory.
rootn.exe .L GSUtil.cc++ .qthat will make GSUtil_cc.so here in the src directory
cd ../
rootn.exe .L src/GSUtil_cc.so dload("mydata.root") ls() d1("sumehi") . . startsort("bin/GSSort","c1.chat","c1.log) . .
cd workdir [source ~/.cshrc;]source ./setuproot (on Solaris) or [source ~/.cshrc;]. ./setuproot (on Linux) rootn.exe .L src/GSUtil_cc.so dlload("mydata.root") ls() d1("sumehi") . . startsort("bin/GSSort","c1.chat","c1.log) . .
Notice that using this scheme, you could use different versions of ROOT, GSSort and GSUtil in different directories and quickly switch between them. You are also independent of any changes to GSOOrt/GSUtil that could adversely affect you.