Skip to content

Commit e990741

Browse files
committed
Adding autocomplete URL resolution to eos paths for ATLAS CMS and Opendata
1 parent 9369560 commit e990741

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

servicex_analysis_utils/dataset_resolver.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,19 @@ def ds_type_resolver(
7272
elif ds_name.startswith("root://") and ds_name.endswith("*"):
7373
return dataset.XRootD(ds_name)
7474

75+
elif ds_name.startswith("/eos/"):
76+
if "opendata" in ds_name:
77+
return dataset.FileList([f"root://eospublic.cern.ch/{ds_name}"])
78+
elif "atlas" in ds_name:
79+
return dataset.FileList([f"root://eosatlas.cern.ch/{ds_name}"])
80+
elif "cms" in ds_name:
81+
return dataset.FileList([f"root://eoscms.cern.ch/{ds_name}"])
82+
else:
83+
raise ValueError(
84+
f"Unable to determine the correct EOS instance for the provided path: {ds_name}."
85+
"Please provide the full root:// URL. Cannot be a user path."
86+
)
87+
7588
elif re.match(r"^root://", ds_name):
7689
return dataset.FileList(ds_name)
7790

0 commit comments

Comments
 (0)