ATLAS Offline Software
Functions
python.DetStatusCoolLib Namespace Reference

Functions

def statusCutsToRange (dbconn, foldername, since, until, tag, statusreq)
 
def testStatusCutsToRange ()
 

Function Documentation

◆ statusCutsToRange()

def python.DetStatusCoolLib.statusCutsToRange (   dbconn,
  foldername,
  since,
  until,
  tag,
  statusreq 
)
Return a RangeList giving the good IOV range corresponding to the
specified set of daetector status cuts, using the given DB and folder

Definition at line 11 of file DetStatusCoolLib.py.

11 def statusCutsToRange(dbconn,foldername,since,until,tag,statusreq):
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)
15  reqs=DetStatusReq()
16  reqs.setFromString(statusreq)
17  folder=dbconn.getFolder(foldername)
18  # loop over all requested status cuts
19  for (ichan,req) in reqs.getDict().items():
20  itr=folder.browseObjects(since,until,cool.ChannelSelection(ichan),tag)
21  lastiov=since
22  while itr.goToNext():
23  obj=itr.currentRef()
24  status=obj.payload()['Code']
25  if (lastiov<obj.since()):
26  # veto gaps where no status data was provided - assume bad
27  range.vetoRange(lastiov,obj.since())
28  if (status<req):
29  range.vetoRange(obj.since(),obj.until())
30  lastiov=obj.until()
31  # veto final gap (if any)
32  range.vetoRange(lastiov,until)
33  itr.close()
34  return range
35 

◆ testStatusCutsToRange()

def python.DetStatusCoolLib.testStatusCutsToRange ( )

Definition at line 36 of file DetStatusCoolLib.py.

37  dbconn=indirectOpen('COOLOFL_GLOBAL/COMP200')
38  statusCutsToRange(dbconn,'/GLOBAL/DETSTATUS/LBSUMM',0,cool.ValidityKeyMax,'TRTB 3')
39 
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.DetStatusCoolLib.statusCutsToRange
def statusCutsToRange(dbconn, foldername, since, until, tag, statusreq)
Definition: DetStatusCoolLib.py:11
python.AtlCoolLib.indirectOpen
def indirectOpen(coolstr, readOnly=True, debug=False)
Definition: AtlCoolLib.py:130
python.DetStatusCoolLib.testStatusCutsToRange
def testStatusCutsToRange()
Definition: DetStatusCoolLib.py:36