Project

General

Profile

Customization of ROOT for NOvA DAQ » History » Version 1

Kurt Biery, 07/22/2011 09:27 AM

1 1 Kurt Biery
h1. Customization of ROOT for NOvA DAQ
2 1 Kurt Biery
3 1 Kurt Biery
The ROOT Analysis framework has been built for the NOvA teststand and DAQ environment using the following procedure:
4 1 Kurt Biery
5 1 Kurt Biery
h2. Source Setup
6 1 Kurt Biery
7 1 Kurt Biery
The root version 5.24.00 source tree was retrived from [ftp://root.cern.ch/root/root_v5.24.00.source.tar.gz] and copied to the /cern area on the build machine.
8 1 Kurt Biery
9 1 Kurt Biery
The environment variables ROOTSYS and LD_LIBRARY_PATH were set to point to the /cern/root area.
10 1 Kurt Biery
11 1 Kurt Biery
> export ROOTSYS=/cern/root
12 1 Kurt Biery
> export LD_LIBRARY_PATH=/cern/root/lib;$LD_LIBRARY_PATH
13 1 Kurt Biery
14 1 Kurt Biery
The current root directory was moved out of he way (mv /cern/root /cern/root-5.22) or if a symbolic link was being used the link was removed (unlink /cern/root).  The source code was unpacked to create the directory "root" under the /cern area. The /cern/root directory was entered into. 
15 1 Kurt Biery
16 1 Kurt Biery
> cd /cern/root
17 1 Kurt Biery
18 1 Kurt Biery
h2. Configuration
19 1 Kurt Biery
20 1 Kurt Biery
To configure the root distribution properly the script NOVA_Root_Config.sh was run.  The target "linuxx8664gcc" was used to produce a full 64bit build of ROOT and it's libraries.  The package was configured with the following options:
21 1 Kurt Biery
22 1 Kurt Biery
<pre>
23 1 Kurt Biery
#!/bin/sh
24 1 Kurt Biery
#
25 1 Kurt Biery
# Script with the config options for ROOT on a General
26 1 Kurt Biery
# NOVA-DAQ Machine running Fermi Sci Linux 5.3
27 1 Kurt Biery
export TOP=/usr
28 1 Kurt Biery
./configure linuxx8664gcc \
29 1 Kurt Biery
--build=debug \
30 1 Kurt Biery
--enable-xml \
31 1 Kurt Biery
--enable-asimage \
32 1 Kurt Biery
--enable-gdml \
33 1 Kurt Biery
--enable-g4root \
34 1 Kurt Biery
--enable-krb5 \
35 1 Kurt Biery
--enable-mathmore \
36 1 Kurt Biery
--enable-minuit2 \
37 1 Kurt Biery
--enable-opengl \
38 1 Kurt Biery
--enable-pgsql \
39 1 Kurt Biery
--enable-pythia6 \
40 1 Kurt Biery
--enable-python \
41 1 Kurt Biery
--enable-roofit \
42 1 Kurt Biery
--enable-rpath \
43 1 Kurt Biery
--enable-shadowpw \
44 1 Kurt Biery
--enable-shared \
45 1 Kurt Biery
--enable-ssl  \
46 1 Kurt Biery
--enable-xrootd \
47 1 Kurt Biery
--enable-afs \
48 1 Kurt Biery
--enable-qt \
49 1 Kurt Biery
--disable-builtin-freetype \
50 1 Kurt Biery
--with-pythia6-libdir=/cern/pythia6 \
51 1 Kurt Biery
--with-clhep-incdir=/cern/CLHEP/include \
52 1 Kurt Biery
--with-g4-incdir=/cern/geant4/include \
53 1 Kurt Biery
--with-g4-libdir=/cern/geant4/lib/geant4/Linux-g++/ \
54 1 Kurt Biery
--with-pgsql-incdir=/fnal/ups/prd/postgres/v8_2_3/Linux-2-6/include \
55 1 Kurt Biery
--with-pgsql-libdir=/usr/local/postgres/postgresql-8.2.3/lib \
56 1 Kurt Biery
--with-krb5=/usr/kerberos \
57 1 Kurt Biery
</pre>
58 1 Kurt Biery
59 1 Kurt Biery
The output of the configure command was checked to make sure that the proper paths to all libraries were correctly detected, and that the version of the library that was detected was the 64bit version.  For pythia, a 64bit version of the library was produced and located in /cern/pythia6 using the standard pythia build scripts.  The freetype libraries were rebuilt to include both 32bit and 64bit versions, and these were reinstalled system wide in /usr/lib and /usr/lib64.  The builtin freetype code for ROOT was disabled.
60 1 Kurt Biery
61 1 Kurt Biery
h2. Build
62 1 Kurt Biery
63 1 Kurt Biery
The root libraries and binaries were built using the standard "gmake" command.  Due to incompatibilities with parallel builds (ROOTs make files don't have the correct dependencies for parallel build) the only way to obtain a clean build was with all parallelism turned off (i.e. gmake -j 1).
64 1 Kurt Biery
65 1 Kurt Biery
The build takes a while, a long while.  Now would be a good time to go get coffee.
66 1 Kurt Biery
67 1 Kurt Biery
When the build is complete the output was checked to make absolutely sure that everything build, and tested correctly.
68 1 Kurt Biery
69 1 Kurt Biery
h2. Installation
70 1 Kurt Biery
71 1 Kurt Biery
After the build was verified, the build tree was moved out of the way prior to installation.
72 1 Kurt Biery
73 1 Kurt Biery
> mv /cern/root /cern/root-5.24.00-nova-build
74 1 Kurt Biery
75 1 Kurt Biery
Then from the build directory the install was performed to /cern/root.  This results in a nice clean installation of the system and libraries, with the build area preserved.
76 1 Kurt Biery
77 1 Kurt Biery
The install area was then moved to have the right version number.
78 1 Kurt Biery
79 1 Kurt Biery
> mv /cern/root /cern/root-5.24.00-nova
80 1 Kurt Biery
81 1 Kurt Biery
And a sim link was setup to point to it.
82 1 Kurt Biery
83 1 Kurt Biery
> ln -s /cern/root-5.24.00-nova root
84 1 Kurt Biery
85 1 Kurt Biery
At this point the root full root distribution is correctly build and installed with the nova options and points at all the right libraries.
86 1 Kurt Biery
87 1 Kurt Biery
h2. Usage
88 1 Kurt Biery
89 1 Kurt Biery
To use ROOT on a nova DAQ machine, simply make sure that your ROOTSYS and LD_LIBRARY_PATH point at the right version of root (i.e. /cern/root and /cern/root/lib).
90 1 Kurt Biery
91 1 Kurt Biery
If you need to setup a specific version of root, this can be done with the ups/upd setup process. (see the installed ups products for details)