4 if [ -z $JPP_DIR ];
then
5 echo "Variable JPP_DIR undefined."
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null
14 if ( do_usage $* );
then
15 usage "$script <string identifier> <detector file> <input file> <toashort file>"
18 if (( ${#} < 4 || ${#}%2 != 0 ));
then
19 fatal
"Wrong number of arguments."
22 let
N=
"(${#} - 2) / 2"
27 set_array TOASHORT_FILES $argv[-$N,-1]
29 eval `JPrintDetector -
a $DETECTOR -O IDENTIFIER`
30 eval `JPrintDetector -
a $DETECTOR -O SUMMARY`
32 source JAcoustics.sh $DETECTOR_ID
36 if (( $? != 0 ));
then
46 if [[ -z
"${STRINGS[(r)$STRING]}" ]];
then
47 fatal
"Invalid string $STRING; "\
48 "possible values: ${STRINGS[*]}"
57 for (( PHI = -$PI; $PHI <= +$PI; PHI += 0.05 ));
do
59 cp hydrophone.txt $TMPDIR/.
61 JEditHydrophone -
f $TMPDIR/hydrophone.txt -
S "$STRING rot $PHI"
63 eval $JPP_DIR/examples/JAcoustics/JHydrophone \
65 -
f \
"$INPUT_FILES[*]\" \
66 -i \"$TOASHORT_FILES[*]\" \
67 -o $TMPDIR/hydrophone.root \
68 -H $TMPDIR/hydrophone.txt \
74 -f "$TMPDIR/hydrophone.root:\[${MODULE}\..*\]
" \
75 -o $TMPDIR/opera.root \
78 set_variable RMS `JPrintResult -f "$TMPDIR/opera.root:Add
" -F "GetRMS * 1.0e3
"`
80 printf "%7.3f %12.8f\n
" $PHI $RMS >> $HYDROPHONE_TXT
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
do set_array DAQHEADER JPrintDAQHeader f
static const double PI
Mathematical constants.
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
*set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2,-2] set_variable OUTPUT_FILE $argv[-1]
do set_variable SIGMA_NS set_variable OUTLIERS set_variable OUTPUT_FILE matrix[${ALPHA_DEG}\deg\] root $JPP JMatrixNZ a $DETECTOR f $INPUT_FILE o $OUTPUT_FILE S
then $JPP_DIR software JCalibrate JCalibrateToT a
then usage $script[input file[working directory[option]]] nWhere option can be N
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
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.