9# ------------------------------------------------------------------------------------------
 
   11#                         Utility script to run JPulsar.
 
   13# ------------------------------------------------------------------------------------------
 
   15if [ -z $JPP_DIR ]; then
 
   16    echo "Variable JPP_DIR undefined."
 
   21source $JPP_DIR/setenv.sh $JPP_DIR
 
   24    usage "$script <detector file> <input file> <output file>"
 
   28    set_variable DETECTOR    $1
 
   29    set_variable INPUT_FILE  $2
 
   30    set_variable OUTPUT_FILE $3
 
   32    fatal "Wrong number of arguments."
 
   36if [[ ! -f $DETECTOR ]]; then
 
   37    fatal "Missing detector file $DETECTOR"
 
   41if [[ ! -f $INPUT_FILE ]]; then
 
   42    fatal "Missing input file $INPUT_FILE"
 
   45echo "Detector to overwrite: $DETECTOR."
 
   46echo "Input:                 $INPUT_FILE."
 
   47echo "Output:                $OUTPUT_FILE"
 
   50# DOM IDs in DU-2, reference channels from elog http://elog.km3net.de/DU+Integration/35
 
   52cat>dom_channel_map_du2<<EOF
 
   76cat>dom_channel_map_du3<<EOF
 
  101cat>dom_channel_map_du4<<EOF
 
  123# DOM IDs in DU-4; top hemisphere
 
  125cat>dom_channel_map_du4_top<<EOF
 
  147        -! "`cat dom_channel_map_du4_top`" \
 
  156        -! "`cat dom_channel_map_du4_top`" \