Definition at line 23 of file doL1CaloHVCorrections.py.
◆ __init__()
def doL1CaloHVCorrections.HVCorrectionCOOLReader.__init__ |
( |
|
self | ) |
|
Definition at line 25 of file doL1CaloHVCorrections.py.
27 self.correctionsFromCOOL = {}
28 self.UNIX2COOL = 1000000000
31 dbSvc = cool.DatabaseSvcFactory.databaseService()
33 dbString =
'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2'
35 db = dbSvc.openDatabase(dbString,
False)
36 except Exception
as e:
37 print (
'Error: Problem opening database', e)
40 folder_name =
"/TRIGGER/Receivers/Factors/HVCorrections"
41 folder=db.getFolder(folder_name)
43 startUtime =
int(time.time())
44 endUtime =
int(time.time())
45 startValKey = startUtime * self.UNIX2COOL
46 endValKey = endUtime * self.UNIX2COOL
47 chsel = cool.ChannelSelection(0,sys.maxsize)
50 itr=folder.browseObjects(startValKey, endValKey, chsel)
51 except Exception
as e:
56 ReceiverId = hex(
int(row.channelId()))
57 payload = row.payload()
58 HVCorrection = payload[
'factor']
60 self.correctionsFromCOOL[ReceiverId] = HVCorrection
◆ getCorrection()
def doL1CaloHVCorrections.HVCorrectionCOOLReader.getCorrection |
( |
|
self, |
|
|
|
receiver |
|
) |
| |
Definition at line 65 of file doL1CaloHVCorrections.py.
65 def getCorrection(self, receiver):
67 return self.correctionsFromCOOL[receiver]
◆ correctionsFromCOOL
doL1CaloHVCorrections.HVCorrectionCOOLReader.correctionsFromCOOL |
◆ UNIX2COOL
doL1CaloHVCorrections.HVCorrectionCOOLReader.UNIX2COOL |
The documentation for this class was generated from the following file: