37def returnEosHistPathLB(run, lb0, lb1, stream, amiTag, tag="data16_13TeV"):
38 path = '/eos/atlas/atlastier0/tzero/prod/'+tag + \
39 '/'+getStreamPrefix(stream)+'/00'+str(run)+'/'
40 P = sp.Popen(['/usr/bin/eos', 'ls', path], stdout=sp.PIPE, stderr=sp.PIPE)
41 p = P.communicate()[0].decode("utf-8")
42 listOfFiles = p.split('\n')
43
44 pathList = []
45 for iFile in listOfFiles:
46 if ("recon.HIST.%s" % (amiTag) in iFile and "LOG" not in iFile):
47 path = '/eos/atlas/atlastier0/tzero/prod/'+tag+'/' + \
48 getStreamPrefix(stream)+'/00'+str(run)+'/'+iFile
49 P = sp.Popen(['/usr/bin/eos', 'ls', path],
50 stdout=sp.PIPE, stderr=sp.PIPE)
51 p = P.communicate()[0].decode("utf-8")
52 listOfFiles2 = p.split('\n')
53 for iFile2 in listOfFiles2:
54 if ("data" in iFile2):
55 ilb = int((iFile2.split(
"_lb")[1]).
split(
"._")[0])
56
57 if (lb0 <= ilb and ilb <= lb1):
58 path = '/eos/atlas/atlastier0/tzero/prod/'+tag+'/' + \
59 getStreamPrefix(stream)+'/00' + \
60 str(run)+'/'+iFile+'/'+iFile2
61 pathList.append(path)
62
63 if len(pathList) > 0:
64 return pathList
65 else:
66 return "FILE NOT FOUND"
67
68
69
70