Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
darkroomCalibration.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3#
4# \author acreusot
5#
6version=1.0
7script=${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
17if [ -z $JPP_DIR ]; then
18 echo "Variable JPP_DIR undefined."
19 exit
20fi
21
22source $JPP_DIR/setenv.sh $JPP_DIR
23
24set_variable DEBUG 1
25
26if do_usage $*; then
27 usage "$script <working directory> <detector file> <inter data directory> <refPMT>"
28fi
29
30case $# 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!";;
36esac
37
38set_variable BASENAME ${DETX%.detx}
39
40if (( 1 )); then
41 cp ${WORKDIR}/${DETX} ${WORKDIR}/${BASENAME}_darkroomCalibration_pmt${PMT}.detx
42fi
43
44FILELISTINTER1=()
45for FILEPATH in $(ls ${WORKDIR}/${INTERDIR}/); do
46 FILELISTINTER1+=("${WORKDIR}/${INTERDIR}/${FILEPATH}")
47done
48set_variable FILELISTINTER2 ${FILELISTINTER1}
49
50if (( 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
58fi
59