Jpp  debug
the software that should make you happy
JConvertDB.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 set_variable DEBUG 1
12 set_variable WORKDIR ${TMPDIR:-/tmp}/
13 set_variable DIR $JPP_DIR/examples/JDB/
14 set_variable QUERY runsummarynumbers
15 
16 if do_usage $*; then
17  usage "$script <detector identifier> <first run> <last run> [working directory]"
18 fi
19 
20 case $# in
21  4) set_variable WORKDIR $4;&
22  3) set_variable DETECTOR $1;
23  set_array RUNS $2 $3;;
24  *) fatal "Wrong number of arguments."
25 esac
26 
27 JCookie.sh
28 
29 set_variable DETID `getDetector -D $DETECTOR`
30 set_variable OUTPUT_FILE $WORKDIR/convert.root
31 set_variable SOURCE_NAME 12.0.0-PDF-1-72-gb89b379
32 
33 JConvertDB \
34  -o $OUTPUT_FILE \
35  -q $QUERY \
36  -@ "DETID = $DETID" \
37  -@ "MINRUN = ${RUNS[1]}" \
38  -@ "MAXRUN = ${RUNS[2]}" \
39  -@ "SOURCE_NAME = $SOURCE_NAME" \
40  -d $DEBUG --!
41