Skip to content

Allow optional arguments via VarParsing#21

Open
IzaakWN wants to merge 1 commit intocms-outreach:masterfrom
IzaakWN:master
Open

Allow optional arguments via VarParsing#21
IzaakWN wants to merge 1 commit intocms-outreach:masterfrom
IzaakWN:master

Conversation

@IzaakWN
Copy link

@IzaakWN IzaakWN commented Nov 18, 2021

By allowing optional arguments via VarParsing, user can run ispy_10_X_X_cfg.py without needing to edit the file, e.g.

cmsRun python/ispy_10_X_X_cfg.py inFile=root://cmsxrootd.fnal.gov//store/data/Run2018B/Charmonium/AOD/17Sep2018-v1/120000/3ADC2E5A-4F1B-4546-8CB6-58DDBBC921D3.root maxEvts=10
cmsRun python/ispy_10_X_X_cfg.py inFile=file:AOD.root maxEvts=50

The defaults are the same as before.

Also, I made the file executable with chmod u+x, and added the shebang

#! /usr/bin/env cmsRun

so one can run the script as

python/ispy_10_X_X_cfg.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant