9 from TileCalibBlobPython
import TileCalibTools
10 from TileCalibBlobPython
import TileBchTools
11 from TileCalibBlobObjs.Classes
import TileBchPrbs, TileBchDecoder
13 from TileCalibBlobPython.TileCalibLogger
import getLogger
16 log.setLevel(logging.DEBUG)
22 db = TileCalibTools.openDb(
'SQLITE',
'COMP200',
'UPDATE')
25 folder = TileCalibTools.getTilePrefix(ofl=
False)+
"STATUS/ADC"
31 mgr = TileBchTools.TileBchMgr()
32 mgr.setLogLvl(logging.DEBUG)
44 log.info(
"Initializing with online bad channels at time=%s", (99000,0))
45 mgr.initialize(db, folder, folderTag, (99000,0))
50 for i
in range(0, 48):
51 mgr.delAdcProblem(p, d, i, 0, TileBchPrbs.IgnoredInHlt)
52 mgr.delAdcProblem(p, d, i, 1, TileBchPrbs.IgnoredInHlt)
55 emptyChannelLongBarrel = (30, 31, 43)
56 emptyChannelExtendedBarrel = (18, 19, 24, 25, 26, 27, 28, 29, 33, 34, 42, 43, 44, 45, 46, 47)
57 emptyChannelSpecialExtendedBarrel = (0, 1, 2, 3, 24, 25, 26, 27, 28, 29, 33, 34, 42, 43, 44, 45, 46, 47)
61 for i
in range(30, 36):
62 if i
not in emptyChannelLongBarrel:
63 mgr.addAdcProblem(1, 10, i, 0, TileBchPrbs.IgnoredInHlt)
64 mgr.addAdcProblem(1, 10, i, 1, TileBchPrbs.IgnoredInHlt)
65 mgr.addAdcProblem(1, 17, 38, 0, TileBchPrbs.IgnoredInHlt)
66 for i
in range(0, 48):
67 if i
not in emptyChannelLongBarrel:
68 mgr.addAdcProblem(1, 52, i, 0, TileBchPrbs.IgnoredInHlt)
69 mgr.addAdcProblem(1, 52, i, 1, TileBchPrbs.IgnoredInHlt)
70 mgr.addAdcProblem(1, 56, 21, 0, TileBchPrbs.IgnoredInHlt)
71 mgr.addAdcProblem(1, 56, 21, 1, TileBchPrbs.IgnoredInHlt)
78 mgr.addAdcProblem(2, 14, 19, 0, TileBchPrbs.IgnoredInHlt)
79 mgr.addAdcProblem(2, 14, 19, 1, TileBchPrbs.IgnoredInHlt)
80 for i
in range(42, 48):
81 if i
not in emptyChannelLongBarrel:
82 mgr.addAdcProblem(2, 19, i, 0, TileBchPrbs.IgnoredInHlt)
83 mgr.addAdcProblem(2, 19, i, 1, TileBchPrbs.IgnoredInHlt)
84 mgr.addAdcProblem(2, 23, 42, 0, TileBchPrbs.IgnoredInHlt)
85 mgr.addAdcProblem(2, 23, 42, 1, TileBchPrbs.IgnoredInHlt)
86 mgr.addAdcProblem(2, 26, 46, 0, TileBchPrbs.IgnoredInHlt)
87 mgr.addAdcProblem(2, 46, 44, 0, TileBchPrbs.IgnoredInHlt)
88 for i
in range(15, 18):
89 if i
not in emptyChannelLongBarrel:
90 mgr.addAdcProblem(2, 63, i, 0, TileBchPrbs.IgnoredInHlt)
91 mgr.addAdcProblem(2, 63, i, 1, TileBchPrbs.IgnoredInHlt)
95 mgr.addAdcProblem(3, 24, 15, 0, TileBchPrbs.IgnoredInHlt)
96 mgr.addAdcProblem(3, 24, 15, 1, TileBchPrbs.IgnoredInHlt)
97 for i
in range(21, 24):
98 if i
not in emptyChannelExtendedBarrel:
99 mgr.addAdcProblem(3, 43, i, 0, TileBchPrbs.IgnoredInHlt)
100 mgr.addAdcProblem(3, 43, i, 1, TileBchPrbs.IgnoredInHlt)
102 mgr.addAdcProblem(3, 54, 14, 0, TileBchPrbs.IgnoredInHlt)
103 mgr.addAdcProblem(3, 54, 14, 1, TileBchPrbs.IgnoredInHlt)
106 mgr.addAdcProblem(4, 8, 0, 0, TileBchPrbs.IgnoredInHlt)
107 mgr.addAdcProblem(4, 8, 0, 1, TileBchPrbs.IgnoredInHlt)
108 mgr.addAdcProblem(4, 12, 6, 0, TileBchPrbs.IgnoredInHlt)
109 mgr.addAdcProblem(4, 12, 7, 0, TileBchPrbs.IgnoredInHlt)
110 mgr.addAdcProblem(4, 12, 8, 0, TileBchPrbs.IgnoredInHlt)
111 mgr.addAdcProblem(4, 17, 4, 0, TileBchPrbs.IgnoredInHlt)
112 mgr.addAdcProblem(4, 17, 4, 1, TileBchPrbs.IgnoredInHlt)
113 mgr.addAdcProblem(4, 33, 0, 1, TileBchPrbs.IgnoredInHlt)
114 mgr.addAdcProblem(4, 36, 40, 0, TileBchPrbs.IgnoredInHlt)
115 mgr.addAdcProblem(4, 36, 40, 1, TileBchPrbs.IgnoredInHlt)
121 mgr.addAdcProblem(4, 47, 35, 0, TileBchPrbs.IgnoredInHlt)
122 mgr.addAdcProblem(4, 47, 35, 1, TileBchPrbs.IgnoredInHlt)
130 log.info(
"bad channels after update")
134 mgr.commitToDb(db, folder, folderTag, TileBchDecoder.BitPat_onl01,
"lfiorini",
"writing online bch 2008-07-11", (76480,0))