Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JRunAnalyzer.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2
3version=1.0
4script=${0##*/}
5
6source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
7
8if do_usage $*; then
9 usage "$script <input_file> <detector_file> <output_file(.root)> [all_plots[number_of_timeslices [number_of_summaryslices [number_of_events]]]]"
10fi
11
12set_variable NUMBER_OF_TIMESLICES 9223372036854775807
13set_variable NUMBER_OF_SUMMARYSLICES 9223372036854775807
14set_variable NUMBER_OF_EVENTS 9223372036854775807
15set_variable ALL_PLOTS 0
16
17case $# in
18 7) set_variable NUMBER_OF_EVENTS $7;&
19 6) set_variable NUMBER_OF_SUMMARYSLICES $6;&
20 5) set_variable NUMBER_OF_TIMESLICES $5;&
21 4) set_variable ALL_PLOTS $4;&
22 3) set_variable OUT_FILE $3
23 set_variable DETECTOR_FILE $2
24 set_variable DAQ_FILE $1;;
25 *) fatal "Wrong number of arguments"
26esac
27
28set_variable OUT_PATH `readlink -f $(dirname ${OUT_FILE})`
29set_variable JRA_DIR ${JPP_DIR}/software/JRunAnalyzer
30
31if [ ! -d ${OUT_PATH} ]
32then
33 mkdir -p ${OUT_PATH}
34fi
35
36time ${JRA_DIR}/JRunAnalyzer \
37 -f $DAQ_FILE \
38 -a $DETECTOR_FILE \
39 -o $OUT_FILE \
40 -t $NUMBER_OF_TIMESLICES \
41 -s $NUMBER_OF_SUMMARYSLICES \
42 -n $NUMBER_OF_EVENTS \
43 -@ "p0 = $ALL_PLOTS;" \
44 --!
45
46CHECK_EXIT_CODE