forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from clelange/clange_addNTUP
add script to automatically submit next step (RECO or NTUP) for all s…
- Loading branch information
Showing
2 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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=10 | ||
EVTSNTUP=100 | ||
|
||
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 |