1 | #!/bin/tcsh |
---|
2 | |
---|
3 | # test if the first argument is help |
---|
4 | if ( $#argv > 0 ) then |
---|
5 | if ( $1 == help || $1 == h || $1 == --help || $1 == --h ) then |
---|
6 | echo after a clean checkout to recompile: source config.csh init |
---|
7 | echo working on your project: source config.csh |
---|
8 | exit |
---|
9 | endif |
---|
10 | endif |
---|
11 | |
---|
12 | echo setting up root 5.34 |
---|
13 | |
---|
14 | #the root initialisation was copied from /lal/root/5.34/setup.csh |
---|
15 | # to change the version, change the number in the line "set init_script=...." |
---|
16 | |
---|
17 | # echo "Setting the ROOTSYS and PATH Variables" |
---|
18 | |
---|
19 | set root_arch=`uname -i` |
---|
20 | switch ( $root_arch ) |
---|
21 | case i386: |
---|
22 | set libdir=lib |
---|
23 | breaksw |
---|
24 | |
---|
25 | case x86_64: |
---|
26 | set libdir=lib64 |
---|
27 | breaksw |
---|
28 | |
---|
29 | default: |
---|
30 | echo "Error: unsupported root_architecture ($root_arch)" |
---|
31 | exit 1 |
---|
32 | breaksw |
---|
33 | endsw |
---|
34 | |
---|
35 | # ROOTSYS must point to the directory containing ROOT etc/ |
---|
36 | set init_script=`echo /lal/root/5.34/setup.sh` |
---|
37 | if ( -z ${init_script} ) then |
---|
38 | echo "Failed to guess ROOT version. Cannot set the environment." |
---|
39 | exit 2 |
---|
40 | endif |
---|
41 | set root_dir=`dirname ${init_script}` |
---|
42 | set root_version=`basename ${root_dir}` |
---|
43 | |
---|
44 | if ( ${init_script} == '.' ) then |
---|
45 | echo "Failed to guess ROOT version. Cannot set the environment." |
---|
46 | exit 3 |
---|
47 | endif |
---|
48 | set root_sys_dir=/lal/root/${root_version} |
---|
49 | if ( ! -d ${root_sys_dir} ) then |
---|
50 | echo "ROOT version ${root_version} not found" |
---|
51 | exit 4 |
---|
52 | endif |
---|
53 | set root_bin_dir=${root_sys_dir}/bin/${root_arch} |
---|
54 | if ( ! -d ${root_bin_dir} ) then |
---|
55 | echo "Architecture ${root_arch} not available for ROOT version ${root_version}" |
---|
56 | exit 5 |
---|
57 | endif |
---|
58 | setenv ROOTSYS ${root_sys_dir} |
---|
59 | |
---|
60 | # ROOT binaries are located in an root_arch-specific directory under bin |
---|
61 | setenv PATH ${root_bin_dir}:${PATH} |
---|
62 | |
---|
63 | setenv LD_LIBRARY_PATH ${ROOTSYS}/${libdir}:${LD_LIBRARY_PATH} |
---|
64 | |
---|
65 | # test of this is for a global recompilation/installation |
---|
66 | if ( $#argv > 0 ) then |
---|
67 | if ( $1 == init ) then |
---|
68 | cd Pythia8/pythia8170/ |
---|
69 | ./configure --with-hepmc=../../hepmc/x86_64-slc5-gcc41-opt/ |
---|
70 | gmake |
---|
71 | cd examples |
---|
72 | ./configure |
---|
73 | cd ../../../ |
---|
74 | cd Delphes-3.0.0 |
---|
75 | ./configure |
---|
76 | gmake |
---|
77 | cd ../ |
---|
78 | endif |
---|
79 | endif |
---|
80 | |
---|
81 | echo setting up Pythia8 with HepMC |
---|
82 | source `pwd`/Pythia8/pythia8170/examples/config.csh |
---|
83 | |
---|
84 | echo setting up PythiaDelphes |
---|
85 | setenv PYTHIA8LOCATION `pwd`/Pythia8/pythia8170 |
---|
86 | setenv PYTHIA8DATA `pwd`/Pythia8/pythia8170/xmldoc |
---|