Skip to content

Commit

Permalink
addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andreypz committed Jul 27, 2023
1 parent d950407 commit d9d37af
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions filefetcher/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ def getFilesFromDas(args):

dsname = dataset.strip().split("/")[1] # Dataset first name

Tier = dataset.strip().split("/")[
3
] # NANOAODSIM for regular samples, USER for private
if Tier not in ["NANOAODSIM", "USER"]:
# This is for the case of reading a sample from dCache, which is not published in DAS
Tier = dataset.strip().split("/")[3]
# Tier = NANOAOD[SIM] for regular samples, USER for private samples

if Tier=="NANOAOD":
# This is for the case for Data.
# In this case we want datasetname to be formed from the first two parts (in order to distinguish years/Eras)
dsname = dataset.strip().split("/")[1] + "_" + dataset.split("/")[2]
instance = "prod/global"
if Tier == "USER":
Expand Down Expand Up @@ -108,7 +109,7 @@ def getFilesFromPath(args, lim=None):
def getRootFilesFromPath(d, lim=None):
import subprocess

if "xrootd" in d:
if "root://" in d:
sp = d.split("/")
siteIP = "/".join(sp[0:4])
pathToFiles = "/".join(sp[3:]) + "/"
Expand Down

0 comments on commit d9d37af

Please sign in to comment.