4 """Read geometry parameters for Pixel
6 dbGeomCursor: AtlasGeoDBInterface instance
11 dbId, dbSwitches, dbParam = dbGeomCursor.GetCurrentLeafContent(
"PixelSwitches")
13 params = {
"VersionName" :
"UNDEFINED",
14 "Layout" :
"UNDEFINED",
19 if "VERSIONNAME" in dbParam:
20 params[
"VersionName"] = dbSwitches[key][dbParam.index(
"VERSIONNAME")]
21 if "LAYOUT" in dbParam :
22 params[
"Layout"] = dbSwitches[key][dbParam.index(
"LAYOUT")]
23 if "BUILDDBM" in dbParam :
24 params[
"DBM"] = (dbSwitches[key][dbParam.index(
"BUILDDBM")] != 0)
29 params[
"IBL"] = (params[
"Layout"] ==
"IBL")
30 params[
"IBLlayout"] =
"noIBL"
33 dbId, dbLayers, dbParam = dbGeomCursor.GetCurrentLeafContent(
"PixelLayer")
39 if "STAVEINDEX" in dbParam
and dbLayers[key][dbParam.index(
"STAVEINDEX")]
not in [
"NULL",
None]:
40 IBLStaveIndex =
int(dbLayers[key][dbParam.index(
"STAVEINDEX")])
42 if IBLStaveIndex > -1:
43 dbId, dbStaves, dbParam = dbGeomCursor.GetCurrentLeafContent(
"PixelStave")
45 if dbId
and IBLStaveIndex <= len(dbStaves.keys()):
46 key = dbId[IBLStaveIndex]
47 if "LAYOUT" in dbParam
and dbStaves[key][dbParam.index(
"LAYOUT")]
not in [
"NULL",
None]:
48 IBLgeoLayout =
int(dbStaves[key][dbParam.index(
"LAYOUT")])
49 if IBLgeoLayout
in [3,4] : params[
"IBLlayout"] =
"planar"
50 elif IBLgeoLayout
in [5] : params[
"IBLlayout"] =
"3D"
55 """Read geometry parameters for Pixel from SQLite
57 sqliteDbReader: AtlasGeoDBInterface_SQLite instance
62 dbData = sqliteDbReader.GetData(
"PixelSwitches")
64 params = {
"VersionName" :
"UNDEFINED",
65 "Layout" :
"UNDEFINED",
69 if "VERSIONNAME" in dbData[0].
keys():
70 params[
"VersionName"] = dbData[0][
"VERSIONNAME"]
71 if "LAYOUT" in dbData[0].
keys():
72 params[
"Layout"] = dbData[0][
"LAYOUT"]
73 if "BUILDDBM" in dbData[0].
keys():
74 params[
"DBM"] = (dbData[0][
"BUILDDBM"] != 0)
79 params[
"IBL"] = (params[
"Layout"] ==
"IBL")
80 params[
"IBLlayout"] =
"noIBL"
83 dbData = sqliteDbReader.GetData(
"PixelLayer")
88 if "STAVEINDEX" in dbData[0].
keys()
and dbData[0][
"STAVEINDEX"]
not in [
"NULL",
None]:
89 IBLStaveIndex =
int(dbData[0][
"STAVEINDEX"])
91 if IBLStaveIndex > -1:
92 dbData = sqliteDbReader.GetData(
"PixelStave")
93 if dbData
and IBLStaveIndex <= len(dbData):
94 if "LAYOUT" in dbData[IBLStaveIndex].
keys()
and dbData[IBLStaveIndex][
"LAYOUT"]
not in [
"NULL",
None]:
95 IBLgeoLayout =
int(dbData[IBLStaveIndex][
"LAYOUT"])
96 if IBLgeoLayout
in [3,4] : params[
"IBLlayout"] =
"planar"
97 elif IBLgeoLayout
in [5] : params[
"IBLlayout"] =
"3D"