Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
JDomino.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 run JDomino.
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 ./
26 set_variable INPUT_FILE $WORKDIR/sirene.root
27 set_variable OUTPUT_FILE $WORKDIR/domino.root
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  "\nNote that if more than one input file is specified, all other arguments must be provided."
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  0) ;;
41  *) set_variable DETECTOR $argv[1]
42  set_variable INPUT_FILE $argv[2,-2]
43  set_variable OUTPUT_FILE $argv[-1];;
44 esac
45 
46 JDomino \
47  -a ${DETECTOR} \
48  -f ${INPUT_FILE} \
49  -o ${OUTPUT_FILE} \
50  -d ${DEBUG} --!
51 
52 JPrintDomino \
53  -f ${OUTPUT_FILE}