102 folder = coolDbConn.GetDBConn(schema=
"COOLONL_TRIGGER", db=Selector.condDB()).getFolder(
'/TRIGGER/LUMI/LBTIME')
103 print (
'SELOUT Checking for runs in time range "%s"' % self.
timelist, end=
'')
105 ranges = GetRanges(self.
timelist, maxval=int(time()*1E09))
109 objs = folder.browseObjects( rr[0], rr[1]+86400000000000, cool.ChannelSelection(0))
110 while objs.goToNext():
111 obj=objs.currentRef()
112 payload=obj.payload()
113 runNr = int(payload[
'Run'])
123 if not currentRun
or runNr != currentRun.runNr:
125 currentRun.eor = currentEOR
126 runlist.append(currentRun)
127 currentRun = Run(runNr)
128 currentRun.sor = obj.since()
129 lbNr = int(payload[
'LumiBlock'])
130 currentRun.lbtimes.extend([(0,0)]*(lbNr-len(currentRun.lbtimes)))
131 currentRun.lbtimes[lbNr-1] = ( obj.since(), obj.until() )
132 currentRun.lastlb = lbNr
133 currentEOR = obj.until()
135 currentRun.eor = currentEOR
136 runlist.append(currentRun)
139 duration = time() - start
140 print (
" ==> %i runs selected (%g sec)" % (len(runlist), duration))