7 from PyCool
import cool
8 from CoolConvUtilities.AtlCoolLib
import indirectOpen,RangeList
9 from DetectorStatus.DetStatusLib
import DetStatusReq
12 """Return a RangeList giving the good IOV range corresponding to the
13 specified set of daetector status cuts, using the given DB and folder"""
14 range=RangeList(since,until)
16 reqs.setFromString(statusreq)
17 folder=dbconn.getFolder(foldername)
19 for (ichan,req)
in reqs.getDict().
items():
20 itr=folder.browseObjects(since,until,cool.ChannelSelection(ichan),tag)
24 status=obj.payload()[
'Code']
25 if (lastiov<obj.since()):
27 range.vetoRange(lastiov,obj.since())
29 range.vetoRange(obj.since(),obj.until())
32 range.vetoRange(lastiov,until)
38 statusCutsToRange(dbconn,
'/GLOBAL/DETSTATUS/LBSUMM',0,cool.ValidityKeyMax,
'TRTB 3')
40 if __name__==
'__main__':