Installing the mTPCSoftware package on analysis clients

From LHEP Wiki
Revision as of 12:48, 4 June 2014 by Lhep (talk | contribs) (→‎mTPCSoftware installation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Preparing the Installation

In order to use the mTPCSoftware package, several third party tools must be installed on the computer where the package is being installed. In the following sections the required tools and there installation process are described.

FFTW3 installation

  • Download the fftw3 package from http://www.fftw.org (you need to install an older version because the new versions use __float_128 data type which is not supported by ROOT)
 $> wget ftp://ftp.fftw.org/pub/fftw/fftw-3.2.2.tar.gz .
  • Unpack the source tarball and enter install directory
 $> tar -xvvzf fftw-3.2.2.tar.gz
 $> cd fftw-3.2.2
  • Configure and install the package (the flag --with-pic is required only on x86 64-bit arch)
 $> ./configure --with-pic
 $> make
 $> make install

Check if you can find the header file (fftw3.h) in /usr/local/include and the library (libfftw3.a) in /usr/local/lib. These are the default directories. If you find the files in different locations, you just need to adapt the ROOT configure command (see below).

ROOT installation

  • Download the ROOT source files from http://root.cern.ch. The currently installed version on lheppc83.unibe.ch is 5.34.10
 $> wget ftp://root.cern.ch/root/root_v5.34.10.source.tar.gz .
  • Unpack the source tarball and enter the ROOT directory
 $> tar -xvvzf root_v5.34.10.source.tar.gz
 $> cd root
  • Set the ROOT system environment variable, so you don't need to specify a prefix during configuration
 $> export ROOTSYS=~/root_5.35.10
  • Configure the ROOT installation and then install
 $> ./configure --enable-explicitlink --enable-rpath --enable-soversion --enable-minuit2 --enable-qt --enable-roofit --enable-table
    --enable-fftw3 --with-fftw3-incdir=/usr/local/include --with-fftw3-libdir=/usr/local/lib
 $> make

Make sure that you specify the fftw3 include and library directories correctly if they differ from the default ones.

  • Set the environment variables in your .bash_profile (for bash users)
 export ROOTSYS=/path/to/root/installdir
 export PATH=$PATH:$ROOTSYS/bin
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib

Midas installation

  • Download Midas and XML packages from Midas repository
 $> git clone https://bitbucket.org/tmidas/midas
 $> git clone https://bitbucket.org/tmidas/mxml
  • Enter the Midas directory and compile
 $> cd midas
 $> make
 $> make install
  • Set the environment variables in your .bash_profile (for bash users)
 export MIDASSYS=/path/to/MIDAS/install_dir
 export PATH=$PATH:$MIDASSYS/bin
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MIDASSYS/lib

Note if you use Slackware and you get errors during compilation regarding ODBC: Slackware uses iODBC and you have to edit the Makefile and change lodbc for liodbc

ROOTANA installation

  • Download the ROOTANA package from the svn repository using the login/password: svn/svn
 $> svn checkout https://ladd00.triumf.ca/svn/rootana/trunk rootana
  • Enter the ROOTANA directory and compile
 $> cd rootana
 $> make
  • Set the environment variables in your .bash_profile (for bash users)
 export ROOTANASYS=/path/to/rootana/install_dir/which/is/source_dir/also

Note: on Slackware 14.0 I had to create a link $MIDASSYS/linux which points to $MIDASSYS directory otherwise ROOTANA doesn't compile.

Also, if you get errors during the installation of the mTPCSoftware package concerning the fPIC flag, enter the ROOTANA directory and add -fPIC to the CXXFLAGS in every Makefile (including libAnalyzer, libAnalyzerDisplay, libMidasInterface, libNetDirectory and libXmlServer) and recompile. Most probably you will have errors on most installations.

mTPCSoftware installation

Finally, after preparing the installation, we are ready to download the mTPCSoftware package and compile it. The software package is hosted on the diskstation lheppc90.

  • Download the package
 $> svn co svn+ssh://svnuser@lheppc90.unibe.ch/volume1/svn/mTPCSoftware mTPCSoftware
  • Enter the mTPCSoftware directory and compile
 $> cd mTPCSoftware/make
 $> make
  • Set the environment variables in your .bashrc (if you use bash). Add:
 export mTPCSYS=/path/to/mTPCSoftware/checkoutdir
 export PATH=$PATH:$mTPCSYS/bin
 export LD_LIBRARY_PATH=$ LD_LIBRARY_PATH:mTPCSYS/lib

The EventDisplay can access the SQL database on lheppc90.unibe.ch to retrieve run information which the user has added via the runlist. In order to be able to use this tool on your local machine you need to have libmysqlclient.so installed, check for mysql-devel package.

Example .bash_profile (from lheppc83)

On lheppc83 the current .bash_profile looks like this:

 # setup for the old ROOT installation
 export ROOTSYS=/home/exodaq/root_5.35.10
 export PATH=$PATH:$ROOTSYS/bin
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
 # setup for new ROOT installation
 #source /home/exodaq/applications/root/bin/thisroot.sh
 # setup for Geant4
 source /home/exodaq/GEANT4_9_6/geant4.9.6-install/bin/geant4.sh
 source /home/exodaq/GEANT4_9_6/geant4.9.6-build/geant4make.sh
 # environment for VdA data analysis
 alias runlva='cmake -DGeant4_DIR=/home/exodaq/GEANT4_9_6/geant4.9.6-install/lib64/Geant4-9.6.2/ /home/exodaq/applications/LVA_G4_Simulations/LVA'
 # environment for the xlr data analysis
 export MIDASSYS=/usr/local
 export PATH=$PATH:$MIDASSYS/bin
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MIDASSYS/lib
 export ROOTANASYS=/home/exodaq/rootana
 export mTPCSYS=/home/exodaq/mTPCSoftware
 export PATH=$PATH:$mTPCSYS/bin
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$mTPCSYS/lib