Definition at line 235 of file AtlasGeoDBInterface.py.
◆ __init__()
def python.AtlasGeoDBInterface.AtlasGeoDBInterface_SQLite.__init__ |
( |
|
self, |
|
|
|
geoTag, |
|
|
|
sqliteDBFullPath, |
|
|
|
verbose = False |
|
) |
| |
Definition at line 237 of file AtlasGeoDBInterface.py.
237 def __init__(self,geoTag,sqliteDBFullPath,verbose=False):
240 self.bVerbose=verbose
243 self.dbFile=sqliteDBFullPath
245 from AthenaCommon.Utils.unixtools
import find_datafile
246 pathlist = os.getenv(
'CALIBPATH').
split(os.pathsep)
◆ ConnectToDB()
def python.AtlasGeoDBInterface.AtlasGeoDBInterface_SQLite.ConnectToDB |
( |
|
self | ) |
|
Definition at line 249 of file AtlasGeoDBInterface.py.
249 def ConnectToDB(self):
252 self.db=sqlite3.connect(self.dbFile)
253 except Exception
as e:
254 Logging.log.fatal(f
'Failed to open SQLite database {self.dbFile}. {e}')
255 Logging.log.debug(f
'Connected to SQLite database {self.dbFile}')
◆ GetData()
def python.AtlasGeoDBInterface.AtlasGeoDBInterface_SQLite.GetData |
( |
|
self, |
|
|
|
tableName |
|
) |
| |
Definition at line 257 of file AtlasGeoDBInterface.py.
257 def GetData(self,tableName):
261 querystring =
"SELECT tbl_name FROM sqlite_master WHERE type='table' AND tbl_name='"+tableName+
"'"
262 cur.execute(querystring)
263 checkTable = cur.fetchall()
264 if len(checkTable)==0:
265 Logging.log.info(f
'Table {tableName} not found in the SQLite DB. Falling back on the default config')
270 querystring =
"SELECT * FROM "+tableName+
" order by "+tableName+
"_data_id"
271 cur.execute(querystring)
272 rows = cur.fetchall()
274 ncols=len(cur.description)
278 for i
in range(1,ncols):
279 dbDataRow[cur.description[i][0]]=row[i]
280 Logging.log.debug(f
'Fetched Data Row for {tableName}')
281 Logging.log.debug(f
'{dbDataRow}')
282 dbData.append(dbDataRow)
◆ bVerbose
python.AtlasGeoDBInterface.AtlasGeoDBInterface_SQLite.bVerbose |
◆ db
python.AtlasGeoDBInterface.AtlasGeoDBInterface_SQLite.db |
◆ dbFile
python.AtlasGeoDBInterface.AtlasGeoDBInterface_SQLite.dbFile |
The documentation for this class was generated from the following file: