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

Functions

 usage ()

Variables

str letters = "hr:l:s:t:f:dBHPwm:b:e:a:g:c:N:X:CiI"
list keywords = ["help","run=","lumi=","schema=","tag=","folder=","default","blob","hex","pmt","warning","module=","begin=","end=","chmin=","chmax=","gain=","adc=","chan=","comment","iov","IOV"]
 opts
 extraparams
int run = 2147483647
int lumi = 0
str schema = 'CREST'
str folderPath = "/TILE/OFL02/STATUS/ADC"
str tag = "UPD4"
int rosmin = 1
int rosmax = 5
bool blob = False
bool hexid = False
bool pmt = False
int warn = 1
int modmin = 0
int modmax = 99999
str modulename = "AUX-1"
str partname = ""
bool one_mod = False
int mod = -1
int ros = -1
int chan_n = -1
int chanmin = -1
int chanmax = -1
int gain_n = -1
int gainmin = -1
int gainmax = -1
int begin = -1
int end = 2147483647
bool iov = False
bool iovonly = False
bool IOVONLY = False
bool comment = False
 a = a.strip()
 log = getLogger("ReadBchFrCrest")
 logLevel = logging.DEBUG
 log1 = getLogger("TileBchCrest")
 log2 = getLogger("TileCalibCrest")
str folderTag = tag
 mgr = TileBchCrest.TileBchMgr()
 blobReader = mgr.getBlobReader()
 isBadDef = mgr.getAdcProblems(0, TileCalibUtils.definitions_draweridx(), TileCalibUtils.bad_definition_chan(), 0)
 prbDesc = isBadDef[prbCode]
str msg = "- %2i (%s)" % (prbCode,prbDesc)
 isBadTimingDef = mgr.getAdcProblems(0, TileCalibUtils.definitions_draweridx(), TileCalibUtils.badtiming_definition_chan(), 0)
dict part_dict = {'AUX':0,'LBA':1,'LBC':2,'EBA':3,'EBC':4}
list iovList = []
list be = iovList[0][0]
list en = iovList[-1][0]
int option = 1 if iovonly else 0
list dummy = [0]*48
 channel2pmt negative means not connected !
list barrel
list extbar
list ch2pmt = [ dummy, barrel, barrel, extbar, extbar ]
list gname = [ "LG", "HG" ]
tuple oneModule = ((rosmax-rosmin==1) and (modmax-modmin==1) and iov)
 oldBlob = None
str pref = ""
bool modOk = False
int miss = 0
int good = 0
int aff = 0
int bad = 0
int nMod = 0
str modName = "0x%x" % ((ros<<8)+mod)
 newBlob = blobReader.getBlob(ros, mod, iovs, False)
 bch = blobReader.getDrawer(ros, mod, iovs, False, False)
int nBad = 0
str chnName = " %2i" % chn
 stat = mgr.getAdcStatus(ros,mod,chn,adc)
 prbs = mgr.getAdcProblems(ros,mod,chn,adc)

Function Documentation

◆ usage()

ReadBchFromCrest.usage ( )

Definition at line 15 of file ReadBchFromCrest.py.

15def usage():
16 print ("Usage: ",sys.argv[0]," [OPTION] ... ")
17 print ("Dumps the TileCal status bits from various schemas / folders")
18 print ("")
19 print ("-h, --help shows this help")
20 print ("-f, --folder= specify status folder to use ONL01 or OFL02, don't need to specify full path")
21 print ("-t, --tag= specify tag to use, f.i. UPD1 or UPD4 or full suffix like RUN2-HLT-UPD1-00")
22 print ("-r, --run= specify run number, by default uses latest iov")
23 print ("-l, --lumi= specify lumi block number, default is 0")
24 print ("-b, --begin= specify run number of first iov in multi-iov mode, by default uses very first iov")
25 print ("-e, --end= specify run number of last iov in multi-iov mode, by default uses latest iov")
26 print ("-m, --module= specify module to use, default is not set")
27 print ("-N, --chmin= specify minimal channel to use, default is 0")
28 print ("-X, --chmax= specify maximal channel to use, default is 47")
29 print ("-c, --chan= specify channel to use , default is all channels from chmin to chmax")
30 print ("-g, --gain=, -a, --adc= specify adc(gain) to use, default is 2 (i.e. both low and high gains)")
31 print ("-C, --comment print comment for every IOV")
32 print ("-i, --iov print IOVs only for every module")
33 print ("-I, --IOV print IOVs only")
34 print ("-d, --default print also default values stored in AUX01-AUX20")
35 print ("-B, --blob print additional blob info")
36 print ("-H, --hex print frag id instead of module name")
37 print ("-P, --pmt print pmt number in addition to channel number")
38 print ("-s, --schema= specify name of input JSON file or CREST_SERVER_PATH")
39 print ("-w, --warning suppress warning messages about missing drawers in DB")
40
StatusCode usage()

Variable Documentation

◆ a

ReadBchFromCrest.a = a.strip()

Definition at line 84 of file ReadBchFromCrest.py.

◆ aff

int ReadBchFromCrest.aff = 0

Definition at line 309 of file ReadBchFromCrest.py.

◆ bad

int ReadBchFromCrest.bad = 0

Definition at line 310 of file ReadBchFromCrest.py.

◆ barrel

list ReadBchFromCrest.barrel
Initial value:
1= [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
2 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3 27, 26, 25, 30, 29, 28,-33,-32, 31, 36, 35, 34,
4 39, 38, 37, 42, 41, 40, 45,-44, 43, 48, 47, 46]

Definition at line 277 of file ReadBchFromCrest.py.

◆ bch

ReadBchFromCrest.bch = blobReader.getDrawer(ros, mod, iovs, False, False)

Definition at line 331 of file ReadBchFromCrest.py.

◆ be

list ReadBchFromCrest.be = iovList[0][0]

Definition at line 245 of file ReadBchFromCrest.py.

◆ begin

list ReadBchFromCrest.begin = -1

Definition at line 76 of file ReadBchFromCrest.py.

◆ blob

bool ReadBchFromCrest.blob = False

Definition at line 59 of file ReadBchFromCrest.py.

◆ blobReader

ReadBchFromCrest.blobReader = mgr.getBlobReader()

Definition at line 177 of file ReadBchFromCrest.py.

◆ ch2pmt

list ReadBchFromCrest.ch2pmt = [ dummy, barrel, barrel, extbar, extbar ]

Definition at line 286 of file ReadBchFromCrest.py.

◆ chan_n

ReadBchFromCrest.chan_n = -1

Definition at line 70 of file ReadBchFromCrest.py.

◆ chanmax

int ReadBchFromCrest.chanmax = -1

Definition at line 72 of file ReadBchFromCrest.py.

◆ chanmin

int ReadBchFromCrest.chanmin = -1

Definition at line 71 of file ReadBchFromCrest.py.

◆ chnName

str ReadBchFromCrest.chnName = " %2i" % chn

Definition at line 342 of file ReadBchFromCrest.py.

◆ comment

bool ReadBchFromCrest.comment = False

Definition at line 81 of file ReadBchFromCrest.py.

◆ dummy

list ReadBchFromCrest.dummy = [0]*48

channel2pmt negative means not connected !

Definition at line 276 of file ReadBchFromCrest.py.

◆ en

list ReadBchFromCrest.en = iovList[-1][0]

Definition at line 246 of file ReadBchFromCrest.py.

◆ end

list ReadBchFromCrest.end = 2147483647

Definition at line 77 of file ReadBchFromCrest.py.

◆ extbar

list ReadBchFromCrest.extbar
Initial value:
1= [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
2 13, 14, 15, 16, 17, 18,-19,-20, 21, 22, 23, 24,
3 -27,-26,-25,-31,-32,-28, 33, 29, 30,-36,-35, 34,
4 44, 38, 37, 43, 42, 41,-45,-39,-40,-48,-47,-46]

Definition at line 281 of file ReadBchFromCrest.py.

◆ extraparams

ReadBchFromCrest.extraparams

Definition at line 45 of file ReadBchFromCrest.py.

◆ folderPath

str ReadBchFromCrest.folderPath = "/TILE/OFL02/STATUS/ADC"

Definition at line 55 of file ReadBchFromCrest.py.

◆ folderTag

str ReadBchFromCrest.folderTag = tag

Definition at line 167 of file ReadBchFromCrest.py.

◆ gain_n

ReadBchFromCrest.gain_n = -1

Definition at line 73 of file ReadBchFromCrest.py.

◆ gainmax

int ReadBchFromCrest.gainmax = -1

Definition at line 75 of file ReadBchFromCrest.py.

◆ gainmin

int ReadBchFromCrest.gainmin = -1

Definition at line 74 of file ReadBchFromCrest.py.

◆ gname

list ReadBchFromCrest.gname = [ "LG", "HG" ]

Definition at line 287 of file ReadBchFromCrest.py.

◆ good

int ReadBchFromCrest.good = 0

Definition at line 308 of file ReadBchFromCrest.py.

◆ hexid

bool ReadBchFromCrest.hexid = False

Definition at line 60 of file ReadBchFromCrest.py.

◆ iov

bool ReadBchFromCrest.iov = False

Definition at line 78 of file ReadBchFromCrest.py.

◆ iovList

ReadBchFromCrest.iovList = []

Definition at line 236 of file ReadBchFromCrest.py.

◆ IOVONLY

bool ReadBchFromCrest.IOVONLY = False

Definition at line 80 of file ReadBchFromCrest.py.

◆ iovonly

bool ReadBchFromCrest.iovonly = False

Definition at line 79 of file ReadBchFromCrest.py.

◆ isBadDef

ReadBchFromCrest.isBadDef = mgr.getAdcProblems(0, TileCalibUtils.definitions_draweridx(), TileCalibUtils.bad_definition_chan(), 0)

Definition at line 180 of file ReadBchFromCrest.py.

◆ isBadTimingDef

ReadBchFromCrest.isBadTimingDef = mgr.getAdcProblems(0, TileCalibUtils.definitions_draweridx(), TileCalibUtils.badtiming_definition_chan(), 0)

Definition at line 188 of file ReadBchFromCrest.py.

◆ keywords

list ReadBchFromCrest.keywords = ["help","run=","lumi=","schema=","tag=","folder=","default","blob","hex","pmt","warning","module=","begin=","end=","chmin=","chmax=","gain=","adc=","chan=","comment","iov","IOV"]

Definition at line 42 of file ReadBchFromCrest.py.

◆ letters

str ReadBchFromCrest.letters = "hr:l:s:t:f:dBHPwm:b:e:a:g:c:N:X:CiI"

Definition at line 41 of file ReadBchFromCrest.py.

◆ log

ReadBchFromCrest.log = getLogger("ReadBchFrCrest")

Definition at line 150 of file ReadBchFromCrest.py.

◆ log1

ReadBchFromCrest.log1 = getLogger("TileBchCrest")

Definition at line 154 of file ReadBchFromCrest.py.

◆ log2

ReadBchFromCrest.log2 = getLogger("TileCalibCrest")

Definition at line 156 of file ReadBchFromCrest.py.

◆ logLevel

ReadBchFromCrest.logLevel = logging.DEBUG

Definition at line 152 of file ReadBchFromCrest.py.

◆ lumi

ReadBchFromCrest.lumi = 0

Definition at line 53 of file ReadBchFromCrest.py.

◆ mgr

ReadBchFromCrest.mgr = TileBchCrest.TileBchMgr()

Definition at line 173 of file ReadBchFromCrest.py.

◆ miss

int ReadBchFromCrest.miss = 0

Definition at line 307 of file ReadBchFromCrest.py.

◆ mod

int ReadBchFromCrest.mod = -1

Definition at line 68 of file ReadBchFromCrest.py.

◆ modmax

int ReadBchFromCrest.modmax = 99999

Definition at line 64 of file ReadBchFromCrest.py.

◆ modmin

int ReadBchFromCrest.modmin = 0

Definition at line 63 of file ReadBchFromCrest.py.

◆ modName

ReadBchFromCrest.modName = "0x%x" % ((ros<<8)+mod)

Definition at line 316 of file ReadBchFromCrest.py.

◆ modOk

bool ReadBchFromCrest.modOk = False

Definition at line 306 of file ReadBchFromCrest.py.

◆ modulename

str ReadBchFromCrest.modulename = "AUX-1"

Definition at line 65 of file ReadBchFromCrest.py.

◆ msg

str ReadBchFromCrest.msg = "- %2i (%s)" % (prbCode,prbDesc)

Definition at line 185 of file ReadBchFromCrest.py.

◆ nBad

int ReadBchFromCrest.nBad = 0

Definition at line 340 of file ReadBchFromCrest.py.

◆ newBlob

ReadBchFromCrest.newBlob = blobReader.getBlob(ros, mod, iovs, False)

Definition at line 320 of file ReadBchFromCrest.py.

◆ nMod

int ReadBchFromCrest.nMod = 0

Definition at line 311 of file ReadBchFromCrest.py.

◆ oldBlob

ReadBchFromCrest.oldBlob = None

Definition at line 298 of file ReadBchFromCrest.py.

◆ one_mod

bool ReadBchFromCrest.one_mod = False

Definition at line 67 of file ReadBchFromCrest.py.

◆ oneModule

tuple ReadBchFromCrest.oneModule = ((rosmax-rosmin==1) and (modmax-modmin==1) and iov)

Definition at line 297 of file ReadBchFromCrest.py.

◆ option

int ReadBchFromCrest.option = 1 if iovonly else 0

Definition at line 263 of file ReadBchFromCrest.py.

◆ opts

ReadBchFromCrest.opts

Definition at line 45 of file ReadBchFromCrest.py.

◆ part_dict

dict ReadBchFromCrest.part_dict = {'AUX':0,'LBA':1,'LBC':2,'EBA':3,'EBC':4}

Definition at line 202 of file ReadBchFromCrest.py.

◆ partname

str ReadBchFromCrest.partname = ""

Definition at line 66 of file ReadBchFromCrest.py.

◆ pmt

bool ReadBchFromCrest.pmt = False

Definition at line 61 of file ReadBchFromCrest.py.

◆ prbDesc

ReadBchFromCrest.prbDesc = isBadDef[prbCode]

Definition at line 184 of file ReadBchFromCrest.py.

◆ prbs

ReadBchFromCrest.prbs = mgr.getAdcProblems(ros,mod,chn,adc)

Definition at line 351 of file ReadBchFromCrest.py.

◆ pref

str ReadBchFromCrest.pref = ""

Definition at line 299 of file ReadBchFromCrest.py.

◆ ros

int ReadBchFromCrest.ros = -1

Definition at line 69 of file ReadBchFromCrest.py.

◆ rosmax

int ReadBchFromCrest.rosmax = 5

Definition at line 58 of file ReadBchFromCrest.py.

◆ rosmin

int ReadBchFromCrest.rosmin = 1

Definition at line 57 of file ReadBchFromCrest.py.

◆ run

ReadBchFromCrest.run = 2147483647

Definition at line 52 of file ReadBchFromCrest.py.

◆ schema

ReadBchFromCrest.schema = 'CREST'

Definition at line 54 of file ReadBchFromCrest.py.

◆ stat

ReadBchFromCrest.stat = mgr.getAdcStatus(ros,mod,chn,adc)

Definition at line 345 of file ReadBchFromCrest.py.

◆ tag

str ReadBchFromCrest.tag = "UPD4"

Definition at line 56 of file ReadBchFromCrest.py.

◆ warn

int ReadBchFromCrest.warn = 1

Definition at line 62 of file ReadBchFromCrest.py.