Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-09 02:40:49

0001 #! /bin/bash
0002 
0003 # Exit the script immediately if any command fails
0004 set -e
0005 
0006 # Enable pipefail to propagate the exit status of the entire pipeline
0007 set -o pipefail
0008 
0009 FOLDER_FILES="/data/user/${USER}/"
0010 DATASET="/RelValTTbar_14TeV/CMSSW_14_1_0_pre6-PU_141X_mcRun4_realistic_v1_STD_2026D110_PU-v3/GEN-SIM-DIGI-RAW"
0011 FILES=( $(dasgoclient -query="file dataset=${DATASET}" --limit=-1 | sort | head -4) )
0012 
0013 for f in ${FILES[@]}; do
0014   # Create full MYPATH if it does not exist
0015   MYPATH=$(dirname ${f})
0016   if [ ! -d "${FOLDER_FILES}${MYPATH}" ]; then
0017     echo "mkdir -p ${FOLDER_FILES}${MYPATH}"
0018     mkdir -p ${FOLDER_FILES}${MYPATH}
0019   fi
0020   if [ -e "/eos/cms/${f}" ]; then
0021     if [ ! -e "${FOLDER_FILES}${f}" ]; then
0022       echo "cp /eos/cms/$f ${FOLDER_FILES}${MYPATH}"
0023       cp /eos/cms/$f ${FOLDER_FILES}${MYPATH}
0024     fi
0025   fi
0026 done
0027 
0028 LOCALPATH=${FOLDER_FILES}$(dirname ${FILES[0]})
0029 echo "Local repository: |${LOCALPATH}|"
0030 LOCALFILES=$(ls -1 ${LOCALPATH})
0031 ALL_FILES=""
0032 for f in ${LOCALFILES[@]}; do
0033   ALL_FILES+="file:${LOCALPATH}/${f},"
0034 done
0035 # Remove the last character
0036 ALL_FILES="${ALL_FILES%?}"
0037 echo "Discovered files: $ALL_FILES"
0038 
0039 cmsDriver.py Phase2 -s L1P2GT,HLT:75e33_timing --processName=HLTX \
0040   --conditions auto:phase2_realistic_T33 --geometry ExtendedRun4D110 \
0041   --era Phase2C17I13M9 \
0042   --customise SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000 \
0043   --eventcontent FEVTDEBUGHLT \
0044   --filein=${ALL_FILES} \
0045   --mc --nThreads 4 --inputCommands='keep *, drop *_hlt*_*_HLT, drop triggerTriggerFilterObjectWithRefs_l1t*_*_HLT' \
0046   -n 1000 --no_exec --output={}
0047 
0048 if [ -e 'Phase2_L1P2GT_HLT.py' ]; then
0049   if [ ! -d 'patatrack-scripts' ]; then
0050     git clone https://github.com/cms-patatrack/patatrack-scripts --depth 1
0051   fi
0052   patatrack-scripts/benchmark -j 4 -t 16 -s 16 -e 1000 --no-run-io-benchmark --event-skip 100 --event-resolution 10 -k Phase2Timing_resources.json -- Phase2_L1P2GT_HLT.py
0053   mergeResourcesJson.py logs/step*/pid*/Phase2Timing_resources.json > Phase2Timing_resources.json
0054   if [ -e "$(dirname $0)/augmentResources.py" ]; then
0055     python3 $(dirname $0)/augmentResources.py
0056   fi
0057 fi