Definition at line 109 of file AtlRunQueryUtils.py.
◆ __init__()
def python.utils.AtlRunQueryUtils.DBConnectionController.__init__ |
( |
|
self | ) |
|
◆ CloseAll()
def python.utils.AtlRunQueryUtils.DBConnectionController.CloseAll |
( |
|
self | ) |
|
Definition at line 180 of file AtlRunQueryUtils.py.
181 for (dbname,dbconn)
in self.openConn.
items():
182 if isinstance(dbconn,cx_Oracle.Connection):
185 dbconn.closeDatabase()
◆ get_auth()
def python.utils.AtlRunQueryUtils.DBConnectionController.get_auth |
( |
|
self, |
|
|
|
key |
|
) |
| |
Definition at line 135 of file AtlRunQueryUtils.py.
135 def get_auth(self,key):
136 if key
not in self.pw:
137 from os
import environ
as env
143 auth = XMLReader(env[
'CORAL_AUTH_PATH']+
"/authentication.xml")
144 for c
in auth.connectionlist.connections:
147 self.pw[key] = dict([(p[
'name'],p[
'value'])
for p
in c.parameters])
149 if key
not in self.pw:
150 print (
"Can not authenticate DB",key)
◆ GetAtlasRunDBConnection()
def python.utils.AtlRunQueryUtils.DBConnectionController.GetAtlasRunDBConnection |
( |
|
self | ) |
|
Definition at line 155 of file AtlRunQueryUtils.py.
155 def GetAtlasRunDBConnection(self):
156 if 'run' not in self.openConn:
157 auth = self.get_auth(
'oracle://ATLAS_COOLPROD/ATLAS_COOLOFL_TRIGGER')
158 self.openConn[
'run'] = cx_Oracle.connect(
"%s/%s@ATLAS_COOLPROD" % (auth[
'user'],auth[
'password']))
159 return self.openConn[
'run']
◆ GetDBConn()
def python.utils.AtlRunQueryUtils.DBConnectionController.GetDBConn |
( |
|
self, |
|
|
|
schema, |
|
|
|
db |
|
) |
| |
for example schema=COOLONL_TRIGGER', db='CONDBR2
Definition at line 114 of file AtlRunQueryUtils.py.
114 def GetDBConn(self, schema, db):
115 """for example schema=COOLONL_TRIGGER', db='CONDBR2"""
116 if (schema,db)
in self.openConn:
117 return self.openConn[(schema,db)]
119 if schema==
"DEFECTS":
122 defdb = DQDefects.DefectsDB(
"COOLOFL_GLOBAL/CONDBR2",tag=db)
123 defdb.closeDatabase =
lambda:
None
124 self.openConn[(schema,db)] = defdb
127 from CoolConvUtilities.AtlCoolLib
import indirectOpen
128 self.openConn[(schema,db)] =
indirectOpen(
"%s/%s"%(schema,db),
True, logging)
131 traceback.print_exc()
133 return self.openConn[(schema,db)]
◆ GetPVSSDBConnection()
def python.utils.AtlRunQueryUtils.DBConnectionController.GetPVSSDBConnection |
( |
|
self | ) |
|
Definition at line 174 of file AtlRunQueryUtils.py.
174 def GetPVSSDBConnection(self):
175 if 'pvss' not in self.openConn:
176 auth = self.get_auth(
'oracle://ATLAS_PVSSPROD/ATLAS_PVSS_READER')
177 self.openConn[
'pvss'] = cx_Oracle.connect(
"%s/%s@ATLAS_PVSSPROD" % (auth[
'user'],auth[
'password']))
178 return self.openConn[
'pvss']
◆ GetSFODBConnection()
def python.utils.AtlRunQueryUtils.DBConnectionController.GetSFODBConnection |
( |
|
self | ) |
|
Definition at line 161 of file AtlRunQueryUtils.py.
161 def GetSFODBConnection(self):
162 if 'sfo' not in self.openConn:
163 auth = self.get_auth(
'oracle://ATLAS_CONFIG/ATLAS_SFO_T0_R')
164 with timer(
"Opening Connection to ATLAS_SFO_T0_R @ ATLAS_CONFIG"):
165 self.openConn[
'sfo'] = cx_Oracle.connect(
"%s/%s@ATLAS_CONFIG" % (auth[
'user'],auth[
'password']))
166 return self.openConn[
'sfo']
◆ GetTier0DBConnection()
def python.utils.AtlRunQueryUtils.DBConnectionController.GetTier0DBConnection |
( |
|
self | ) |
|
Definition at line 168 of file AtlRunQueryUtils.py.
168 def GetTier0DBConnection(self):
169 if 'tier0' not in self.openConn:
170 auth = self.get_auth(
'oracle://ATLAS_T0/ATLAS_T0')
171 self.openConn[
'tier0'] = cx_Oracle.connect(
"%s/%s@ATLAS_T0" % (auth[
'user'],auth[
'password']))
172 return self.openConn[
'tier0']
◆ openConn
python.utils.AtlRunQueryUtils.DBConnectionController.openConn |
◆ pw
python.utils.AtlRunQueryUtils.DBConnectionController.pw |
The documentation for this class was generated from the following file: