Skip to content
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
27 changes: 16 additions & 11 deletions processor/tasks/CROWNRun.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ def create_branch_map(self):
for filecounter, filename in enumerate(inputdata["filelist"]):
if (int(filecounter / files_per_task)) not in branches:
branches[int(filecounter / files_per_task)] = []
# This call aims to get a "better" XRootD server to access the file.
# If the file is available on GridKA, take it from there.
# Otherwise, use the official European or global redirector.
filename = get_alternate_file_uri(
filename,
[
"root://cmsdcache-kit-disk.gridka.de",
"root://xrootd-cms.infn.it",
"root://cms-xrd-global.cern.ch",
],
)
branches[int(filecounter / files_per_task)].append(filename)
for x in branches:
branch_map[branchcounter] = {}
Expand Down Expand Up @@ -114,6 +103,22 @@ def run(self):
_inputfiles = branch_data["files"]
_sample_type = branch_data["sample_type"]
_era = branch_data["era"]

# This call aims to get a "better" XRootD server to access the file.
# If the file is available on GridKA, take it from there.
# Otherwise, use the official European or global redirector.
_inputfiles = [
get_alternate_file_uri(
filename,
[
"root://cmsdcache-kit-disk.gridka.de",
"root://xrootd-cms.infn.it",
"root://cms-xrd-global.cern.ch",
],
)
for filename in _inputfiles
]

# set the outputfilename to the first name in the output list, removing the scope suffix
_outputfile = str(
rootfile_outputs[0].basename.replace(
Expand Down
Loading