Jpp  debug
the software that should make you happy
JPMTStatus.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author acreusot
5 #
6 version=1.0
7 script=${0##*/}
8 
9 # ------------------------------------------------------------------------------------------
10 #
11 # Utility script to set PMT status in detector file.
12 #
13 # ------------------------------------------------------------------------------------------
14 
15 if [ -z $JPP_DIR ]; then
16  echo "Variable JPP_DIR undefined."
17  exit
18 fi
19 
20 source $JPP_DIR/setenv.sh $JPP_DIR
21 
22 set_variable: DEBUG CALIBRATION_DEBUG 2
23 set_variable: DAQ_TIMESLICE CALIBRATION_TIMESLICE JDAQTimesliceL1
24 set_variable WORKDIR ${TMPDIR:-/tmp}/
25 
26 if do_usage $*; then
27  usage "$script <detector file> <input file>"
28 fi
29 
30 case $# in
31  2) set_variable INPUT_FILE $2;
32  set_variable DETECTOR $1;;
33  *) fatal "Wrong number of arguments.";;
34 esac
35 
36 set_variable OUTPUT_FILE $WORKDIR/monitor.root
37 
38 if (( 1 )); then
39 
40  JCalibrateToT \
41  -a ${DETECTOR} \
42  -f ${INPUT_FILE} \
43  -o ${OUTPUT_FILE} \
44  -C ${DAQ_TIMESLICE} \
45  -d $DEBUG --!
46 fi
47 
48 if (( 1 )); then
49 
50  JPMTStatus \
51  -a ${DETECTOR} \
52  -f ${OUTPUT_FILE} \
53  -t 0.5 \
54  -A \
55  -d $DEBUG --!
56 fi