Jpp
JDAQSummaryslice.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 # Example script for JDAQSummaryslice.
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 WORKDIR /tmp/
25 define_variable INPUT_FILE
26 set_variable OUTPUT_FILE histogram.root
27 
28 if ( do_usage $* ); then
29  usage "$script <input file> [output file]"
30 fi
31 
32 case $# in
33  2) set_variable OUTPUT_FILE $2;&
34  1) set_variable INPUT_FILE $1;;
35  *) fatal "Wrong number of arguments."
36 esac
37 
38 if (( 1 )); then
39 
40  print_variable INPUT_FILE OUTPUT_FILE
41  check_input_file $INPUT_FILE
42 
43  timer_start
44 
45  $JPP_DIR/examples/JDAQ/JDAQSummaryslice \
46  -f $INPUT_FILE \
47  -o $OUTPUT_FILE \
48  -d2
49 
50  timer_stop
51  timer_print
52 
53 fi
54 
55 if (( 1 )); then
56 
57  JPlot1D \
58  -f ${OUTPUT_FILE}:h0 \
59  -x "0 25" \
60  -> "Rate [kHz]" \
61  -\^ "number of events / kHz [a.u.]"
62 
63  JPlot1D \
64  -f ${OUTPUT_FILE}:h1 \
65  -> "high-rate veto PMT" \
66  -\^ "number of events [a.u.]"
67 
68 fi