-
Notifications
You must be signed in to change notification settings - Fork 1
/
DQM_RelVal_2017_CMSSW_10_6_0_pre2.sh
executable file
·94 lines (69 loc) · 2.29 KB
/
DQM_RelVal_2017_CMSSW_10_6_0_pre2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/sh
set -e
if [ $# -ne 1 ]; then
printf "\n%s\n\n" " >>> ERROR -- one input argument required (path to output directory)"
exit 1
fi
OUTPUT_DIR="$1"
if [ -d ${OUTPUT_DIR} ]; then
printf "\n%s\n\n" " >>> ERROR -- target output directory already exists: ${OUTPUT_DIR}"
exit 1
fi
mkdir -p ${OUTPUT_DIR}
cd ${OUTPUT_DIR}
#EDM_INPUT=/store/relval/CMSSW_10_6_0_pre2/RelValTTbar_13UP17/GEN-SIM-RECO/PUpmx25ns_105X_mc2017_realistic_v7_ulhlt17_pmx-v1/10000/298F1453-812C-5042-9160-632FD60C0454.root
DAS_SAMPLE=/RelValTTbar_13UP17/CMSSW_10_6_0_pre2-PUpmx25ns_105X_mc2017_realistic_v7_ulhlt17_pmx-v1/GEN-SIM-RECO
dasgoclient --query "file dataset=${DAS_SAMPLE}" > inputs.txt
OUTPUT_TAG=RelValTTbar_13UP17_PUpmx25ns_105X_mc2017_realistic_v7_ulhlt17_pmx
STEP1_OUTPUT=${OUTPUT_TAG}_DQM.root
STEP1_CFG_PY=${OUTPUT_TAG}_DQM_cfg.py
STEP2_CFG_PY=${OUTPUT_TAG}_Harvesting_cfg.py
# --- Step_1: DQM
if [ ! -f ${STEP1_OUTPUT} ]; then
cmsDriver.py step1 \
--step DQM:offlineHLTSource4physicsPD \
--filein filelist:inputs.txt \
--fileout ${STEP1_OUTPUT} \
--python_filename ${STEP1_CFG_PY} \
--mc \
--eventcontent DQM \
--datatier DQMIO \
--conditions auto:phase1_2017_realistic \
--era Run2_2017 \
--geometry DB:Extended \
--nThreads 1 \
--no_exec \
--runUnscheduled \
--customise Configuration/DataProcessing/Utils.addMonitoring \
-n -1 || exit $? ;
cmsRun ${STEP1_CFG_PY}
else
printf "\n%s\n\n" " >>> WARNING -- skipped Step_1 , target output file already exists: ${STEP1_OUTPUT}"
fi
# --------------
# --- Step_2: Harvesting (output: DQM_V0001_R000000001__Global__CMSSW_X_Y_Z__RECO.root)
if [ -f ${STEP1_OUTPUT} ]; then
cmsDriver.py step2 \
--step HARVESTING:hltOfflineDQMClient --harvesting AtRunEnd \
--filein file:${STEP1_OUTPUT} \
--python_filename ${STEP2_CFG_PY} \
--filetype DQM \
--mc \
--scenario pp \
--conditions auto:phase1_2017_realistic \
--era Run2_2017 \
--geometry DB:Extended \
--no_exec \
-n -1 || exit $? ;
cmsRun ${STEP2_CFG_PY}
else
printf "\n%s\n\n" " >>> WARNING -- skipped Step_2 , target input file not found: ${STEP1_OUTPUT}"
fi
# --------------
#unset -v EDM_INPUT
unset -v DAS_SAMPLE
unset -v OUTPUT_DIR
unset -v OUTPUT_TAG
unset -v STEP1_OUTPUT
unset -v STEP1_CFG_PY
unset -v STEP2_CFG_PY