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

Functions

 dec2hex (n)

Variables

dict modToFrag
 inFile = sys.argv[1]
str buf = ""
 lines = open(inFile,"r").readlines()
 field = line.split(":")
 module = field[0][:3]
int modNum = int(field[0][3:]) - 1
 chan = int(field[1])
 type = field[2].strip()
dict hexModule = modToFrag[module] + dec2hex(modNum)
str lhstat = ""
 bchFile = open("Tile2007.bch","w")

Function Documentation

◆ dec2hex()

convertBadChannels.dec2hex ( n)

Definition at line 7 of file convertBadChannels.py.

7def dec2hex(n):
8 return ("0%X" % n)[-2:]
9
10
11#
12#__________________________________________________________________

Variable Documentation

◆ bchFile

convertBadChannels.bchFile = open("Tile2007.bch","w")

Definition at line 44 of file convertBadChannels.py.

◆ buf

str convertBadChannels.buf = ""

Definition at line 20 of file convertBadChannels.py.

◆ chan

convertBadChannels.chan = int(field[1])

Definition at line 28 of file convertBadChannels.py.

◆ field

convertBadChannels.field = line.split(":")

Definition at line 24 of file convertBadChannels.py.

◆ hexModule

dict convertBadChannels.hexModule = modToFrag[module] + dec2hex(modNum)

Definition at line 31 of file convertBadChannels.py.

◆ inFile

convertBadChannels.inFile = sys.argv[1]

Definition at line 18 of file convertBadChannels.py.

◆ lhstat

convertBadChannels.lhstat = ""

Definition at line 33 of file convertBadChannels.py.

◆ lines

convertBadChannels.lines = open(inFile,"r").readlines()

Definition at line 22 of file convertBadChannels.py.

◆ modNum

int convertBadChannels.modNum = int(field[0][3:]) - 1

Definition at line 27 of file convertBadChannels.py.

◆ modToFrag

dict convertBadChannels.modToFrag
Initial value:
1= {'LBA' : '0x1',
2 'LBC' : '0x2',
3 'EBA' : '0x3',
4 'EBC' : '0x4'}

Definition at line 13 of file convertBadChannels.py.

◆ module

convertBadChannels.module = field[0][:3]

Definition at line 26 of file convertBadChannels.py.

◆ type

convertBadChannels.type = field[2].strip()

Definition at line 29 of file convertBadChannels.py.