setup.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 setup(){
4 
5  # the default mode is NuMI
6  export MODE="NUMI"
7 
8  # set package to be used
9  . "/nusoft/app/externals/setup"
10  #ROOT:
11  setup -q debug:e2 -f Linux64bit+2.6-2.5 root v5_34_05
12  #BOOST:
13  setup -q debug:e5 -f Linux64bit+2.6-2.5 boost v1_55_0
14  export BOOSTROOT=${BOOST_DIR}/source/boost_1_55_0
15  #DK2NU:
16  setup -q debug:e5 -f Linux64bit+2.6-2.5 dk2nu v01_01_03
17  export DK2NU_INC=${DK2NU}/include/dk2nu/tree
18  export DK2NU_LIB=${DK2NU}/lib
19 
20  # setup for jobsub client
21  # according to the prescription in Mike Kirby's talk
22  # minerva doc-10551, Dec 2014 (same doc can be found for other experiments)
23  source /grid/fermiapp/products/common/etc/setups.sh
24  setup jobsub_client
25  setup ifdhc
26  #This is for MINERvA. Change accordingly.
27  export IFDH_BASE_URI="http://samweb-minerva.fnal.gov:20004/sam/minerva/api"
28 
29  # bash magic pulled off of stack exchange
30  # gets the full path to the location of setup.sh
31  export PPFX_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
32  echo "setting PPFX_DIR=${PPFX_DIR}"
33 
34  export LD_LIBRARY_PATH=$PPFX_DIR/lib:$LD_LIBRARY_PATH
35  echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
36 }
37 HOST=$(hostname -f)
38 echo $HOST
39 if echo "$HOST" | grep 'dune';then
40  echo "This is not a dune machine. Try setup_for_dune.sh <MODE>"
41 else
42  echo "executing for the $HOST"
43  setup
44 fi
45