#=== set database db = TileCalibTools.openDbConn(schema, 'READONLY') folderTag = TileCalibTools.getFolderTag(db if 'CONDBR2' in schema else schema, folderPath, tag) log.info("Initializing folder %s with tag %s", folderPath, folderTag) #=== create bad channel manager mgr = TileBchTools.TileBchMgr() mgr.setLogLvl(logLevel) mgr.initialize(db, folderPath, folderTag, (run, lumi), warn, -2) if iov or comment or warn < 0: blobReader = TileCalibTools.TileBlobReader(db, folderPath, folderTag) #=== Dump the current isBad definition isBadDef = mgr.getAdcProblems(0, TileCalibUtils.definitions_draweridx(), TileCalibUtils.bad_definition_chan(), 0) if len(list(isBadDef.keys())): log.info("isBad Definition: ") for prbCode in sorted(isBadDef.keys()): prbDesc = isBadDef[prbCode] msg = "- %2i (%s)" % (prbCode, prbDesc) log.info(msg) #=== Dump the current isBadTiming definition isBadTimingDef = mgr.getAdcProblems(0, TileCalibUtils.definitions_draweridx(), TileCalibUtils.badtiming_definition_chan(), 0) if len(list(isBadTimingDef.keys())): log.info("isBadTiming Definition: ") for prbCode in sorted(isBadTimingDef.keys()): prbDesc = isBadTimingDef[prbCode] msg = "- %2i (%s)" % (prbCode, prbDesc)
def getBadDefinition(self): """ Returns bad status definition """ return self.getAdcStatus(0, TileCalibUtils.definitions_draweridx(), TileCalibUtils.bad_definition_chan(), 0)