Skip to content
Snippets Groups Projects
Commit 24759258 authored by Maarten Van Veghel's avatar Maarten Van Veghel
Browse files

consistent defaults

parent a77f8880
No related branches found
No related tags found
1 merge request!4127split track containers and persistency (versioning)
......@@ -126,7 +126,7 @@ class Options(BaseModel):
input_raw_format: float = 0.5
input_process: Optional[InputProcessTypes] = None
input_manifest_file: Optional[str] = None
persistency_locations_version: Optional[str] = None
persistency_locations_version: str = ""
xml_file_catalog: Optional[str] = None
evt_max: int = -1
first_evt: int = 0
......
......@@ -16,13 +16,13 @@ from PyConf import configurable
from PyConf.persistency_locations import (
reco_locations as _reco_locations, pp2mcp_locations as _pp2mcp_locations)
_default_persisted_locations = {
_default_persistable_locations = {
v: {k: cfg[0]
for k, cfg in locs.items()}
for v, locs in _reco_locations.items()
}
_default_persisted_pp2mcp_locations = {
_default_persistable_pp2mcp_locations = {
k: v[0]
for k, v in _pp2mcp_locations.items()
}
......@@ -60,14 +60,17 @@ def pp2mcp_locations(stream="/Event/HLT2"):
@configurable
def default_persisted_locations(locations=_default_persisted_locations,
stream="/Event",
version=latest_persistency_locations_version):
def default_persistable_locations(
locations=_default_persistable_locations,
stream="/Event",
version=latest_persistency_locations_version):
return {k: prefix(v, stream) for k, v in locations[version()].items()}
@configurable
def persisted_location(k, force=True, locations=default_persisted_locations()):
def persistable_location(k,
force=True,
locations=default_persistable_locations()):
return force_location(locations[k]) if force else None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment