7 # ------------------------------------------------------------------------------------------ 
    9 #                            Example script to run JDAQDriver. 
   11 # ------------------------------------------------------------------------------------------ 
   15 if [ -z $JPP_DIR ]; 
then 
   16     echo "Variable JPP_DIR undefined." 
   21 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null 
   42 # re-start ligier for command and logger messages 
   49 # example to read event associated data from a file 
   60 # To avoid unnecessary shell processes, the process I/O is redirected to /dev/null and the ssh command is quoted. 
   61 # Note that process with extension /- will deliberately crash during the configure transition 
   62 # and process with extension /+ will sleep forever during the exit transition. 
   64 process  
JDAQDemoClient/
A  $HOST1  (setenv ROOTSYS $ROOTSYS && source $JPP_DIR/setenv.csh $JPP_DIR && 
JDAQDemoClient  -
u %/
A       -
H \$SERVER\$  -M \$LOGGER\$ -
d $DEBUG  </dev/null >&/dev/
null) &;
 
   65 process  
JDAQDemoClient/B  
$HOST2  (setenv ROOTSYS $ROOTSYS && source $JPP_DIR/setenv.csh $JPP_DIR && JDAQClientStarter  -
H $HOST3:$PORT  -m 
"-H \$SERVER\$  -M \$LOGGER\$ -d $DEBUG");
 
   74 # Client with extension /- should have crashed by now. 
   75 # So, put failed clients to sleep with names containing given character sequence. 
   91 # The following process is assumed to run 'forever', i.e. 
   92 # it is started before the driver and continues thereafter. 
   93 # It is therefore killed by hand at the end of the show. 
   99 JDAQDriver -
H $SERVER -M $LOGGER -
d $DEBUG -t $TIMEOUT_S -
f ${
TMPDIR:-/tmp}/driver.txt -
c 
then usage $script[port]< option > nPossible restart fi case set_variable OPTION set_variable PORT
 
process JDAQDemoClient $HOST3(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&JDAQDemoClient-u\$NAME\$-H\$SERVER\$-M\$LOGGER\$-d $DEBUG</dev/null > &/dev/null)&
 
then JLigier sh continue fi cat
 
o $QUALITY_ROOT d $DEBUG!JPlot1D f
 
static const double H
Planck constant [eV s]. 
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable SERVER localhost define_variable LOGGER if do_usage *then usage $script[host[local file]] fi case set_variable LOGGER
 
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
 
process JDAQDemoClient $HOST4(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&JDAQDemoClient-u\$NAME\$-H\$SERVER\$-M\$LOGGER\$-d $DEBUG</dev/null > &/dev/null)&
 
event< ev_daq > ev_configure
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR if do_usage *then usage $script[(input file)+] fi set_variable DEBUG set_variable WORKDIR TMPDIR
 
then rm i $OUTPUT_FILE fi let RUN
 
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
 
do sleep done JPutMessage H $LOGGER t MSG m Hello world
 
static const JNET::JTag RC_CMD
 
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
 
process JDAQDemoClient B $HOST2(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&JDAQClientStarter-H $HOST3:$PORT-m"-H \$SERVER\$  -M \$LOGGER\$ -d $DEBUG")
 
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
 
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
 
#define DEBUG(A)
Message macros.