All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
install_sbncode-v07_11_00.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 ###############################################################################
4 # Set up the environment and install sbncode on a GPVM
5 #
6 # A. Mastbaum <mastbaum@uchicago.edu>, 2018/06/12
7 ###############################################################################
8 
9 LAR_VERSION="v07_11_00"
10 LAR_QUAL="e17:prof"
11 
12 # Set up the environment
13 TOPDIR=${PWD}
14 cat << EOF > ${TOPDIR}/setup_sbncode-${LAR_VERSION}.sh
15 source /cvmfs/uboone.opensciencegrid.org/products/setup_uboone.sh
16 setup uboonecode ${LAR_VERSION} -q ${LAR_QUAL}
17 source /cvmfs/sbnd.opensciencegrid.org/products/sbnd/setup_sbnd.sh
18 setup sbndcode ${LAR_VERSION} -q ${LAR_QUAL}
19 unsetup larbatch
20 source /cvmfs/icarus.opensciencegrid.org/products/icarus/setup_icarus.sh
21 setup icaruscode ${LAR_VERSION} -q ${LAR_QUAL}
22 EOF
23 
24 source setup_sbncode-${LAR_VERSION}.sh
25 
26 # Create working area
27 WDIR="${PWD}/sbncode-${LAR_VERSION}"
28 mkdir $WDIR
29 
30 if [ $? -ne 0 ]; then
31  echo "Unable to create directory ${WDIR}"
32  exit
33 fi
34 
35 cd ${WDIR}
36 mrb newDev -v ${LAR_VERSION} -q ${LAR_QUAL}
37 LAR_QUAL_STR=${LAR_QUAL//:/_}
38 MRB_SETUP=${WDIR}/localProducts_larsoft_${LAR_VERSION}_${LAR_QUAL_STR}/setup
39 source ${MRB_SETUP}
40 
41 # Get sbncode
42 cd srcs
43 mrb gitCheckout -t ${LAR_VERSION} sbncode
44 
45 # Build sbncode
46 mrbsetenv
47 mrb i -j4
48 
49 cat << EOF >> ${TOPDIR}/setup_sbncode-${LAR_VERSION}.sh
50 source ${MRB_SETUP}
51 mrbslp
52 mrbsetenv
53 EOF
54 
55 # Build sbnanalysis
56 cd ${WDIR}/srcs/sbncode/sbnanalysis
57 mkdir build
58 cd build
59 cmake .. -DCMAKE_BUILD_TYPE=Debug
60 make install -j4
61 source bin/setup_sbnanalysis.sh
62 
63 echo "source ${PWD}/bin/setup_sbnanalysis.sh" >> ${TOPDIR}/setup_sbncode-${LAR_VERSION}.sh
64 
65 echo -e "Setup finished. To use this environment, run\n\n source setup_sbncode-${LAR_VERSION}.sh"
66 
then source grid fermiapp products dune setup_dune_fermiapp sh exit else echo No setup file found exit fi setup
process_name uboone
do source
constexpr details::BinObj< T > bin(T value)
Returns a wrapper to print the specified data in binary format.
then shift fi
do cd
do i e
stream1 can override from command line with o or output services user sbnd