Jpp  17.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JTTS.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 # utility script to make TTS generator.
6 version=1.0
7 script=${0##*/}
8 
9 # ------------------------------------------------------------------------------------------
10 #
11 # Utility script to produce TTS generator.
12 #
13 # ------------------------------------------------------------------------------------------
14 
15 
16 if [ -z $JPP_DIR ]; then
17  echo "Variable JPP_DIR undefined."
18  exit
19 fi
20 
21 
22 source $JPP_DIR/setenv.sh $JPP_DIR
23 
24 
27 set_variable DIR $JPP_DIR/examples/JDetector/
28 set_variable INPUT_FILE $DIR/R12199_delayed_pulses_hist.txt
29 set_variable OUTPUT_FILE histogram.root
30 set_variable: FORMAT GRAPHICS_FORMAT gif
31 set_variable+ BATCH GRAPHICS_BATCH -B
32 
33 if do_usage $*; then
34  usage "$script [input file [output file]]"
35 fi
36 
37 case $# in
40 esac
41 
42 # convert control characters to newline
43 
44 set_variable TEMPORARY_FILE ${TMPDIR:-/tmp}/__${INPUT_FILE##*/}__
45 
46 cat $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 
56 rm -f $TEMPORARY_FILE
57 
58 
59 JPlot1D \
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
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR_ID set_array RUNS if do_usage *then usage $script< source directory >[user directory] nThe source directory corresponds to a pre calibrated D0ARCA009 detector fi case set_variable DIR
version
Definition: JEditTuneHV.sh:5
then JLigier sh continue fi cat
Definition: JDAQDriver.sh:51
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
usr share Modules init zsh export TMPDIR
exit
Definition: JPizza.sh:36
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then echo
static const double C
Physics constants.
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
do set_variable OUTPUT_DIRECTORY $WORKDIR T
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
&set_variable OUTPUT_FILE
set_variable INPUT_FILE
then for FUNCTION in pdf npe cdf
Definition: JPlotNPE-PDG.sh:73
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
then $DIR JPlotNPE PDG P
Definition: JPlotNPE-PDG.sh:62
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62
Double_t g1(const Double_t x)
Function.
Definition: JQuantiles.cc:25