38 path =
'/eos/atlas/atlastier0/tzero/prod/'+tag + \
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')
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+
'/' + \
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])
57 if (lb0 <= ilb
and ilb <= lb1):
58 path =
'/eos/atlas/atlastier0/tzero/prod/'+tag+
'/' + \
60 str(run)+
'/'+iFile+
'/'+iFile2
66 return "FILE NOT FOUND"
74 path =
'/eos/atlas/atlastier0/rucio/'+tag + \
76 P = sp.Popen([
'/usr/bin/eos',
'ls', path], stdout=sp.PIPE, stderr=sp.PIPE)
79 files = p[0].decode(
"utf-8")
80 files = files.split(
'\n')
82 dotAmiTag =
".%s" % (amiTag)
83 if (
'TAG' in f
and dotAmiTag
in f):
88 print(
'no TAG directory found in %s' % (path))
91 P = sp.Popen([
'/usr/bin/eos',
'ls', path], stdout=sp.PIPE, stderr=sp.PIPE)
94 files = p[0].decode(
"utf-8").
split(
'\n')
98 listOfFiles.append(pathFile)
107 path =
'/eos/atlas/atlascerngroupdisk/det-larg/Tier0/perm/' + \
109 P = sp.Popen([
'/usr/bin/eos',
'ls', path], stdout=sp.PIPE, stderr=sp.PIPE)
112 files = p[0].decode(
"utf-8")
113 files = files.split(
'\n')
115 dotAmiTag =
".%s" % (amiTag)
116 if (
'LARNOISE' in f
and dotAmiTag
in f):
121 print(
'no LARNOISE directory found in %s' % (path))
124 P = sp.Popen([
'/usr/bin/eos',
'ls', path], stdout=sp.PIPE, stderr=sp.PIPE)
127 files = p[0].decode(
"utf-8").
split(
'\n')
130 pathFile = path+iFile
131 listOfFiles.append(pathFile)
140 path =
'/eos/atlas/atlastier0/rucio/'+tag + \
142 P = sp.Popen([
'/usr/bin/eos',
'ls', path], stdout=sp.PIPE, stderr=sp.PIPE)
145 files = p[0].decode(
"utf-8")
146 files = files.split(
'\n')
148 dotAmiTag =
".%s" % (amiTag)
149 if (
'.ESD' in f
and dotAmiTag
in f):
154 print(
'no ESD directory found in %s' % (path))
157 P = sp.Popen([
'/usr/bin/eos',
'ls', path], stdout=sp.PIPE, stderr=sp.PIPE)
160 files = p[0].decode(
"utf-8").
split(
'\n')
163 pathFile = path+iFile
164 listOfFiles.append(pathFile)
173 P = sp.Popen([
'ls', path], stdout=sp.PIPE, stderr=sp.PIPE)
177 files = p[0].decode(
"utf-8")
178 files = files.split(
'\n')
182 listOfFiles.append(pathFile)
186 print(
'no file containing %f found in %s' % (filterName, path))