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