def buildFAXPath(self, **argdict): """ Build a proper FAX path """ # This method builds proper FAX paths and is used in pure FAX mode (i.e. when FAX is used in forced mode), # particularly when the PoolFileCatalog.xml is built prior to stage-in # Only needed if FAX mechanism is used in forced mode (i.e. when copytoolin='fax') lfn = argdict.get('lfn', 'default_lfn') scope = argdict.get('scope', 'default_scope') subpath = argdict.get('subpath', 'atlas/rucio/') pandaID = argdict.get('pandaID', '') sourceSite = argdict.get('sourceSite', 'default_sourcesite') computingSite = argdict.get('computingSite', 'default_computingsite') # Get the proper FAX redirector (default ATLAS implementation) from FAXTools import getFAXRedirectors # First get the global redirectors (several, since the lib file might not be at the same place for overflow jobs) fax_redirectors_dictionary = getFAXRedirectors(computingSite, sourceSite, pandaID) tolog("fax_redirectors_dictionary=%s" % str(fax_redirectors_dictionary)) # select the proper fax redirector if ".lib." in lfn: redirector = fax_redirectors_dictionary['computingsite'] else: redirector = fax_redirectors_dictionary['sourcesite'] # Make sure the redirector ends with a double slash if not redirector.endswith('//'): if redirector.endswith('/'): redirector += "/" else: redirector += "//" # Make sure that the subpath does not begin with a slash if subpath.startswith('/') and len(subpath) > 1: subpath = subpath[1:] tolog("redirector=%s" % (redirector)) tolog("subpath=%s" % (subpath)) tolog("scope=%s" % (scope)) tolog("lfn=%s" % (lfn)) return redirector + subpath + scope + ":" + lfn
def buildFAXPath(self, **argdict): """ Build a proper FAX path """ # This method builds proper FAX paths and is used in pure FAX mode (i.e. when FAX is used in forced mode), # particularly when the PoolFileCatalog.xml is built prior to stage-in # Only needed if FAX mechanism is used in forced mode (i.e. when copytoolin='fax') lfn = argdict.get("lfn", "default_lfn") scope = argdict.get("scope", "default_scope") subpath = argdict.get("subpath", "atlas/rucio/") pandaID = argdict.get("pandaID", "") sourceSite = argdict.get("sourceSite", "default_sourcesite") computingSite = argdict.get("computingSite", "default_computingsite") # Get the proper FAX redirector (default ATLAS implementation) from FAXTools import getFAXRedirectors # First get the global redirectors (several, since the lib file might not be at the same place for overflow jobs) fax_redirectors_dictionary = getFAXRedirectors(computingSite, sourceSite, pandaID) tolog("fax_redirectors_dictionary=%s" % str(fax_redirectors_dictionary)) # select the proper fax redirector if ".lib." in lfn: redirector = fax_redirectors_dictionary["computingsite"] else: redirector = fax_redirectors_dictionary["sourcesite"] # Make sure the redirector ends with a double slash if not redirector.endswith("//"): if redirector.endswith("/"): redirector += "/" else: redirector += "//" # Make sure that the subpath does not begin with a slash if subpath.startswith("/") and len(subpath) > 1: subpath = subpath[1:] tolog("redirector=%s" % (redirector)) tolog("subpath=%s" % (subpath)) tolog("scope=%s" % (scope)) tolog("lfn=%s" % (lfn)) return redirector + subpath + scope + ":" + lfn