forked from CMS-HGCAL/reco-prodtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmitNextStep.sh
executable file
·32 lines (29 loc) · 1.1 KB
/
submitNextStep.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
#!/bin/zsh
#
# Script to automatically submit jobs for next step (RECO or NTUP) for all
# samples in SAMPLEDIR. Can adjust events per job with variables listed
# below (EVTSRECO and EVTSNTUP).
#
eosExec='/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select'
SAMPLEDIR='/eos/cms/store/cmst3/group/hgcal/CMG_studies/Production'
EVTSRECO=60
EVTSNTUP=120
for i in `$eosExec ls $SAMPLEDIR`; do
CONTENT=("${(@f)$($eosExec ls $SAMPLEDIR/$i)}")
echo "$i has $CONTENT"
if [[ ${CONTENT[(r)GSD]} == GSD ]]; then
if [[ ${CONTENT[(r)RECO]} == RECO ]]; then
if [[ ${CONTENT[(r)NTUP]} == NTUP ]]; then
echo "Nothing to be done"
else
echo "submit NTUP for $i"
python SubmitHGCalPGun.py --datTier NTUP --evtsperjob $EVTSNTUP --queue 8nh --inDir $i
fi
else
echo "submit RECO for $i"
python SubmitHGCalPGun.py --datTier RECO --evtsperjob $EVTSRECO --queue 8nh --inDir $i
fi
else
echo "$i does not seem to be a directory containing event samples! Skipping."
fi
done