Jpp
JMakeHDF.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 make PDFs from Monte Carlo events.
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 0
25 set_variable WORKDIR $JPP_DATA/
26 set_variable INPUT_FILE $JPP_DATA/sirene*.root
27 set_variable OUTPUT_FILE $WORKDIR/hpdf.dat
28 set_variable DETECTOR $JPP_DATA/km3net_reference.detx
29 
30 
31 if ( do_usage $* ); then
32  usage "$script [detector file [input file [output file]]]"
33 fi
34 
35 case $# in
36  3) set_variable OUTPUT_FILE $3;&
37  2) set_variable INPUT_FILE $2;&
38  1) set_variable DETECTOR $1;;
39 esac
40 
41 
42 if (( 1 )); then
43 
44  print_variable DETECTOR INPUT_FILE OUTPUT_FILE
45 
46  timer_start
47 
48  JHistHDF \
49  -a $DETECTOR \
50  -f $INPUT_FILE \
51  -o $OUTPUT_FILE \
52  -d $DEBUG \
53  --!
54 
55  timer_stop
56  timer_print
57 
58 fi
59 
60 if (( 1 )); then
61 
62  set_variable INPUT_FILE $OUTPUT_FILE
63  set_variable OUTPUT_FILE $WORKDIR/tmp/J%p.dat
64 
65  timer_start
66 
67  JMakeHDF \
68  -f $INPUT_FILE \
69  -o $OUTPUT_FILE \
70  -d $DEBUG \
71  --!
72 
73  timer_stop
74  timer_print
75 
76 fi