9 from TileCalibBlobPython
import TileCalibTools
10 from TileCalibBlobPython
import TileCalibDefaultWriter
11 from TileCalibBlobPython
import TileBchTools
12 from TileCalibBlobObjs.Classes
import TileBchPrbs, TileBchDecoder
17 mgr = TileBchTools.TileBchMgr()
19 mgr.setLogLvl(logging.INFO)
24 folder =
"/TILE/OFL02/STATUS/ADC"
25 db = TileCalibTools.openDb(
'SQLITE',
'CONDBR2',
'UPDATE')
26 tag =
"TileOfl02StatusAdc-RUN2-UPD4-08"
28 if not db.existsFolder(folder):
29 defaultWriter = TileCalibDefaultWriter.TileCalibDefaultWriter(db)
30 defaultWriter.writeBadChannels(tag)
35 mgr.initialize(db, folder, tag, (191714,0))
47 prbs = [TileBchPrbs.LargeHfNoise, TileBchPrbs.NoCis]
48 mgr.setAdcProblems(4,63,14,1,prbs)
49 mgr.addAdcProblem( 4,63,14,1,TileBchPrbs.StuckBit )
50 mgr.addAdcProblem( 4,63,14,1,TileBchPrbs.NoHV )
51 mgr.addAdcProblem( 4,63,14,1,TileBchPrbs.NoCis )
53 mgr.setAdcProblems(1,0,14,1,prbs)
54 mgr.addAdcProblem( 1,0,14,1,TileBchPrbs.StuckBit )
55 mgr.addAdcProblem( 1,0,14,1,TileBchPrbs.NoHV )
56 mgr.addAdcProblem( 1,0,14,1,TileBchPrbs.NoCis )
60 mgr.delAdcProblem( 4,62,13,1,TileBchPrbs.AdcDead )
61 mgr.delAdcProblem( 4,62,14,1,TileBchPrbs.StuckBit )
72 author = os.getlogin()
73 comment =
"testing bad channels in LBA01, EBC64"
75 mgr.commitToDb(db, folder, tag, TileBchDecoder.BitPat_ofl01, author, comment, since)