Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
examples/JAcoustics/JToA.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 set_variable DEBUG 2
12 set_variable DIR $JPP_DIR/examples/JAcoustics/
13 set_variable WORKDIR ./
14 
15 if do_usage $*; then
16  usage "$script <detector> <run>"
17 fi
18 
19 case $# in
20  2) set_variable RUN $argv[2];
21  set_variable DETECTOR $argv[1];;
22  *) fatal "Wrong number of arguments.";;
23 esac
24 
25 JCookie.sh
26 
27 # create intemediate ROOT file for fast access
28 
29 if [[ ! -f $WORKDIR/toashort.root ]]; then
30 
31  JToA \
32  -@ "detid = `getDetector -D $DETECTOR`" \
33  -@ "minrun = $RUN" \
34  -@ "maxrun = $RUN" \
35  -o $WORKDIR/toa.root \
36  -d $DEBUG --!
37 fi
38 
39 $DIR/JToA \
40  -f $WORKDIR/toa.root \
41  -d $DEBUG --!