241 matchrun = re.compile(
r'Run ([0-9]+) LB \[([0-9]+)-([0-9]+)\]')
242 matchlumidel = re.compile(
r': IntL delivered \(ub\^-1\) : ([0-9\.e+]+)')
243 matchlumipre = re.compile(
r': IntL after livefraction \(ub\^-1\): ([0-9\.\e\+\-]+)')
244 matchlumilar = re.compile(
r': IntL after LAr fraction \(ub\^-1\): ([0-9\.\e\+\-]+)')
245 matchlumirec = re.compile(
r': IntL recorded after prescale \(ub\^-1\) : ([0-9\.\e\+\-]+)')
246 matchgoodlb = re.compile(
r': Good LBs : ([0-9]+)')
247 matchbadlb = re.compile(
r': Bad LBs : ([0-9]+)')
249 matchtotlumidel = re.compile(
r': Total IntL delivered \(ub\^-1\) : ([0-9\.\e\+\-]+)')
250 matchtotlumipre = re.compile(
r': Total IntL after livefraction \(ub\^-1\): ([0-9\.\e\+\-]+)')
251 matchtotlumilar = re.compile(
r': Total IntL after LAr fraction \(ub\^-1\): ([0-9\.\e\+\-]+)')
252 matchtotlumirec = re.compile(
r': Total IntL recorded \(ub\^-1\) : ([0-9\.\e\+\-]+)')
253 matchtotgoodlb = re.compile(
r': Total Good LBs : ([0-9]+)')
254 matchtotbadlb = re.compile(
r': Total Bad LBs : ([0-9]+)')
256 matchrealtime = re.compile(
r': Real time: ([0-9\.\e\+\-]+)')
257 matchcputime = re.compile(
r': CPU time: ([0-9\.\e\+\-]+)')
270 currentrun =
'000000'
272 for line
in open(self.
workdir+
'/output.txt').readlines():
273 m=matchrun.search(line)
276 print (
'Found run/lbstart/lbend:', m.group(1), m.group(2), m.group(3))
277 currentrun = m.group(1)
280 m=matchlumidel.search(line)
283 print (
'Found lumiDel:', m.group(1),
'in run', currentrun)
286 m=matchlumirec.search(line)
289 print (
'Found lumiRec:', m.group(1),
'in run', currentrun)
292 m=matchlumipre.search(line)
295 print (
'Found lumiPre:', m.group(1),
'in run', currentrun)
298 m=matchlumilar.search(line)
301 print (
'Found lumiLar:', m.group(1),
'in run', currentrun)
304 m = matchgoodlb.search(line)
307 print (
'Found goodLB:', m.group(1),
'in run', currentrun)
308 self.
goodlb[currentrun] = int(m.group(1)) + self.
goodlb.
get(currentrun, 0)
310 m = matchbadlb.search(line)
313 print (
'Found badLB:', m.group(1),
'in run', currentrun)
314 self.
badlb[currentrun] = int(m.group(1)) + self.
badlb.
get(currentrun, 0)
317 m=matchtotlumidel.search(line)
320 print (
'Found Total lumiDel:', m.group(1))
323 m=matchtotlumirec.search(line)
326 print (
'Found Total lumiRec:', m.group(1))
329 m=matchtotlumipre.search(line)
332 print (
'Found Total lumiPre:', m.group(1))
335 m=matchtotlumilar.search(line)
338 print (
'Found Total lumiLar:', m.group(1))
341 m = matchtotgoodlb.search(line)
344 print (
'Found Total goodLB:', m.group(1),
'in run', currentrun)
347 m = matchtotbadlb.search(line)
350 print (
'Found Total badLB:', m.group(1),
'in run', currentrun)
351 self.
badlb[
'Total'] = int(m.group(1)) + self.
badlb.
get(
'Total', 0)
353 m = matchrealtime.search(line)
357 m = matchcputime.search(line)
359 self.
cputime = float(m.group(1))