ATLAS Offline Software
Loading...
Searching...
No Matches
TileCalibBlobPython_writeBchFromASCII Namespace Reference

Functions

 fillBadChannels (db, tag, bchFile, since, until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK))

Variables

 log = getLogger("writeBch")
 db = TileCalibTools.openDb('SQLITE', 'CONDBR2', 'UPDATE')
str tag = "TileOfl02StatusAdc-RUN2-UPD4-08"
 tag = ""

Function Documentation

◆ fillBadChannels()

TileCalibBlobPython_writeBchFromASCII.fillBadChannels ( db,
tag,
bchFile,
since,
until = (TileCalibTools.MAXRUN,TileCalibTools.MAXLBK) )

Definition at line 21 of file TileCalibBlobPython_writeBchFromASCII.py.

22 since, until=(TileCalibTools.MAXRUN,TileCalibTools.MAXLBK)):
23
24 #=== ADC status folder (write to ONLINE from M7 onwards!)
25
26 folder="/TILE/OFL02/STATUS/ADC"
27 #=== create bad channel manager
28 mgr = TileBchTools.TileBchMgr()
29 mgr.setLogLvl(logging.DEBUG)
30
31 #=== always initialize with no bad channels
32 log.info("Initializing with no bad channels at tag=%s and time=%s", tag,(0,0))
33 mgr.initialize(db, folder, tag, since)
34
35 #=== update from file
36 log.info("Updating from file %s", bchFile)
37 mgr.updateFromFile(bchFile)
38
39 #=== add definition for TileBchStatus::isBad from online side
40 #mgr.addAdcProblem(0, 1, 0,0, TileBchPrbs.IgnoredInDsp)
41 #mgr.addAdcProblem(0, 1, 0,1, TileBchPrbs.IgnoredInDsp)
42
43 #=== print bad channels
44 log.info("bad channels after update")
45 mgr.listBadAdcs()
46
47 #=== commit changes
48 #--- to ONLINE folder, i.e. tag="" and using onl01 bit pattern
49
50 mgr.commitToDb(db, folder, tag, TileBchDecoder.BitPat_ofl01, os.getlogin(), bchFile, since, until)
51
52
53
54#===================================================================
55#====================== FILL DB BELOW ==============================
56#===================================================================

Variable Documentation

◆ db

TileCalibBlobPython_writeBchFromASCII.db = TileCalibTools.openDb('SQLITE', 'CONDBR2', 'UPDATE')

Definition at line 57 of file TileCalibBlobPython_writeBchFromASCII.py.

◆ log

TileCalibBlobPython_writeBchFromASCII.log = getLogger("writeBch")

Definition at line 14 of file TileCalibBlobPython_writeBchFromASCII.py.

◆ tag

str TileCalibBlobPython_writeBchFromASCII.tag = "TileOfl02StatusAdc-RUN2-UPD4-08"

tag = ""

Definition at line 59 of file TileCalibBlobPython_writeBchFromASCII.py.