Skip to content
Snippets Groups Projects

Make "process" a required input and configure pyconf functions globally once with user input

Merged Abhijit Mathad requested to merge AM_process into master
Compare and
2 files
+ 15
13
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -26,10 +26,11 @@ from PyConf.tonic import configurable
from PyConf.Algorithms import RecV1ToPVConverter
from DaVinci.locations import LocationsUnpackedReco, enums_as_dict
from DaVinci import options
@configurable
def upfront_reconstruction(process='Spruce'):
def upfront_reconstruction(process=options.process):
"""Return a list DataHandles that define the upfront reconstruction output.
This differs from `reconstruction` as it should not be used as inputs to
@@ -52,7 +53,7 @@ def upfront_reconstruction(process='Spruce'):
@configurable
def reconstruction(process='Spruce'):
def reconstruction(process=options.process):
"""Return a {name: DataHandle} dict that define the reconstruction output."""
map = {}
@@ -70,31 +71,31 @@ def reconstruction(process='Spruce'):
return map
def make_rich_pids(process='Spruce'):
def make_rich_pids(process=options.process):
return reconstruction(process=process)['RichPIDs']
def make_muon_pids(process='Spruce'):
def make_muon_pids(process=options.process):
return reconstruction(process=process)['MuonPIDs']
def make_charged_protoparticles(process='Spruce'):
def make_charged_protoparticles(process=options.process):
return reconstruction(process=process)['ChargedProtos']
def make_neutral_protoparticles(process='Spruce'):
def make_neutral_protoparticles(process=options.process):
return reconstruction(process=process)['NeutralProtos']
def make_pvs(process='Spruce'):
def make_pvs(process=options.process):
return reconstruction(process=process)['PVs']
def make_tracks(process='Spruce'):
def make_tracks(process=options.process):
return reconstruction(process=process)['Tracks']
def make_pvs_v2(process='Spruce'):
def make_pvs_v2(process=options.process):
pvs = make_pvs(process=process)
@@ -104,7 +105,7 @@ def make_pvs_v2(process='Spruce'):
return RecV1ToPVConverter(InputVertices=pvs).OutputVertices
def get_particles(process="Spruce", location=""):
def get_particles(process=options.process, location=""):
if process == 'Spruce':
stream = '/Event/Spruce'
Loading