Skip to content

Commit 0940c4d

Browse files
committed
Fix a bug in extending data list
1 parent 23f4250 commit 0940c4d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

data/index_private_nano.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@ def xrootd_index_private_nano(
215215
tfiles += [f"{redirector}{f3path!s}/{f}" for f in root_files]
216216

217217
if is_data:
218+
subsample_key = f"{sample}_{f1}".replace("_DAZSLE_PFNano", "")
218219
# For data, concatenate files from related subsamples
219220
# e.g. EGamma0 and EGamma1 should be combined
220-
if f1 not in files[year][sample]:
221-
files[year][sample][f1] = []
222-
files[year][sample][f1].extend(tfiles)
221+
if subsample_key not in files[year][sample]:
222+
files[year][sample][subsample_key] = []
223+
files[year][sample][subsample_key].extend(tfiles)
223224
print(f"\t\t\t\t\t{len(tfiles)} files added")
224225

225226
if not is_data:

0 commit comments

Comments
 (0)