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)+"\
16 "\nNote that the input files and toashort files should be one-to-one related."
19 if (( ${#} < 4 || ${#}%2 != 0 ));
then
20 fatal
"Wrong number of arguments."
23 let
N=
"(${#} - 2) / 2"
28 set_array TOASHORT_FILES $argv[-$N,-1]
30 eval `JPrintDetector -
a $DETECTOR -O IDENTIFIER`
31 eval `JPrintDetector -
a $DETECTOR -O SUMMARY`
33 source JAcoustics.sh $DETECTOR_ID
39 if (( $? != 0 ));
then
49 if [[ -z
"${STRINGS[(r)$STRING]}" ]];
then
50 fatal
"Invalid string $STRING; "\
51 "possible values: ${STRINGS[*]}"
60 for (( PHI = -$PI; $PHI <= +$PI; PHI += 0.05 ));
do
62 cp hydrophone.txt $TMPDIR/.
64 JEditHydrophone -
f $TMPDIR/hydrophone.txt -
S "$STRING rot $PHI"
66 $JPP_DIR/examples/JAcoustics/JHydrophone \
68 -
f "$INPUT_FILES[*]" \
69 -i
"$TOASHORT_FILES[*]" \
70 -
o $TMPDIR/hydrophone.root \
71 -
H $TMPDIR/hydrophone.txt \
78 -
f "$TMPDIR/hydrophone.root:\[${MODULE}\..*\]" \
79 -
o $TMPDIR/opera.root \
82 set_array RESULT `JPrintResult -
f "$TMPDIR/opera.root:Add" -
F "GetRMS * 1.0e3"`
84 if (( ${#RESULT} == 1 ));
then
85 printf
"%7.3f %12.8f\n" $PHI $RESULT[*] >> $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
static const double H
Planck constant [eV s].
do set_array DAQHEADER JPrintDAQHeader f
do set_variable OUTPUT_DIRECTORY $WORKDIR T
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 JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
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.