File indexing completed on 2024-10-01 05:01:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 declare -A TABLES=(
0012 ["Fake"]="/dev/CMSSW_14_1_0/Fake"
0013 ["Fake1"]="/dev/CMSSW_14_1_0/Fake1"
0014 ["Fake2"]="/dev/CMSSW_14_1_0/Fake2"
0015 ["2024v14"]="/frozen/2024/2e34/v1.4/CMSSW_14_1_X/HLT"
0016 )
0017
0018
0019 VERBOSE=false
0020 DBPROXYOPTS=""
0021 while [[ $
0022 case "$1" in
0023 -v) VERBOSE=true; shift;;
0024 --dbproxy) DBPROXYOPTS="${DBPROXYOPTS} --dbproxy"; shift;;
0025 --dbproxyhost) DBPROXYOPTS="${DBPROXYOPTS} --dbproxyhost $2"; shift; shift;;
0026 --dbproxyport) DBPROXYOPTS="${DBPROXYOPTS} --dbproxyport $2"; shift; shift;;
0027 *) shift;;
0028 esac
0029 done
0030
0031
0032 DBPROXYOPTS=$(echo "${DBPROXYOPTS}" | xargs)
0033
0034
0035 function log() {
0036 ${VERBOSE} && echo -e "$@"
0037 }
0038
0039
0040 TESTDIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
0041
0042
0043 if [ "${TESTDIR}" != "${CMSSW_BASE}"/src/HLTrigger/Configuration/test ]; then
0044 printf "\n%s\n" "ERROR -- the directory hosting getHLT.sh [1] does not correspond to \${CMSSW_BASE}/src/HLTrigger/Configuration/test [2]"
0045 printf "%s\n" " [1] ${TESTDIR}"
0046 printf "%s\n\n" " [2] ${CMSSW_BASE}/src/HLTrigger/Configuration/test"
0047 exit 1
0048 fi
0049
0050
0051 if [ ! -d "${CMSSW_BASE}"/src/HLTrigger/Configuration/python ]; then
0052 printf "\n%s\n" "ERROR -- the directory \${CMSSW_BASE}/src/HLTrigger/Configuration/python [1] does not exist"
0053 printf "%s\n\n" " [1] ${CMSSW_BASE}/src/HLTrigger/Configuration/python"
0054 exit 1
0055 fi
0056
0057 INITDIR="${PWD}"
0058
0059
0060 cd "${CMSSW_BASE}"/src/HLTrigger/Configuration/test
0061
0062
0063 for TABLE in "${!TABLES[@]}"; do
0064 CONFIG="${TABLES[${TABLE}]}"
0065 echo "${TABLE} (config: ${CONFIG})"
0066
0067
0068 log " creating cff fragment of HLT menu..."
0069 hltGetConfiguration "${CONFIG}" --cff --data --type "${TABLE}" ${DBPROXYOPTS} > ../python/HLT_"${TABLE}"_cff.py
0070
0071
0072 AUTOGT="auto:run3_hlt_${TABLE}"
0073 if [ "${TABLE}" = "Fake" ]; then
0074 AUTOGT="auto:run1_hlt_${TABLE}"
0075 elif [ "${TABLE}" = "Fake1" ] || [ "${TABLE}" = "Fake2" ]; then
0076 AUTOGT="auto:run2_hlt_${TABLE}"
0077 fi
0078
0079
0080 log " creating full cfg of HLT menu..."
0081 hltGetConfiguration "${CONFIG}" --full --data --type "${TABLE}" --unprescale --process "HLT${TABLE}" --globaltag "${AUTOGT}" \
0082 --input "file:RelVal_Raw_${TABLE}_DATA.root" ${DBPROXYOPTS} > OnLine_HLT_"${TABLE}".py
0083 done
0084
0085 cd "${INITDIR}"