|
def | __init__ (self, database='COOLOFL_GLOBAL/CONDBR2', tag='HEAD', debug=False) |
|
def | __del__ (self) |
|
def | connect (self) |
|
def | defectList (self) |
|
def | defect (self, run, lb, channels=None) |
|
def | defectsRange (self, run, lbStart, lbEnd, channels=None) |
|
def | dumpRun (self, run, channels=None) |
|
Container for beamspot DQ defects from COOL
Definition at line 196 of file DQUtilities.py.
◆ __init__()
def python.DQUtilities.IDBSDefectData.__init__ |
( |
|
self, |
|
|
|
database = 'COOLOFL_GLOBAL/CONDBR2' , |
|
|
|
tag = 'HEAD' , |
|
|
|
debug = False |
|
) |
| |
Definition at line 205 of file DQUtilities.py.
205 def __init__(self, database='COOLOFL_GLOBAL/CONDBR2', tag='HEAD', debug=False):
◆ __del__()
def python.DQUtilities.IDBSDefectData.__del__ |
( |
|
self | ) |
|
Delete db to clear connection
Definition at line 221 of file DQUtilities.py.
223 Delete db to clear connection
◆ _defectForLB()
def python.DQUtilities.IDBSDefectData._defectForLB |
( |
|
self, |
|
|
|
lb |
|
) |
| |
|
private |
Get the DQ defects for the given LB from the full run info
Definition at line 298 of file DQUtilities.py.
298 def _defectForLB(self, lb):
300 Get the DQ defects for the given LB from the full run info
304 for since, until, states
in process_iovs(*self.iovsets):
305 if since.lumi <= lb < until.lumi:
307 defects = [state.channel
for state
in states
if state]
◆ connect()
def python.DQUtilities.IDBSDefectData.connect |
( |
|
self | ) |
|
Open connection to defect DB
Definition at line 230 of file DQUtilities.py.
232 Open connection to defect DB
235 self.db = DefectsDB(self.database, read_only=
True, create=
False, tag=self.tag)
236 self.idbsDefects = [d
for d
in self.db.defect_names
if d.startswith(
'ID_BS_')
or d ==
'LUMI_VDM']
239 print (self.idbsDefects)
◆ defect()
def python.DQUtilities.IDBSDefectData.defect |
( |
|
self, |
|
|
|
run, |
|
|
|
lb, |
|
|
|
channels = None |
|
) |
| |
Get list of DQ defects for a particular run and lb, caching the result for the latest (succesful) run
e.g.
from InDetBeamSpotExample.DQUtilities import IDBSDefectData
idbs = IDBSDefectData()
idbs.defect(167661,372)
channels is the list of defects to look for (defaults to all ID_BS defects)
Definition at line 250 of file DQUtilities.py.
250 def defect(self, run, lb, channels=None):
252 Get list of DQ defects for a particular run and lb, caching the result for the latest (succesful) run
254 from InDetBeamSpotExample.DQUtilities import IDBSDefectData
255 idbs = IDBSDefectData()
256 idbs.defect(167661,372)
258 channels is the list of defects to look for (defaults to all ID_BS defects)
262 channels = self.idbsDefects
267 since = (run << 32)+lbMin
268 until = (run << 32)+lbMax
271 if run == self.lastRun:
272 defects = self._defectForLB(lb)
274 print (run, lb, defects)
278 iovs = self.db.
retrieve(since, until, channels=channels)
282 print (
"Unable to access folder with given parameters")
287 chans, self.iovsets = iovs.chans_iovsets
289 defects = self._defectForLB(lb)
294 print (run, lb, defects)
◆ defectList()
def python.DQUtilities.IDBSDefectData.defectList |
( |
|
self | ) |
|
List of all possible beamspot defects
Definition at line 243 of file DQUtilities.py.
243 def defectList(self):
245 List of all possible beamspot defects
248 return self.idbsDefects
◆ defectsRange()
def python.DQUtilities.IDBSDefectData.defectsRange |
( |
|
self, |
|
|
|
run, |
|
|
|
lbStart, |
|
|
|
lbEnd, |
|
|
|
channels = None |
|
) |
| |
Return the maximal list of defects for a given range. lbEnd is exclusive
Definition at line 312 of file DQUtilities.py.
312 def defectsRange(self, run, lbStart, lbEnd, channels=None):
314 Return the maximal list of defects for a given range. lbEnd is exclusive
318 for lb
in range(lbStart, lbEnd):
319 defects.extend(self.defect(run, lb, channels=channels))
◆ dumpRun()
def python.DQUtilities.IDBSDefectData.dumpRun |
( |
|
self, |
|
|
|
run, |
|
|
|
channels = None |
|
) |
| |
Dump DQ info for a particular run (useful in reprocessing to compare new to old)
Definition at line 323 of file DQUtilities.py.
323 def dumpRun(self, run, channels=None):
325 Dump DQ info for a particular run (useful in reprocessing to compare new to old)
329 channels = self.idbsDefects
334 since = (run << 32)+lbMin
335 until = (run << 32)+lbMax
338 iovs = self.db.
retrieve(since, until, channels=channels, nonpresent=
True)
342 print (
"Unable to access folder with given parameters")
◆ database
python.DQUtilities.IDBSDefectData.database |
|
static |
◆ db
python.DQUtilities.IDBSDefectData.db |
◆ debug
python.DQUtilities.IDBSDefectData.debug |
|
static |
◆ defectBitPos
list python.DQUtilities.IDBSDefectData.defectBitPos |
|
static |
Initial value:= ['UNKNOWN', 'ID_BS_2010YELLOW', 'ID_BS_RUNAVERAGE', 'ID_BS_PARAMETERSTEP',
'ID_BS_NOBEAMSPOT', 'ID_BS_2010RED', 'LUMI_VDM']
Definition at line 201 of file DQUtilities.py.
◆ idbsDefects
python.DQUtilities.IDBSDefectData.idbsDefects |
◆ iovsets
python.DQUtilities.IDBSDefectData.iovsets |
|
static |
◆ lastRun
python.DQUtilities.IDBSDefectData.lastRun |
|
static |
◆ tag
python.DQUtilities.IDBSDefectData.tag |
|
static |
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.