4 # Make plots for the Nearline webpage...
9 if [ $argssize -ne 3 ];then
11 echo "Usage: ./MakeNearlineWebPlots.sh {dunetpc release: vXX_YY_ZZ} {compiler} {time period in days}"
13 echo "Example: ./MakeNearlineWebPlots.sh v04_32_01 e9 2"
24 # Test to see if this job is already running.
25 if [ -e /tmp/Batch-MakeNearlineWebPlots-${REL}-${DAYS}days.lock ];then
26 echo "lock file /tmp/Batch-MakeNearlineWebPlots-${REL}-${DAYS}days.lock exists. Exiting..."
29 touch /tmp/Batch-MakeNearlineWebPlots-${REL}-${DAYS}days.lock
34 KEYTAB=/var/adm/krb5/lbnedaq.keytab
35 KEYUSE=`/usr/krb5/bin/klist -k ${KEYTAB} | grep FNAL.GOV | head -1 | cut -c 5- | cut -f 1 -d /`
36 /usr/krb5/bin/kinit -5 -A -kt ${KEYTAB} ${KEYUSE}/dune/`hostname`@FNAL.GOV
40 # Specify path to nearline output files...
41 SearchPath="/lbne/data2/users/lbnedaq/nearline/v*/*/*/"
45 # Setup the LArSoft/dunetpc environment to pick up root.
46 export RelDir=/home/lbnedaq/nearline/nearline_test_release_${REL}
47 export ScriptPath=${RelDir}/srcs/dunetpc/dune/NearlineMonitor/scripts
48 export LPDir=${RelDir}/localProducts_larsoft_${REL}_${COMP}_prof
51 echo "Setting up LArSoft/DUNETPC:"
52 source /grid/fermiapp/products/dune/setup_dune.sh
62 # Make temporary list of files to be processed
63 rm -vf 35t_${DAYS}Day_Nearline_File_List.txt
64 find ${SearchPath} -mtime -${DAYS} -name "lbne_*_nearline*.root" | sort -r > 35t_${DAYS}Day_Nearline_File_List.txt
68 # Execute root script to make plots...
69 root -l -b -q "${ScriptPath}/NearlinePlotMaker.C+(${DAYS})"
73 # Done, remove the lock file...
74 rm -v /tmp/Batch-MakeNearlineWebPlots-${REL}-${DAYS}days.lock