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