Jpp  19.1.0
the software that should make you happy
JMechanics.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author mdejong
5 #
6 version=1.0
7 script=${0##*/}
8 
9 if [ -z $JPP_DIR ]; then
10  echo "Variable JPP_DIR undefined."
11  exit
12 fi
13 
14 source $JPP_DIR/setenv.sh $JPP_DIR
15 
16 set_variable DEBUG 2
17 set_variable DIR $JPP_DIR/examples/JAcoustics
18 set_variable WORKDIR ${TMPDIR:-/tmp}
19 set_variable: FORMAT GRAPHICS_FORMAT gif
20 set_variable+ BATCH GRAPHICS_BATCH -B
21 
22 if do_usage $*; then
23  usage "$script <input file>"\
24  "\nFor possible input files, see: https://git.km3net.de/calibration/input_tables/-/tree/master/data"
25 fi
26 
27 if (( $# != 1 )); then
28  fatal "Wrong number of arguments."
29 fi
30 
31 set_variable INPUT_FILE $argv[1]
32 
33 $DIR/JMechanics \
34  -f $INPUT_FILE \
35  -o $WORKDIR/mechanics.root \
36  -d $DEBUG
37 
38 JPlot1D \
39  -f $WORKDIR/mechanics.root:\.\* \
40  -> "z [m]" \
41  -\^ "c [s^{2}/m]" \
42  -T "" \
43  -o $WORKDIR/mechanics.$FORMAT $BATCH