#!/bin/tcsh -f if ($# < 1) then echo "Usage: $0 xtc-file [ hbook-file ]" exit 1 endif set nEvents = 1000 set xtcFile = $1 set hbookFile = "" if ($# > 1) then if ($2 == "-n") then set nEvents = $3 if ($# > 3) then set hbookFile = $4 endif else set hbookFile = $2 endif endif echo "nEvents = $nEvents" echo "xtcFile = $xtcFile" echo "hbookFile = $hbookFile" set nCorbaConnections = `TaoNSDumper | grep $USER | wc | awk '{print $1}'` if( 0 != $nCorbaConnections ) then echo "$nCorbaConnections connection(s) to be cleaned before running the script!" echo "Commands: TaoNSDumper | grep $USER" echo " TaoNSUnbinder Dot " echo " ps -elf | grep DhpCorbaServer" echo " kill -9 " exit endif setenv RequestorCorbaName $USER setenv BFSEARCHPATH .:/nfs/bbr-srv02/bfdist/Production if ($?BFONLINE) then setenv BFSEARCHPATH ${BFSEARCHPATH}:${BFDIST}/online_releases/${BFONLINE} endif setenv BFSEARCHPATH ${BFSEARCHPATH}:${BFDIST}/releases/${BFCURRENT} source $BFROOT/bin/ambientboot.csh unsetenv CFG_DEFAULT_IMPL FmcFastMonPlaybackApp -n $nEvents -f $xtcFile FastMonStreams/FmcFastMonRemoteApp.tcl set dollar = '$' set DhpCorbaName = `TaoNSDumper | grep $USER | tail -1 | sed "s|^.*\(${USER}.*\):.*${dollar}|\1|"` if ("$hbookFile" != "") then DhpEndRunHarvestApp $DhpCorbaName -hbkName $hbookFile endif DotAdmin -s $DhpCorbaName