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