Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JSummaryWriter.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7# ------------------------------------------------------------------------------------------
8#
9# Example script to run JTriggerEfficiency.
10#
11# ------------------------------------------------------------------------------------------
12
13if [ -z $JPP_DIR ]; then
14 echo "Variable JPP_DIR undefined."
15 exit
16fi
17
18source $JPP_DIR/setenv.sh $JPP_DIR
19
20set_variable DEBUG 2
21set_variable WORKDIR $JPP_DATA
22set_variable OUTPUT_FILE $WORKDIR/summary.root
23set_variable DETECTOR $WORKDIR/km3net_reference.detx
24set_variable TRIGGER $WORKDIR/trigger_parameters_arca.txt
25set_variable BACKGROUND_HZ 5e3 500 50 5 0.5
26set_variable NUMBER_OF_EVENTS 1000
27
28if do_usage $*; then
29 usage "$script [detector file [output file [trigger file]]]"
30fi
31
32case $# in
33 3)
34 TRIGGER=$3
35 ;&
36 2)
37 OUTPUT_FILE=$2
38 ;&
39 1)
40 DETECTOR=$1
41 ;;
42 0)
43 ;;
44esac
45
46print_variable DETECTOR TRIGGER OUTPUT_FILE BACKGROUND_HZ
47check_input_file $DETECTOR $TRIGGER
48check_output_file $OUTPUT_FILE
49
50timer_start
51
52JSummaryWriter \
53 -a ${DETECTOR} \
54 -o ${OUTPUT_FILE} \
55 -@ ${TRIGGER} \
56 -d ${DEBUG} \
57 -B "$BACKGROUND_HZ" \
58 -n ${NUMBER_OF_EVENTS} \
59 --!
60
61timer_stop
62timer_print
63
64
65JPrintMeta \
66 -f ${OUTPUT_FILE}
67
68JPrintTree \
69 -f ${OUTPUT_FILE}