SOLARIS_Analysis/armory/Process_Run

71 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-03-28 17:09:58 -04:00
#!/bin/bash
2023-04-04 14:47:44 -04:00
######## default time window = 100 tick
timeWin=100
2023-03-31 16:08:06 -04:00
if [ -z $SOLARISANADIR ]; then
echo "###### env variable SOLARISANADIR not defined. Abort. Please run the SOLARIS.sh."
echo "better add \"source <path_to_SOLARIS.sh>\" into .bashrc"
exit
fi
2023-03-28 17:09:58 -04:00
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
2023-04-04 14:47:44 -04:00
echo "$ Process_Run [RunNum] [EventBuild] [GeneralSort] [TraceMethod] [Monitor]"
2023-03-31 16:08:06 -04:00
echo " RunNum = run number / \"lastRun\" "
echo " EventBld = 2/1/0/-1/-2 || 2 = with Trace"
echo " GeneralSort = n/0/-n || n = number of worker"
2023-04-04 14:47:44 -04:00
echo " TraceMethod = -1/0/1/2 || -1 no trace, 0 save trace, 1 fit, 2 trapezoid"
2023-03-31 16:08:06 -04:00
echo " Monitors = 2/1/0 || 1 = single run, 2 = using the list in ChainMonitors.C"
2023-03-28 17:09:58 -04:00
echo " 10 = single run and post to websrv, 20 = list runs and post to websrv"
echo ""
echo " **** When feeding trace data to Monitors, the EventBld flag must be 2 or -2."
echo ""
exit 1
fi;
RUN=$1
2023-03-31 16:08:06 -04:00
runNum=$1
EventBld=0
nWorker=1
2023-04-04 14:47:44 -04:00
TraceMethod=0
2023-03-31 16:08:06 -04:00
isMonitor=0
if [ $# -ge 2 ]; then EventBld=$2; fi
if [ $# -ge 3 ]; then nWorker=$3; fi
2023-04-04 14:47:44 -04:00
if [ $# -ge 4 ]; then TraceMethod=$3; fi
if [ $# -ge 5 ]; then isMonitor=$5; fi
2023-03-31 16:08:06 -04:00
timeWin=100000
source ${SOLARISANADIR}/armory/Process_BasicConfig
source ${SOLARISANADIR}/working/expName.sh
if [ "$RUN" == "lastRun" ]; then
RUN=$runID
fi
2023-03-28 17:09:58 -04:00
2023-04-04 14:47:44 -04:00
RUN=${RUN%0} #remove zero
RUN=$(printf '%03d' $RUN) ##add back the zero
2023-03-28 17:09:58 -04:00
2023-03-31 16:08:06 -04:00
####################################
if [ ${PCID} -eq 1 ]; then
2023-04-04 14:47:44 -04:00
source Process_EventBuilder $RUN $EventBld $timeWin
2023-03-31 16:08:06 -04:00
else
2023-04-04 14:47:44 -04:00
source Process_Download $RUN
source Process_EventBuilder $RUN $EventBld
2023-03-28 17:09:58 -04:00
2023-04-04 14:47:44 -04:00
fi
2023-03-28 17:09:58 -04:00
2023-04-04 14:47:44 -04:00
#################################### GeneralSort
2023-03-28 17:09:58 -04:00
2023-03-31 16:08:06 -04:00
#################################### Monitor