Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:17

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 lastID=$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 ID, TSC_KEY
0020 FROM
0021 (
0022  SELECT ID, TSC_KEY
0023  FROM CMS_TRG_L1_CONF.L1_CONF
0024  WHERE ID > '${lastID}'
0025  AND TSC_KEY IS NOT NULL
0026  AND TSC_KEY NOT IN
0027  (
0028   SELECT DISTINCT TSC_KEY
0029   FROM CMS_TRG_L1_CONF.L1_CONF
0030   WHERE ID <= '${lastID}'
0031   AND TSC_KEY IS NOT NULL
0032  )
0033  ORDER BY ID
0034 )
0035 WHERE ROWNUM = 1
0036 ;
0037 EOF
0038 
0039 exit