Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JTTS.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5# utility script to make TTS generator.
6version=1.0
7script=${0##*/}
8
9# ------------------------------------------------------------------------------------------
10#
11# Utility script to produce TTS generator.
12#
13# ------------------------------------------------------------------------------------------
14
15
16if [ -z $JPP_DIR ]; then
17 echo "Variable JPP_DIR undefined."
18 exit
19fi
20
21
22source $JPP_DIR/setenv.sh $JPP_DIR
23
24
25set_variable DEBUG 3
26set_variable WORKDIR ./
27set_variable DIR $JPP_DIR/examples/JDetector/
28set_variable INPUT_FILE $DIR/R12199_delayed_pulses_hist.txt
29set_variable OUTPUT_FILE histogram.root
30set_variable: FORMAT GRAPHICS_FORMAT gif
31set_variable+ BATCH GRAPHICS_BATCH -B
32
33if do_usage $*; then
34 usage "$script [input file [output file]]"
35fi
36
37case $# in
38 2) set_variable OUTPUT_FILE $2;&
39 1) set_variable INPUT_FILE $1;;
40esac
41
42# convert control characters to newline
43
44set_variable TEMPORARY_FILE ${TMPDIR:-/tmp}/__${INPUT_FILE##*/}__
45
46cat $INPUT_FILE | tr '\r' '\n' > $TEMPORARY_FILE
47
48$DIR/JTTS \
49 -f $TEMPORARY_FILE \
50 -o $OUTPUT_FILE \
51 -P pdf.txt \
52 -C cdf.txt \
53 -d $DEBUG
54
55
56rm -f $TEMPORARY_FILE
57
58
59JPlot1D \
60 -f ${OUTPUT_FILE}:pmt \
61 -f ${OUTPUT_FILE}:g1 \
62 -> "#Deltat [ns]" \
63 -y "1e-5 1e-0" -Y \
64 -T "PMT" \
65 -o tts.$FORMAT $BATCH