Jpp
JUTCProfile.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 UTC profiling.
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 define_variable INPUT_FILE
26 set_variable OUTPUT_FILE utc.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 esac
36 
37 if (( 1 )); then
38 
39  check_input_file $INPUT_FILE
40 
41  $JPP_DIR/examples/JDAQ/JUTCProfile \
42  -f $INPUT_FILE \
43  -o $OUTPUT_FILE \
44  -d $DEBUG
45 
46 fi
47 
48 if (( 1 )); then
49 
50  JPlot1D \
51  -f ${OUTPUT_FILE}:UTC \
52  -T "UTC" \
53  -> "100 ms" \
54  -\^ "time [ns]" \
55  -w 500x500 \
56  -o UTC.gif \
57  -L TR
58 
59 fi
60 
61 if (( 1 )); then
62 
63  JPlot1D \
64  -f ${OUTPUT_FILE}:dt \
65  -T "UTC" \
66  -> "#Deltat [ns]" \
67  -\^ "number of events [a.u.]" \
68  -w 500x500 \
69  -o utc.gif \
70  -L TR
71 
72 fi