Definition at line 25 of file LArHVGainsPredictor.py.
◆ __init__()
def LArHVGainsPredictor.OracleGainReader.__init__ |
( |
|
self | ) |
|
Definition at line 27 of file LArHVGainsPredictor.py.
29 self.reference_gains={}
30 self.UNIX2COOL = 1000000000
33 dbSvc = cool.DatabaseSvcFactory.databaseService()
35 dbString =
'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2'
37 db = dbSvc.openDatabase(dbString,
False)
38 except Exception
as e:
39 print (
'Error: Problem opening database', e)
42 folder_name =
"/TRIGGER/Receivers/Factors/CalibGains"
43 folder=db.getFolder(folder_name)
45 startUtime =
int(time.time())
46 endUtime =
int(time.time())
47 startValKey = startUtime * self.UNIX2COOL
48 endValKey = endUtime * self.UNIX2COOL
49 chsel = cool.ChannelSelection(0,sys.maxint)
52 itr=folder.browseObjects(startValKey, endValKey, chsel)
53 except Exception
as e:
58 ReceiverId = hex(
int(row.channelId()))
59 payload = row.payload()
60 gain = payload[
'factor']
61 self.reference_gains[ReceiverId]=gain
◆ getGain()
def LArHVGainsPredictor.OracleGainReader.getGain |
( |
|
self, |
|
|
|
ReceiverId |
|
) |
| |
Definition at line 67 of file LArHVGainsPredictor.py.
67 def getGain(self,ReceiverId):
69 if (ReceiverId
in self.reference_gains):
70 return float(self.reference_gains[ReceiverId])
◆ reference_gains
LArHVGainsPredictor.OracleGainReader.reference_gains |
◆ UNIX2COOL
LArHVGainsPredictor.OracleGainReader.UNIX2COOL |
The documentation for this class was generated from the following file: