Jpp  master_rocky
the software that should make you happy
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 set_variable OUTPUT_FILE utc.root
26 set_variable: FORMAT GRAPHICS_FORMAT gif
27 set_variable+ BATCH GRAPHICS_BATCH -B
28 
29 if do_usage $*; then
30  usage "$script <input file> [output file]"
31 fi
32 
33 case $# in
34  2) set_variable OUTPUT_FILE $2;&
35  1) set_variable INPUT_FILE $1;;
36 esac
37 
38 if (( 1 )); then
39 
40  check_input_file $INPUT_FILE
41 
42  $JPP_DIR/examples/JDAQ/JUTCProfile \
43  -f $INPUT_FILE \
44  -o $OUTPUT_FILE \
45  -d $DEBUG
46 
47 fi
48 
49 if (( 1 )); then
50 
51  JPlot1D \
52  -f ${OUTPUT_FILE}:UTC \
53  -T "UTC" \
54  -> "100 ms" \
55  -\^ "time [ns]" \
56  -w 500x500 \
57  -L TR \
58  -o UTC.$FORMAT $BATCH
59 
60 fi
61 
62 if (( 1 )); then
63 
64  JPlot1D \
65  -f ${OUTPUT_FILE}:dt \
66  -T "UTC" \
67  -> "#Deltat [ns]" \
68  -\^ "number of events [a.u.]" \
69  -w 500x500 \
70  -L TR \
71  -o utc.$FORMAT $BATCH
72 
73 fi