7 # ------------------------------------------------------------------------------------------
9 # Utility script to run JDataWriter and JEventGenerator.
11 # ------------------------------------------------------------------------------------------
14 if [ -z $JPP_DIR ];
then
15 echo "Variable JPP_DIR undefined."
19 source $JPP_DIR/setenv.sh $JPP_DIR
27 if ( do_usage $* );
then
28 usage "$script [detector file [logger file [working directory]]]"
49 if [[ ! -
f $DETECTOR ]];
then
50 JDetector.sh $DETECTOR
59 echo "Generating random background."
60 echo "Singles rate: $singlesRate [Hz]."
61 echo "Doubles rate: $doublesRate [Hz]."
68 nohup JRandomTimesliceWriter \
71 -B
"$singlesRate $doublesRate" \
73 -d1 > timeslice.log 2>&1 &
75 echo Processing random data.
80 -@trigger3DShower.enabled=1 \
81 -@trigger3DMuon.enabled=1 \
83 -d1 > trigger.log 2>&1
95 while (( $RUN <= $RUN_2 ));
do
99 if [[ -
f $OUTPUT_FILE ]];
then
107 # Event generation configure data.
112 datawriter = $DWRITER_HOST;
114 eventRate_Hz = 100.0;
121 if [[ ! -
f driver.txt ]];
then
125 # To avoid unnecessary shell processes, the process I/O is redirected to /dev/null and the ssh command is quoted.
127 process JEventGenerator $HOST ssh \$HOST\$
"$JPP_BIN/JEventGenerator -u \$NAME\$ -H \$SERVER\$ -M \$LOGGER\$ -d $DEBUG </dev/null >&/dev/null &";
128 process JDataWriter $HOST ssh \$HOST\$
"$JPP_BIN/JDataWriter -u \$NAME\$ -H \$SERVER\$ -M \$LOGGER\$ -d $DEBUG </dev/null >&/dev/null &";
137 while (( $RUN <= $RUN_2 ));
do
168 JLigier.sh $MESSAGE_SERVER
continue
175 JLogger.sh $MESSAGE_LOGGER $LOGGER_OUTPUT
195 JStopDAQ.sh $MESSAGE_SERVER $MESSAGE_LOGGER
do set_variable INPUT_FILE $WORKDIR KM3NeT_
then JLigiers sh continue fi cat driver txt<< EOFprocess dfilter $HOST1 ssh\$HOST\$"JDataFilter -H \$SERVER\$ -M \$LOGGER\$ -d $DEBUG &";enterevent ev_init{RC_CMD%< ev_init.txt > from me< ev_init.txt > event ev_configure
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
&set_variable LOGGER_OUTPUT
static const double H
Planck constant [eV s].
do set_array DAQHEADER JPrintDAQHeader f
do cat driver txt<< EOFevent ev_configure{RC_EVT%< ev_configure.txt > RC_DWRT path
then cat ev_configure txt<< EOFdatawriter=$DWRITER_HOST;inputFile=$INPUT_FILE;eventRate_Hz=100.0;EOFfiif[[!-f driver.txt]];thencat > driver txt<< EOFprocess JEventGenerator $HOST ssh\$HOST\$"$JPP_BIN/JEventGenerator -u \$NAME\$ -H \$SERVER\$ -M \$LOGGER\$ -d $DEBUG </dev/null >& dev null& process JDataWriter $HOST ssh $HOST $JPP_BIN JDataWriter u $NAME H $SERVER M $LOGGER d $DEBUG</dev/null >& dev null& enter event ev_init
then rm i $OUTPUT_FILE fi let RUN
&set_variable OUTPUT_FILE
then JFileTuna f $INPUT_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
alias put_queue eval echo n
static const JNET::JTag RC_CMD
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 source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
#define DEBUG(A)
Message macros.