Jpp  master_rocky-43-ge265d140c
the software that should make you happy
JSlewing.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 plot time slewing from JDETECTOR::JPMTSignalProcessorInterface.
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 OUTPUT_FILE $WORKDIR/slewing.root
27 set_variable: FORMAT GRAPHICS_FORMAT gif
28 set_variable+ BATCH GRAPHICS_BATCH -B
29 
30 
31 if do_usage $*; then
32  usage "$script [output file]"
33 fi
34 
35 case $# in
36  1) set_variable OUTPUT_FILE $1;;
37 esac
38 
39 
40 if (( 1 )); then
41 
42  $JPP_DIR/examples/JDetector/JSlewing \
43  -P slewing=1 \
44  -o $OUTPUT_FILE \
45  -d $DEBUG
46 
47 fi
48 
49 
50 if (( 1 )); then
51 
52  JPlot1D \
53  -f ${OUTPUT_FILE}:\.\* \
54  -y "-10.0 +10.0" \
55  -> "time over threshold [ns]" \
56  -\^ "rise time [ns]" \
57  -O "][" \
58  -L "TR" \
59  -T "" -o slewing.$FORMAT $BATCH
60 
61 fi
62