-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
production-pfnano: add pfnano prod and test workflow
- Loading branch information
Showing
2 changed files
with
65 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: PFNano Production Analysis | ||
name: PFNano production test | ||
|
||
on: | ||
push: | ||
|
@@ -10,26 +10,35 @@ on: | |
default: '24103' | ||
type: string | ||
jobs: | ||
analysis: | ||
runs-on: coffeateam/coffea-base | ||
test-production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: git clone [email protected]:cms-dpoa/cat-hackathon.git | ||
|
||
- name: Run analysis | ||
- name: Prepare directories | ||
run: | | ||
cd cat-hackathon/analysis/coffea/ | ||
python coffea_plot.py | ||
- name: Save results | ||
mkdir outputs | ||
echo ls -l `ls -l ` | ||
- name: Mount cvmfs | ||
uses: cvmfs-contrib/github-action-cvmfs@v2 | ||
run: | | ||
echo "### Dump default.local ###" | ||
cat /etc/cvmfs/default.local | ||
echo "### Test /cvmfs/cms.cern.ch ###" | ||
ls /cvmfs/cms.cern.ch | ||
echo "### /cvmfs/cms-opendata-conddb.cern.ch/ ###" | ||
ls /cvmfs/cms-opendata-conddb.cern.ch/ | ||
- name: Run production | ||
run: | | ||
echo "save results" | ||
docker run -v $(pwd):/mnt/vol -v /cvmfs:/cvmfs:shared -w /home/cmsusr gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cvmfs:2023-04-04-131be08c /bin/bash /mnt/vol/production/pfnano/pf_production.sh github | ||
echo ls -l `ls -l ` | ||
cp *.root outputs | ||
- name: Upload results | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Analysis Results | ||
path: results/ | ||
name: output | ||
path: outputs/ |
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,40 @@ | ||
# parameters: $1 runas, $2 number of events, $3 inputfile | ||
# if running outside github actions, give any other 1st paramater than github i.e. commands.sh mywork (or omit the paramaters) | ||
# defaults: | ||
if [ -z "$1" ]; then runas=other; else runas=$1; fi | ||
if [ -z "$2" ]; then nevents=20; else nevents=$2; fi | ||
if [ -z "$3" ]; then inputfile=root://eospublic.cern.ch//eos/opendata/cms/Run2015D/DoubleEG/MINIAOD/08Jun2016-v1/10000/00387F48-342F-E611-AB5D-0CC47A4D76AC.root; else inputfile=$3; fi | ||
|
||
set -e | ||
|
||
# For the plain github action with docker, the area would be available in /mnt/vol | ||
# if [ $runas = github ] | ||
# then | ||
sudo chown $USER /mnt/vol | ||
ls -l /mnt/vol | ||
# cp -r /mnt/vol cat-hackathon | ||
# fi | ||
|
||
# Expect to be in /code | ||
source /cvmfs/cms.cern.ch/cmsset_default.sh | ||
cmsrel CMSSW_10_6_30 | ||
cd CMSSW_10_6_30/src/ | ||
cmsenv | ||
git cms-init --upstream-only | ||
git config user.email "[email protected]" | ||
git config user.name "me" | ||
git cms-merge-topic 39040 | ||
git clone -b opendata https://github.com/DAZSLE/PFNano.git PhysicsTools/PFNano | ||
scram b -j 4 | ||
|
||
cmsDriver.py --python_filename doubleeg_cfg.py --eventcontent NANOAOD --datatier NANOAOD \ | ||
--fileout file:doubleeg_nanoaod.root --conditions 106X_dataRun2_v36 --step NANO \ | ||
--filein $inputfile --era Run2_25ns,run2_nanoAOD_106X2015 --no_exec --data -n $nevents \ | ||
--customise PhysicsTools/PFNano/pfnano_cff.PFnano_customizeData_onlyPF | ||
|
||
# if [ $runas = github ] | ||
# then | ||
cp *.root /mnt/vol/ | ||
echo ls -l /mnt/vol | ||
ls -l /mnt/vol | ||
# fi |