Jpp  debug
the software that should make you happy
JPMTRouter.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Utility script to determine speed of JDETECTOR::JPMTRouter.
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 
15 if [ -z $JPP_DIR ]; then
16  echo "Variable JPP_DIR undefined."
17  exit
18 fi
19 
20 
21 source $JPP_DIR/setenv.sh $JPP_DIR
22 
23 
24 set_variable DEBUG 2
25 set_variable WORKDIR ${TMPDIR:-/tmp}/
26 set_variable INPUT_FILE $JPP_DATA/sirene.root
27 set_variable OUTPUT_FILE $WORKDIR/histogram.root
28 set_variable DETECTOR $JPP_DATA/km3net_reference.detx
29 set_variable HISTOGRAM 1
30 
31 
32 if do_usage $*; then
33  usage "$script [detector file [input file [output file]]]"
34 fi
35 
36 case $# in
37  3) set_variable OUTPUT_FILE $3;&
38  2) set_variable INPUT_FILE $2;&
39  1) set_variable DETECTOR $1;;
40 esac
41 
42 
43 if (( 1 )); then
44 
45  print_variable DETECTOR INPUT_FILE OUTPUT_FILE
46 
47  $JPP_DIR/examples/JDetector/JPMTRouter \
48  -a $DETECTOR \
49  -f $INPUT_FILE \
50  -o $OUTPUT_FILE \
51  -d $DEBUG
52 
53 fi
54 
55 
56 if (( 1 )); then
57 
58  JPlot2D \
59  -f ${OUTPUT_FILE}:h1 \
60  -> "string" \
61  -< "floor" \
62  -OCOLZ \
63  -w 800x400 \
64  -N
65 
66  JPlot2D \
67  -f ${OUTPUT_FILE}:h2 \
68  -> "string" \
69  -< "floor" \
70  -OCOLZ \
71  -w 800x400 \
72  -N
73 
74 fi
75