Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JAcoustics
JHydrophone.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
13
set_variable
DEBUG
${
ACOUSTICS_DEBUG
:-2}
14
set_variable
WORKDIR
${ACOUSTICS_WORKDIR:-./}
15
16
if
( do_usage $* );
then
17
usage
"$script <detector file> <input file> <toashort file>"
18
fi
19
20
if
(( ${#} < 3 || ${#}%2 != 1 ));
then
21
fatal
"Wrong number of arguments."
22
fi
23
24
let
N
=
"(${#} - 1) / 2"
25
26
set_variable
DETECTOR
$argv
[1]
27
set_array
INPUT_FILES
$argv
[2,1+$N]
28
set_array TOASHORT_FILES $argv[-$N,-1]
29
30
eval `JPrintDetector -
a
$DETECTOR -O IDENTIFIER`
31
eval `JPrintDetector -
a
$DETECTOR -O SUMMARY`
32
33
source JAcoustics.sh $DETECTOR_ID
34
35
getModule
-
a
$DETECTOR -L
"$STRINGS[1] 0"
>& /dev/
null
36
37
if
(( $? != 0 ));
then
38
39
JCookie.sh
40
41
JDetectorDB \
42
-
a
$DETECTOR \
43
-
o
$DETECTOR \
44
-W --!
45
fi
46
47
if
[[ ! -
f
$WORKDIR
/hydrophone.root ]];
then
48
49
eval $JPP_DIR/examples/JAcoustics/JHydrophone \
50
-
a
$DETECTOR \
51
-
f
\
"$INPUT_FILES[*]\" \
52
-i \"$TOASHORT_FILES[*]\" \
53
-o $WORKDIR/hydrophone.root \
54
-H $WORKDIR/hydrophone.txt \
55
-T `print_tripods` \
56
-V `print_velocity` \
57
-d $DEBUG --!
58
fi
59
60
typeset -Z 4 STRING
61
62
for STRING in $STRINGS[*]; do
63
64
set_variable MODULE `getModule -a $DETECTOR -L "
$STRING
0
"`
65
66
JPlot1D \
67
-f "
$WORKDIR
/hydrophone.root:\[${MODULE}\..*\]
" \
68
-> "
#Deltat [s]
" \
69
-\^ "
number of events [
a
.u.]
" \
70
-N "
X 505
" \
71
-L TL \
72
-O HIST \
73
-T "
${
STRING
}
" \
74
-o $WORKDIR/hydrophone_${STRING}.gif
75
done
JSYSTEM::set_variable
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
Definition:
JSystemToolkit.hh:379
STRING
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
Definition:
examples/JTrigger/JTriggerEfficiencyRunByRun.sh:64
exit
exit
Definition:
JPizza.sh:36
f
do set_array DAQHEADER JPrintDAQHeader f
Definition:
JTuneHV.sh:79
echo
then echo
Definition:
JDOMDAQDriver.sh:56
$STRING
then fatal Invalid string $STRING
Definition:
detector-XY:run.sh:33
o
do $DIR JTransitTime o
Definition:
JTransitTime.sh:44
usage
* usage
Definition:
JLigier-local.sh:33
INPUT_FILES
then fatal Not enough arguments fi set_variable DETECTOR $argv[1] INPUT_FILES
Definition:
JCalibrateStrings.sh:21
ACOUSTICS_DEBUG
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
$argv
*set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2,-2] set_variable OUTPUT_FILE $argv[-1]
Definition:
JDomino.sh:39
then
then
Definition:
examples/JDataFilter/JDataFilter.sh:87
a
then $JPP_DIR software JCalibrate JCalibrateToT a
Definition:
JTuneHV.sh:108
$WORKDIR
then display $WORKDIR
Definition:
plot-Domino.sh:127
DETECTOR
set_variable DETECTOR
Definition:
JARCACalibrateMuon.sh:31
N
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition:
JMuonPostfit.sh:37
script
script
Definition:
JAcoustics.sh:2
WORKDIR
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
Definition:
JLegolas.sh:28
null
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
Definition:
examples/JLogger/JLogger.sh:33
getModule
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
Definition:
JBeaconSimulator.cc:928
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
Generated by
1.8.5