ATLAS Offline Software
Loading...
Searching...
No Matches
BchCleanup.py File Reference

Go to the source code of this file.

Namespaces

namespace  BchCleanup

Functions

 BchCleanup.usage ()
 BchCleanup.showAdcProblems (mgr, ros, mod)
 BchCleanup.formatIOV (iov)
 BchCleanup.writeMergedIOV (ros, mod, since, until)

Variables

str BchCleanup.letters = "ht:f:o:i"
list BchCleanup.keywords = ["help","tag=","folder=","outtag=","instance="]
 BchCleanup.opts
 BchCleanup.extraparams
str BchCleanup.instance = 'OFLP200'
str BchCleanup.folderPath = "/TILE/OFL02/STATUS/ADC"
str BchCleanup.tag = "OFLCOND-MC16-SDR-28"
str BchCleanup.outtag = "test"
 BchCleanup.a = a.strip()
 BchCleanup.log = getLogger("BchCleanup")
str BchCleanup.ischema = 'sqlite://;schema=bch-input-sqlite.db;dbname='+instance
str BchCleanup.oschema = 'sqlite://;schema=bch-output-sqlite.db;dbname='+instance
 BchCleanup.idb = TileCalibTools.openDbConn(ischema,'READONLY')
 BchCleanup.folderTag = TileCalibTools.getFolderTag(idb if 'CONDBR2' in ischema else ischema, folderPath, tag)
 BchCleanup.blobReader = TileCalibTools.TileBlobReader(idb,folderPath, folderTag)
str BchCleanup.outtagFull = 'TileOfl02StatusAdc-'+outtag
str BchCleanup.msg = 'AtlCoolCopy \"%s\" \"%s\" -folder /TILE/OFL02/STATUS/ADC -tag %s -outtag %s -ch1 0 -ch2 19 -create' % (ischema,oschema,folderTag,outtagFull)
 === Dump the current isBad definition isBadDef = mgr.getAdcProblems(0,1,0,0) log.info( "isBad Definition: " ) for prbCode in sorted(isBadDef.keys()): prbDesc = isBadDef[prbCode] msg = "- %2i (%s)" % (prbCode,prbDesc) log.info( msg ) log.info( "\n" )
int BchCleanup.rosinput = int(sys.argv[1]) if len(sys.argv)>1 else 0
int BchCleanup.rosmin = 1
int BchCleanup.rosmax = 5
 BchCleanup.modName = TileCalibUtils.getDrawerString(ros,mod)
 BchCleanup.dbobjs = blobReader.getDBobjsWithinRange(ros, mod)
 BchCleanup.mergedSince = None
int BchCleanup.iovCounter = 0
 BchCleanup.objPrev = None
 BchCleanup.blobPrev = None
 BchCleanup.calibDrawerPrev = None
int BchCleanup.runPrev = -1
int BchCleanup.lumPrev = -1
 BchCleanup.obj = dbobjs.currentRef()
 BchCleanup.objsince = obj.since()
 BchCleanup.objuntil = obj.until()
 BchCleanup.mergedUntil = objuntil
int BchCleanup.run = objsince >> 32
int BchCleanup.lum = objsince & 0xFFFFFFFF
 BchCleanup.blob = obj.payload()[0]
 BchCleanup.calibDrawer = None
str BchCleanup.tempRunLum = "Starting new IOV at: [%d,%d]" % (mergedSince>>32, mergedSince&0xffffffff)
 BchCleanup.bchDecoder = TileBchDecoder(calibDrawer.getBitPatternVersion())
 BchCleanup.mgr = TileBchTools.TileBchMgr()
bool BchCleanup.identical = True
int BchCleanup.sizelo = calibDrawerPrev.getObjSizeByte()//4
int BchCleanup.sizehi = calibDrawer.getObjSizeByte()//4
 BchCleanup.typelo = calibDrawerPrev.getObjType()
 BchCleanup.typehi = calibDrawer.getObjType()
 BchCleanup.adcBits = calibDrawer.getData(chn, adc, ind)
 BchCleanup.chnBits = calibDrawer.getData(chn, 2, ind)
 BchCleanup.status = TileBchStatus( bchDecoder.decode(chnBits,adcBits) )
 BchCleanup.statusPrev = TileBchStatus( bchDecoder.decode(chnBits,adcBits) )
 BchCleanup.adclo = calibDrawerPrev.getData(chn, adc, ind)
 BchCleanup.adchi = calibDrawer.getData(chn, adc, ind)
 BchCleanup.chnlo = calibDrawerPrev.getData(chn, 2, ind)
 BchCleanup.chnhi = calibDrawer.getData(chn, 2, ind)
 BchCleanup.diff = adclo - adchi + chnlo - chnhi