Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep relvals input file order #36794

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
@@ -113,9 +113,11 @@ def filesFromList(fileName,s=None):
elif (line.find(".root")!=-1):
entry=line.replace("\n","")
prim.append(entry)
# remove any duplicates
prim = sorted(list(set(prim)))
sec = sorted(list(set(sec)))
# remove any duplicates but keep the order
file_seen = set()
prim = [f for f in prim if not (f in file_seen or file_seen.add(f))]
file_seen = set()
sec = [f for f in sec if not (f in file_seen or file_seen.add(f))]
if s:
if not hasattr(s,"fileNames"):
s.fileNames=cms.untracked.vstring(prim)