Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-20 07:58:59

0001 import hashlib
0002 
0003 
0004 # construct file path
0005 def construct_file_path(base_path, scope, lfn):
0006     hash = hashlib.md5()
0007     hash.update(f"{scope}:{lfn}".encode("latin_1"))
0008     hash_hex = hash.hexdigest()
0009     correctedscope = "/".join(scope.split("."))
0010     dstURL = f"{base_path}/{correctedscope}/{hash_hex[0:2]}/{hash_hex[2:4]}/{lfn}"
0011     return dstURL