Skip to content
Snippets Groups Projects

Modify the functions in FileFromDirac

Merged Chenjia Zhang requested to merge zcjmodifyfilefromdirac into master
All threads resolved!
1 file
+ 11
6
Compare changes
  • Side-by-side
  • Inline
@@ -14,7 +14,11 @@ import subprocess
from collections import defaultdict
def get_access_urls_mc(bkkpath, evttype, filetypes, sites_to_remove=[], max_files=500):
def get_access_urls_mc(bkkpath,
evttype,
filetypes,
sites_to_remove=[],
max_files=500):
customEnv = {}
# set custom grid proxy path if exists
@@ -70,7 +74,9 @@ def get_access_urls_mc(bkkpath, evttype, filetypes, sites_to_remove=[], max_file
# Filter out some failing grid sites/files from the list
excluded = ['stfc.ac.uk'] + sites_to_remove
lfns = [lfn for lfn in lfns_tmp if not any(site in lfn for site in excluded)]
lfns = [
lfn for lfn in lfns_tmp if not any(site in lfn for site in excluded)
]
lfns = sorted(lfns, key=lambda str: not "eoslhcb.cern.ch" in str)
return lfns
@@ -141,13 +147,12 @@ def get_access_urls_data(bkkpath, sites_to_remove=[], max_files=500):
# Filter out some failing grid sites/files from the list
excluded = ['stfc.ac.uk'] + sites_to_remove
lfns = [lfn for lfn in lfns_tmp if not any(site in lfn for site in excluded)]
lfns = [
lfn for lfn in lfns_tmp if not any(site in lfn for site in excluded)
]
lfns = sorted(lfns, key=lambda str: not "eoslhcb.cern.ch" in str)
return lfns
# TODO warn if some of the first N files was not resolved to a URL
# since then one would get numerically different results.
Loading