Jpp  19.1.0
the software that should make you happy
darkroomCalibration.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 test darkroom time calibration.
12 #
13 # ------------------------------------------------------------------------------------------
14 # all data related to interdom time calibration have to be set in the same directory
15 
16 
17 if [ -z $JPP_DIR ]; then
18  echo "Variable JPP_DIR undefined."
19  exit
20 fi
21 
22 source $JPP_DIR/setenv.sh $JPP_DIR
23 
24 set_variable DEBUG 1
25 
26 if do_usage $*; then
27  usage "$script <working directory> <detector file> <inter data directory> <refPMT>"
28 fi
29 
30 case $# in
31  4) set_variable PMT $4;
32  set_variable INTERDIR $3;
33  set_variable DETX $2;
34  set_variable WORKDIR $1;;
35  *) fatal "wrong number of arguments!";;
36 esac
37 
38 set_variable BASENAME ${DETX%.detx}
39 
40 if (( 1 )); then
41  cp ${WORKDIR}/${DETX} ${WORKDIR}/${BASENAME}_darkroomCalibration_pmt${PMT}.detx
42 fi
43 
44 FILELISTINTER1=()
45 for FILEPATH in $(ls ${WORKDIR}/${INTERDIR}/); do
46  FILELISTINTER1+=("${WORKDIR}/${INTERDIR}/${FILEPATH}")
47 done
48 set_variable FILELISTINTER2 ${FILELISTINTER1}
49 
50 if (( 1 )); then
51  JPulsar \
52  -d $DEBUG \
53  -f ${FILELISTINTER2} \
54  -a ${WORKDIR}/${BASENAME}_darkroomCalibration_pmt${PMT}.detx \
55  -! "-1 ${PMT}" \
56  -C JDAQTimesliceL0 \
57  -A
58 fi
59