34 command =
'lumiData2.py -c ' +connectionString+
' -P '+authpath+
' listrun'
36 command+=
' --minrun '+str(minrun)
37 statusAndOutput = commands.getstatusoutput(command)
38 rlist= eval(statusAndOutput[1])
40 lastAnalyzedRunNumber = rlist[-1]
41 print 'Last run in DB: ', lastAnalyzedRunNumber
43 print 'No qualified run found in DB'
44 lastAnalyzedRunNumber=int(minrun)
47 p=re.compile(
'^CMS_LUMI_RAW_\d\d\d\d\d\d\d\d_\d\d\d\d\d\d\d\d\d_\d\d\d\d_\d.root$')
48 files=
filter(os.path.isfile,[os.path.join(dropbox,x)
for x
in os.listdir(dropbox)
if p.match(x)])
49 files.sort(key=
lambda x: os.path.getmtime(os.path.join(dropbox,x)))
55 print 'Last lumi file produced by HF: ', lastRaw +
', Run: ', lastRecordedRun
59 if lastRecordedRun != lastAnalyzedRunNumber:
61 if len(file.split(
'_'))!=7:
continue
65 if thisrun>lastAnalyzedRunNumber :
66 runsToBeAnalyzed[str(thisrun)] = file
67 return runsToBeAnalyzed