4 """Read version name, layout and dbm from AtlasCommon table.
6 dbGeomCursor: AtlasGeoDBInterface instance
9 dbId, dbCommon, dbParam = dbGeomCursor.GetCurrentLeafContent(
"AtlasCommon")
11 params = {
"Run" :
"UNDEFINED",
12 "GeoType" :
"UNDEFINED"}
16 if "CONFIG" in dbParam :
17 params[
"Run"] = dbCommon[key][dbParam.index(
"CONFIG")]
18 if "GEOTYPE" in dbParam :
19 params[
"GeoType"] = dbCommon[key][dbParam.index(
"GEOTYPE")]
24 """Read version name, layout and dbm from AtlasCommon table in SQLite
26 sqliteDbReader: AtlasGeoDBInterface_SQLite instance
29 dbData = sqliteDbReader.GetData(
"AtlasCommon")
31 params = {
"Run" :
"UNDEFINED",
32 "GeoType" :
"UNDEFINED"}
35 if "CONFIG" in dbData[0].
keys():
36 params[
"Run"] = dbData[0][
"CONFIG"]
37 if "GEOTYPE" in dbData[0].
keys():
38 params[
"GeoType"] = dbData[0][
"GEOTYPE"]
44 """Read luminosity detectors from the DB
46 dbGeomCursor: AtlasGeoDBInterface instance
49 dbId, dbCommon, dbParam = dbGeomCursor.GetCurrentLeafContent(
"LuminositySwitches")
51 params = {
"BCMPrime" :
False,
56 if "BCMPRIME" in dbParam :
57 params[
"BCMPrime"] = dbCommon[key][dbParam.index(
"BCMPRIME")] == 1
59 params[
"PLR"] = dbCommon[key][dbParam.index(
"PLR")] == 1
64 """Read luminosity detectors from LuminositySwitches table in the SQLite DB
66 sqliteDbReader: AtlasGeoDBInterface_SQLite instance
69 dbData = sqliteDbReader.GetData(
"LuminositySwitches")
71 params = {
"BCMPrime" :
False,
75 if "BCMPRIME" in dbData[0].
keys():
76 params[
"BCMPrime"] = dbData[0][
"BCMPRIME"] == 1
77 if "PLR" in dbData[0].
keys():
78 params[
"PLR"] = dbData[0][
"PLR"] == 1
83 """ Configure the reading of local SQLite Geometry Database file
85 This process consists of three steps
86 1. It is necessary to create ./Geometry directory
87 2. Place in this directory a symlink to the geometryFilePath with the name 'geometryTag.db'
88 3. Prepend '.' to the CALIBPATH environment
92 if not os.path.exists(
"Geometry"):
95 except FileExistsError:
97 linkName = geometryTag +
".db"
98 linkPath = os.path.join(
"Geometry",linkName)
99 if not os.path.exists(linkPath):
100 os.symlink(geometryFilePath,linkPath)
101 if 'CALIBPATH' in os.environ.keys():
102 os.environ[
'CALIBPATH']=
'.:'+ os.environ[
'CALIBPATH']
104 os.environ[
'CALIBPATH']=
'.'