Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hydrophone-t0:run.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 zmodload zsh/mathfunc
12 
14 set_variable WORKDIR ${ACOUSTICS_WORKDIR:-./}
15 
16 if ( do_usage $* ); then
17  usage "$script <detector file> (input file)+ (toashort file)+"\
18  "\nNote that the input files and toashort files should be one-to-one related."
19 fi
20 
21 if (( ${#} < 3 || ${#}%2 != 1 )); then
22  fatal "Wrong number of arguments."
23 fi
24 
25 let N="(${#} - 1) / 2"
26 
28 set_array INPUT_FILES $argv[2,2+$N]
29 set_array TOASHORT_FILES $argv[-$N,-1]
30 
31 eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
32 eval `JPrintDetector -a $DETECTOR -O SUMMARY`
33 
34 source JAcoustics.sh $DETECTOR_ID
35 
36 CHECK_EXIT_CODE
37 
38 getModule -a $DETECTOR -L "$STRINGS[1] 0" >& /dev/null
39 
40 if (( $? != 0 )); then
41 
42  JCookie.sh
43 
44  JDetectorDB \
45  -a $DETECTOR \
46  -o $DETECTOR \
47  -W --!
48 fi
49 
50 $JPP_DIR/examples/JAcoustics/JHydrophone \
51  -a $DETECTOR \
52  -f "$INPUT_FILES[*]" \
53  -i "$TOASHORT_FILES[*]" \
54  -o $WORKDIR/hydrophone.root \
55  -H $WORKDIR/hydrophone.txt \
56  -T $WORKDIR/tripod.txt \
57  -V $WORKDIR/sound_velocity.txt \
58  -W $WORKDIR/waveform.txt \
59  -d $DEBUG --!
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
static const double H
Planck constant [eV s].
exit
Definition: JPizza.sh:36
do set_array DAQHEADER JPrintDAQHeader f
Definition: JTuneHV.sh:79
then echo
do set_variable OUTPUT_DIRECTORY $WORKDIR T
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
* usage
then fatal Not enough arguments fi set_variable DETECTOR $argv[1] INPUT_FILES
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable ACOUSTICS_DEBUG
Definition: JAcoustics.sh:17
*set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2,-2] set_variable OUTPUT_FILE $argv[-1]
Definition: JDomino.sh:39
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:45
then JCalibrateToT a
Definition: JTuneHV.sh:108
then display $WORKDIR
Definition: plot-Domino.sh:127
set_variable DETECTOR
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
script
Definition: JAcoustics.sh:2
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
Definition: JLegolas.sh:28
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62