Hall A ROOT/analyzer installation HOWTO This file is maintained by Seamus Riordan riordan@jlab.org Last Modified November 11, 2005 To get analyzer installed, you must first have ROOT installed. Assuming this is not done, the latest ROOT can be obtained from http://root.cern.ch/root/Availability.html in the form of precompiled binaries or source. Once these are unpacked add the path to the top level ROOT directory to the environment variable ROOTSYS (for example, this is /apps/root/4.00-08/root on ifarml1), add $ROOTSYS/bin to PATH, and $ROOTSYS/lib to LD_LIBRARY_PATH. If ROOT is already installed, this may or may not be already done. Check to make sure these variables are correct, because ROOTSYS must be defined before installing analyzer. Before using CVS set CVS_RSH to ssh. The analyzer package can be checked out from the CVS depository using: cvs -d :ext:username@cvs.jlab.org:/group/halla/analysis/cvs co -d myanalyzer analyzer Where $ANALYZER is the directory where analyzer is installed. Once this is downloaded and the decoder is updated, go into the analyzer directory and (assuming you're putting this on Linux) run gmake and grab some coffee. The top level directory analyzer (also now containing the program analzyer) should be added to the environment variable ANALYZER and then $ANALYZER to both your PATH and LD_LIBRARY_PATH. Once all this is done, you should be able to execute analzyer from the command line. Before running analzyer, you should set the DB_DIR environment variable to the directory containing the necessary databases for your analysis. The agen package may be checked out from CVS by: cvs -d :ext:username@cvs.jlab.org:/group/halla/analysis/cvs co -d myagenlib agen Running make from the command line should now work. The library libAGen.so generated by make can be accessed by adding the agen directory to LD_LIBRARY_PATH or, since it is a single library, it may be more convenient to load it on a case by case basis by gSystem->Load(/libAGen.so) in ROOT/analyzer where is the path in the directory structure. Here is an example of what I have in my .login in my ifarml1 account (csh): setenv CVS_RSH ssh setenv ROOTSYS /apps/root/4.00-08/root setenv ANALYZER /work/halla/e02013/disk1/analyzer setenv PATH $PATH':'$ANALYZER':'$ROOTSYS/bin setenv LD_LIBRARY_PATH $ANALYZER':'$ROOTSYS/lib setenv DB_DIR /work/halla/e02013/disk1/db and for a machine with a bash account in my .bashrc: export CVS_RSH=ssh export ROOTSYS=/home/riordan/root export ANALYZER=/home/riordan/analyzer export PATH=$PATH:$ROOTSYS/bin:$ANALYZER export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib:$ANALYZER export DB_DIR=/home/riordan/DB The analzyer should now be ready to run. However, one should keep in mind that the analyzer should not be run in the analyzer directory. It is best to create a directory for this purpose, usually containing the scripts one wishes to run. To execute a script you may go into that directory and from the command line run: analzyer