Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
examples/JAcoustics/JToA.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4if [ -z $JPP_DIR ]; then
5 echo "Variable JPP_DIR undefined."
6 exit
7fi
8
9source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10
11set_variable DEBUG 2
12set_variable DIR $JPP_DIR/examples/JAcoustics/
13set_variable WORKDIR ./
14
15if do_usage $*; then
16 usage "$script <detector> <run>"
17fi
18
19case $# in
20 2) set_variable RUN $argv[2];
21 set_variable DETECTOR $argv[1];;
22 *) fatal "Wrong number of arguments.";;
23esac
24
25JCookie.sh
26
27# create intemediate ROOT file for fast access
28
29if [[ ! -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 --!
37fi
38
39$DIR/JToA \
40 -f $WORKDIR/toa.root \
41 -d $DEBUG --!