From 46f7e51df4368d5453aa6b8165147ac18b44958a Mon Sep 17 00:00:00 2001 From: Mat Adamec Date: Tue, 1 Feb 2022 20:17:46 +0000 Subject: [PATCH] fixing outdated processor/executor blocks --- docs/cc_user.rst | 12 ++++++------ docs/cc_user_opendata.rst | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/cc_user.rst b/docs/cc_user.rst index 65180877..a5aa4464 100644 --- a/docs/cc_user.rst +++ b/docs/cc_user.rst @@ -220,12 +220,12 @@ Then we bundle everything up to run our job, making use of the Dask executor. To .. code-block:: python - output = processor.run_uproot_job(fileset=fileset, - treename="Events", - processor_instance=Processor(), - executor=processor.dask_executor, - executor_args={'client': client, 'nano': True}, - chunksize=250000) + executor = processor.DaskExecutor(client=client) + run = processor.Runner(executor=executor, + schema=schemas.NanoAODSchema, + ) + + output = run(fileset, "Events", processor_instance=Processor()) The final step is to generates a 1D histogram from the data output to the 'MET' key. fill_opts are optional arguments to fill the graph (default is a line). diff --git a/docs/cc_user_opendata.rst b/docs/cc_user_opendata.rst index cdbedf62..de04e122 100644 --- a/docs/cc_user_opendata.rst +++ b/docs/cc_user_opendata.rst @@ -242,12 +242,13 @@ Then we bundle everything up to run our job, making use of the Dask executor. To .. code-block:: python - output = processor.run_uproot_job(fileset=fileset, - treename="Events", - processor_instance=Processor(), - executor=processor.dask_executor, - executor_args={'client': client, 'nano': True}, - chunksize=250000) + executor = processor.DaskExecutor(client=client) + run = processor.Runner(executor=executor, + schema=schemas.NanoAODSchema, + savemetrics=True + ) + + output, metrics = run(fileset, "Events", processor_instance=Processor()) The final step is to generates a 1D histogram from the data output to the 'MET' key. fill_opts are optional arguments to fill the graph (default is a line).