-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make commands a lot more customizable.
Remove `pset` and `argument` parameters, and instead parse the `command` parameter for workflows. This allows to shuffle things around a little and will be more flexible in the future. The following merge command would now be possible: my_merge.py -o @outputfiles --inputs @inputfiles While at it, pulling in datasets from DBS and splitting them on files broke recently, fix it. Fixes #207.
- Loading branch information
Showing
8 changed files
with
133 additions
and
29 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import datetime | ||
|
||
from lobster import cmssw | ||
from lobster.core import AdvancedOptions, Category, Config, StorageConfiguration, Workflow | ||
|
||
version = datetime.datetime.now().strftime('%Y%m%d_%H%M') | ||
|
||
storage = StorageConfiguration( | ||
output=[ | ||
"hdfs://eddie.crc.nd.edu:19000/store/user/$USER/lobster_test_" + version, | ||
"file:///hadoop/store/user/$USER/lobster_test_" + version, | ||
# ND is not in the XrootD redirector, thus hardcode server. | ||
# Note the double-slash after the hostname! | ||
"root://deepthought.crc.nd.edu//store/user/$USER/lobster_test_" + version, | ||
"chirp://eddie.crc.nd.edu:9094/store/user/$USER/lobster_test_" + version, | ||
"gsiftp://T3_US_NotreDame/store/user/$USER/lobster_test_" + version, | ||
"srm://T3_US_NotreDame/store/user/$USER/lobster_test_" + version | ||
] | ||
) | ||
|
||
processing = Category( | ||
name='processing', | ||
cores=1, | ||
runtime=900, | ||
memory=1000 | ||
) | ||
|
||
workflows = [] | ||
|
||
ttH = Workflow( | ||
label='ttH', | ||
dataset=cmssw.Dataset( | ||
dataset='/ttHToNonbb_M125_13TeV_powheg_pythia8/RunIIFall15MiniAODv2-PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1/MINIAODSIM', | ||
lumis_per_task=20, | ||
file_based=True | ||
), | ||
category=processing, | ||
command='root -b -q -l script_macro.C @outputfiles @inputfiles', | ||
extra_inputs=['script_macro.C'], | ||
publish_label='test', | ||
merge_command='hadd @outputfiles @inputfiles', | ||
merge_size='3.5G', | ||
outputs=['output.root'] | ||
) | ||
|
||
workflows.append(ttH) | ||
|
||
config = Config( | ||
workdir='/tmpscratch/users/$USER/lobster_test_' + version, | ||
plotdir='~/www/lobster/test_' + version, | ||
storage=storage, | ||
workflows=workflows, | ||
advanced=AdvancedOptions( | ||
bad_exit_codes=[127, 160], | ||
log_level=1 | ||
) | ||
) |
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,13 @@ | ||
void | ||
script_macro() { | ||
auto count = gApplication->Argc(); | ||
gApplication->GetOptions(&count, gApplication->Argv()); | ||
auto outname = gApplication->Argv(1); | ||
TFile out(outname, "RECREATE"); | ||
TH1F hist("vertex_ndof", "", 500, -0.5, 499.5); | ||
TChain c("Events"); | ||
for (int i = 2; i < count; ++i) | ||
c.Add(gApplication->Argv(i)); | ||
c.Draw("recoVertexs_offlineSlimmedPrimaryVertices__PAT.obj.ndof_>>vertex_ndof"); | ||
hist.Write(); | ||
} |
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
File renamed without changes.
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
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