source: HiSusy/trunk/config.csh @ 4

Last change on this file since 4 was 4, checked in by zerwas, 11 years ago

update config and more

File size: 2.2 KB
Line 
1#!/bin/tcsh
2
3# test if the first argument is help
4if ( $#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
10endif
11
12echo 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
19set root_arch=`uname -i`
20switch ( $root_arch )
21case i386:
22     set libdir=lib
23     breaksw
24
25case x86_64:
26       set libdir=lib64
27       breaksw
28
29default:
30       echo "Error: unsupported root_architecture ($root_arch)"
31       exit 1
32       breaksw
33endsw
34
35# ROOTSYS must point to the directory containing ROOT etc/
36set init_script=`echo /lal/root/5.34/setup.sh`
37if ( -z ${init_script} ) then
38  echo "Failed to guess ROOT version. Cannot set the environment."
39  exit 2
40endif
41set root_dir=`dirname ${init_script}`
42set root_version=`basename ${root_dir}`
43
44if ( ${init_script} == '.' ) then
45  echo "Failed to guess ROOT version. Cannot set the environment."
46  exit 3
47endif
48set root_sys_dir=/lal/root/${root_version}
49if ( ! -d ${root_sys_dir} ) then
50  echo "ROOT version ${root_version} not found"
51  exit 4
52endif
53set root_bin_dir=${root_sys_dir}/bin/${root_arch}
54if ( ! -d ${root_bin_dir} ) then
55  echo "Architecture ${root_arch} not available for ROOT version ${root_version}"
56  exit 5
57endif
58setenv ROOTSYS ${root_sys_dir}
59
60# ROOT binaries are located in an root_arch-specific directory under bin
61setenv PATH ${root_bin_dir}:${PATH}
62
63setenv LD_LIBRARY_PATH ${ROOTSYS}/${libdir}:${LD_LIBRARY_PATH}
64
65# test of this is for a global recompilation/installation
66if ( $#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
79endif
80
81echo setting up Pythia8 with HepMC
82source `pwd`/Pythia8/pythia8170/examples/config.csh
83
84echo setting up PythiaDelphes
85setenv PYTHIA8LOCATION `pwd`/Pythia8/pythia8170
86setenv PYTHIA8DATA `pwd`/Pythia8/pythia8170/xmldoc
Note: See TracBrowser for help on using the repository browser.