Skip to content

Instantly share code, notes, and snippets.

@alexander-held
Created May 18, 2022 14:48
Show Gist options
  • Save alexander-held/4db5624ab302c423ce40dc82d65965a2 to your computer and use it in GitHub Desktop.
Save alexander-held/4db5624ab302c423ce40dc82d65965a2 to your computer and use it in GitHub Desktop.
split out pre-processing in coffea into separate step
run_instance = processor.Runner(
metadata_cache={},
executor=processor.FuturesExecutor(
workers=6,
),
schema=processor.NanoAODSchema,
savemetrics=True,
skipbadfiles=False,
)
filemeta = run_instance.preprocess(to_run, treename="Events")
# optionally filemeta = [f for f in filemeta] to materialize the generator to eg save it
hists = run_instance.run(filemeta, processor_instance=MyZPeak(), treename="Events")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment