Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:13

0001 #!/bin/sh
0002 
0003 # Look for the first of the next new L1 keys which has not been validated.
0004 # Reference ~l1emulator/o2o/scripts/getRecentKeys.sh
0005 
0006 lastRun=$1
0007 
0008 DB="cms_omds_lb"
0009 USER="cms_trg_r"
0010 PASSWORD_FILE=/nfshome0/centraltspro/secure/$USER.txt
0011 PASSWORD=`cat $PASSWORD_FILE`
0012 
0013 sqlplus -S ${USER}/${PASSWORD}@${DB} <<EOF
0014 set linesize 500
0015 set wrap on
0016 set heading off
0017 set pagesize 0
0018 set feedback off
0019 SELECT *
0020 FROM
0021 (
0022  SELECT MAX(RUNNUMBER) RUNNUMBER, TSCKEY
0023  FROM CMS_WBM.RUNSUMMARY
0024  WHERE RUNNUMBER > ${lastRun}
0025  AND TSCKEY IS NOT NULL
0026  AND TSCKEY NOT IN
0027  (
0028   SELECT DISTINCT TSCKEY
0029   FROM CMS_WBM.RUNSUMMARY
0030   WHERE RUNNUMBER <= ${lastRun}
0031   AND TSCKEY IS NOT NULL
0032  )
0033  GROUP BY TSCKEY
0034  ORDER BY RUNNUMBER
0035 )
0036 WHERE ROWNUM = 1
0037 ;
0038 EOF
0039 
0040 exit