Difference between revisions of "ROOT Analyzer/Compiling"

From HallCWiki
Jump to navigationJump to search
(Comments about old root versions)
Line 8: Line 8:
 
(Or "source setup.csh" if you use csh/tcsh.)  This setup script can be called in your login script.  Make sure that in addition to the Hall C code in the <tt>src</tt> directory, the Hall A code is in the <tt>podd</tt> directory.  See [[Analyzer/Git]] if it is not.
 
(Or "source setup.csh" if you use csh/tcsh.)  This setup script can be called in your login script.  Make sure that in addition to the Hall C code in the <tt>src</tt> directory, the Hall A code is in the <tt>podd</tt> directory.  See [[Analyzer/Git]] if it is not.
  
The only prerequisite, beyond what should normally be installed on a system, is root.  On a CUE system, type
+
The only prerequisite, beyond what should normally be installed on a system, is root.  Unfortunately, it seems that the version of root on the CUE is too old, so you will probably need to build your own version of root, using version 5.32 or laterAfter building your own version of root, make sure that ROOTSYS points to the root distribution and that LD_LIBRARY_PATH includes $ROOTSYS/lib and PATH contains $ROOTSYS/bin
 
 
  setup root
 
 
 
to setup root.  On your own system, install root somehow.
 
  
 
To compile the analyzer, type
 
To compile the analyzer, type
Line 18: Line 14:
 
   make
 
   make
  
This should build the Hall A libraries and the Hall C analyzer <tt>hcana</tt>.
+
This should build the Hall A libraries and the Hall C analyzer <tt>hcana</tt>.  If you get the error "'class TClonesArray' has no member named 'ConstructedAt'" then your version of root is too old.
  
 
See [[Analyzer/Running]] for instructions to run the analyzer.
 
See [[Analyzer/Running]] for instructions to run the analyzer.

Revision as of 09:37, 30 April 2012

A skeleton Hall C analyzer, based on the Hall A analyzer is available and may be retrieved with Git, see Analyzer/Git.

Before compiling, go to the directory where the code is and setup the environment with

 source setup.sh

(Or "source setup.csh" if you use csh/tcsh.) This setup script can be called in your login script. Make sure that in addition to the Hall C code in the src directory, the Hall A code is in the podd directory. See Analyzer/Git if it is not.

The only prerequisite, beyond what should normally be installed on a system, is root. Unfortunately, it seems that the version of root on the CUE is too old, so you will probably need to build your own version of root, using version 5.32 or later. After building your own version of root, make sure that ROOTSYS points to the root distribution and that LD_LIBRARY_PATH includes $ROOTSYS/lib and PATH contains $ROOTSYS/bin

To compile the analyzer, type

 make

This should build the Hall A libraries and the Hall C analyzer hcana. If you get the error "'class TClonesArray' has no member named 'ConstructedAt'" then your version of root is too old.

See Analyzer/Running for instructions to run the analyzer.