File indexing completed on 2024-04-06 12:22:28
0001
0002
0003 if [ $
0004
0005
0006 source /opt/offline/cmsset_default.sh
0007 cd /opt/offline/slc6_amd64_gcc493/cms/cmssw/CMSSW_8_0_25
0008 cmsenv
0009 cd -
0010 export TNS_ADMIN=/opt/offline/slc6_amd64_gcc493/cms/oracle-env/29/etc/
0011
0012 DBAuth=/data/O2O/L1T/
0013
0014 blankDB=/data/O2O/L1T/l1configBlank.db
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 rm -f l1config.db
0027 if [ -e $blankDB ] ; then
0028 echo "Using pre-initialized $blankDB sqlite file";
0029 cp $blankDB l1config.db
0030 else
0031 cmsRun ${CMSSW_BASE}/src/CondTools/L1TriggerExt/test/init_cfg.py useO2OTags=1 outputDBConnect=sqlite:l1configBlank.db outputDBAuth=${DBAuth}
0032 initcode=$?
0033 if [ $initcode -ne 0 ] ; then echo "Failed to initialize sqlite file"; exit 1 ; fi
0034
0035 cmsRun ${CMSSW_BASE}/src/CondTools/L1TriggerExt/test/L1ConfigWriteSinglePayloadExt_cfg.py objectKey="OMTF_ALGO_EMPTY" objectType=L1TMuonOverlapParams recordName=L1TMuonOverlapParamsO2ORcd useO2OTags=1 outputDBConnect=sqlite:l1configBlank.db outputDBAuth=${DBAuth}
0036 initcode=$?
0037 if [ $initcode -ne 0 ] ; then echo "Failed to write OMTF_ALGO_EMPTY constant payload in sqlite file" ; exit 1 ; fi
0038 cmsRun ${CMSSW_BASE}/src/CondTools/L1TriggerExt/test/L1ConfigWriteSinglePayloadExt_cfg.py objectKey="1541" objectType=L1TMuonEndCapForest recordName=L1TMuonEndCapForestO2ORcd useO2OTags=1 outputDBConnect=sqlite:l1configBlank.db
0039 initcode=$?
0040 if [ $initcode -ne 0 ] ; then echo "Failed to write EMTF pT LUT #1541 in sqlite file" ; exit 1 ; fi
0041
0042 cp l1configBlank.db l1config.db
0043 fi
0044
0045
0046 keys=$(cmsRun ${CMSSW_BASE}/src/L1TriggerConfig/Utilities/test/viewTKEonline.py tscKey=$1 rsKey=$2 DBAuth=${DBAuth} 2>/dev/null | grep ' key: ')
0047 keyscode=$?
0048 if [ $keyscode -ne 0 ] ; then echo "Failed to get the list of trigger keys for L1T subsystems. Did you provide the 2 arguments: tscKey and rsKey ? " ; exit 2 ; fi
0049
0050
0051 uGT_key=$(echo $keys | sed -n -e's|.*uGT *key: \([^ ]*\).*|\1|gp')
0052 uGMT_key=$(echo $keys | sed -n -e's|.*uGMT *key: \([^ ]*\).*|\1|gp')
0053 CALO_key=$(echo $keys | sed -n -e's|.*CALO *key: \([^ ]*\).*|\1|gp')
0054 BMTF_key=$(echo $keys | sed -n -e's|.*BMTF *key: \([^ ]*\).*|\1|gp')
0055 OMTF_key=$(echo $keys | sed -n -e's|.*OMTF *key: \([^ ]*\).*|\1|gp')
0056 echo "uGT_key=$uGT_key uGMT_key=$uGMT_key CALO_key=$CALO_key BMTF_key=$BMTF_key OMTF_key=$OMTF_key"
0057
0058
0059 cmsRun ${CMSSW_BASE}/src/L1TriggerConfig/Utilities/test/dumpL1TUtmTriggerMenu.py systemKey=$uGT_key DBAuth=${DBAuth}
0060 ugtcode=$?
0061
0062 cmsRun ${CMSSW_BASE}/src/L1TriggerConfig/Utilities/test/dumpL1TCaloParams.py systemKey=$CALO_key DBAuth=${DBAuth}
0063 caloparcode=$?
0064
0065 cmsRun ${CMSSW_BASE}/src/L1TriggerConfig/Utilities/test/dumpL1TMuonBarrelParams.py systemKey=$BMTF_key DBAuth=${DBAuth}
0066 bmtfcode=$?
0067
0068 cmsRun ${CMSSW_BASE}/src/L1TriggerConfig/Utilities/test/dumpL1TMuonGlobalParams.py systemKey=$uGMT_key DBAuth=${DBAuth}
0069 ugmtcode=$?
0070
0071 cmsRun ${CMSSW_BASE}/src/L1TriggerConfig/Utilities/test/dumpL1TGlobalPrescalesVetos.py systemKey=$uGT_key DBAuth=${DBAuth}
0072 ugtrscode=$?
0073
0074 cmsRun ${CMSSW_BASE}/src/L1TriggerConfig/Utilities/test/dumpL1TMuonOverlapParams.py topKey="$1:$2" DBAuth=${DBAuth}
0075 omtfcode=$?
0076
0077 cmsRun ${CMSSW_BASE}/src/L1TriggerConfig/Utilities/test/dumpL1TMuonEndCapParams.py topKey="$1:$2" DBAuth=${DBAuth}
0078 emtfcode=$?
0079
0080
0081 exitcode=0
0082 if [ $ugtcode -ne 0 ] ; then exitcode=`expr $exitcode + 10`; fi
0083 if [ $caloparcode -ne 0 ] ; then exitcode=`expr $exitcode + 100`; fi
0084 if [ $bmtfcode -ne 0 ] ; then exitcode=`expr $exitcode + 1000`; fi
0085 if [ $ugmtcode -ne 0 ] ; then exitcode=`expr $exitcode + 10000`; fi
0086 if [ $ugtrscode -ne 0 ] ; then exitcode=`expr $exitcode + 100000`; fi
0087 if [ $omtfcode -ne 0 ] ; then exitcode=`expr $exitcode + 1000000`; fi
0088 if [ $emtfcode -ne 0 ] ; then exitcode=`expr $exitcode + 10000000`; fi
0089
0090 echo "Status codes: uGT: $ugtcode, CALO: $caloparcode, BMTF: $bmtfcode, uGMT: $ugmtcode, uGTrs: $ugtrscode, OMTF: $omtfcode, EMTF:$emtfcode, Total: $exitcode"
0091
0092 if [ $exitcode -eq 0 ] ; then
0093 echo "Everything looks good"
0094 else
0095 echo "Problems encountered, NOT ok"
0096 fi
0097
0098 exit $exitcode