Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DQM: Re-add harvesting test tools. #28986

Merged
merged 1 commit into from Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions DQMServices/Components/test/dqmiofilecopy.sh
@@ -0,0 +1,27 @@
#!/bin/bash
# like '/SingleElectron/Run2017D-09Aug2019_UL2017-v1/DQMIO'
DATASET=$1
# like 302663
RUN=$2

SOURCE='root://cms-xrd-global.cern.ch/'

DIR=$(echo $DATASET | tr / _)

FILES=$(dasgoclient -query="file dataset=$DATASET run=$RUN" -limit=-1)
mkdir $DIR

echo 'process.source.fileNames = cms.untracked.vstring('
for f in $FILES; do
edmCopyUtil "$SOURCE$f" $DIR &
echo " 'file:$DIR/$(basename $f)',"
done
echo ')'

# wait for parallel transfers to complete
wait





20 changes: 20 additions & 0 deletions DQMServices/Components/test/test_reharvest_from_dqmio.sh
@@ -0,0 +1,20 @@
# DQMIO dataset to take data from and run to look at
RUN=302663
DATASET=/SingleElectron/Run2017D-09Aug2019_UL2017-v1/DQMIO
# Workflow to take the HARVESTING step from
WORKFLOW=136.834

# run cmsDriver to generate baseline harvesting config
$(runTheMatrix.py -l 136.834 -ne | fgrep 'HARVESTING:' | grep -o 'cmsDriver.*') --no_exec
pythonname=$(echo step*_HARVESTING.py)

# copy data to local folder and add it to config
./dqmiofilecopy.sh $DATASET $RUN >> $pythonname

# no idea where this is injected in the prod setup, but it must be somewhere.
echo "process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange('$RUN:1-$(($RUN+1)):0')" >> $pythonname

echo '### Got all data, starting cmsRun!'

cmsRun $pythonname