ATLAS Offline Software
Functions | Variables
TileCalibBlobPython_writeBchFromASCII Namespace Reference

Functions

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

Variables

 log
 
 db
 
 tag
 tag = "" More...
 

Function Documentation

◆ fillBadChannels()

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

Definition at line 21 of file TileCalibBlobPython_writeBchFromASCII.py.

21 def fillBadChannels(db ,tag, bchFile,
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

Definition at line 57 of file TileCalibBlobPython_writeBchFromASCII.py.

◆ log

TileCalibBlobPython_writeBchFromASCII.log

Definition at line 14 of file TileCalibBlobPython_writeBchFromASCII.py.

◆ tag

TileCalibBlobPython_writeBchFromASCII.tag

tag = ""

Definition at line 59 of file TileCalibBlobPython_writeBchFromASCII.py.

TileCalibBlobPython_writeBchFromASCII.fillBadChannels
def fillBadChannels(db, tag, bchFile, since, until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK))
Definition: TileCalibBlobPython_writeBchFromASCII.py:21