ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
mergeEnergyRamps.GainsFromOracle Class Reference
Collaboration diagram for mergeEnergyRamps.GainsFromOracle:

Public Member Functions

def __init__ (self)
 
def getGoodGains (self)
 

Public Attributes

 default_gains
 
 UNIX2COOL
 

Detailed Description

Definition at line 380 of file mergeEnergyRamps.py.

Constructor & Destructor Documentation

◆ __init__()

def mergeEnergyRamps.GainsFromOracle.__init__ (   self)

Definition at line 381 of file mergeEnergyRamps.py.

381  def __init__(self):
382 
383  self.default_gains={}
384  self.UNIX2COOL = 1000000000
385 
386  # get database service and open database
387  dbSvc = cool.DatabaseSvcFactory.databaseService()
388 
389  dbString = 'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2'
390  try:
391  db = dbSvc.openDatabase(dbString, False)
392  except Exception as e:
393  print ('Error: Problem opening database', e)
394  sys.exit(1)
395 
396  folder_name = "/TRIGGER/Receivers/Factors/CalibGains"
397  folder=db.getFolder(folder_name)
398 
399  startUtime = int(time.time())
400  endUtime = int(time.time())
401  startValKey = startUtime * self.UNIX2COOL
402  endValKey = endUtime * self.UNIX2COOL
403  chsel = cool.ChannelSelection(0,sys.maxsize)
404 
405  try:
406  itr=folder.browseObjects(startValKey, endValKey, chsel)
407  except Exception as e:
408  print (e)
409  sys.exit(1)
410 
411  for row in itr:
412  ReceiverId = hex(int(row.channelId()))
413  payload = row.payload()
414  gain = payload['factor']
415  self.default_gains[ReceiverId]=gain
416 

Member Function Documentation

◆ getGoodGains()

def mergeEnergyRamps.GainsFromOracle.getGoodGains (   self)

Definition at line 417 of file mergeEnergyRamps.py.

417  def getGoodGains(self):
418  return self.default_gains
419 
420 

Member Data Documentation

◆ default_gains

mergeEnergyRamps.GainsFromOracle.default_gains

Definition at line 383 of file mergeEnergyRamps.py.

◆ UNIX2COOL

mergeEnergyRamps.GainsFromOracle.UNIX2COOL

Definition at line 384 of file mergeEnergyRamps.py.


The documentation for this class was generated from the following file:
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18