if there are two OH's and the mask 0x1 is used ohList will be [ 0 ] and adcX container (for X = 1, 2 or 3) will have len == 1 starting at 0. If 0x3 is used then ohList will be [ 0, 1]; adcX will have len == 2 and have indices 0 and 1.
However if mask 0x2 is used ohList will be [ 1 ] and adcX container will have len == 1 starting at index 0. So this will generate an IndexError.
Steps to Reproduce (for bugs)
Have at least one OHv3, then
Place this OHv3 on link 1, then
Call sca.py eagle63 0x2 sysmon
Possible Solution (for bugs)
Investigating.
Context (for feature requests)
Your Environment
Version used: Found this bug in an older tag of xhal but figured it should be reported here.
Brief summary of issue
The
run_sysmon()
ofsca_utils.py
will generate anIndexError
if theohMask
is not sequential.Related too: https://github.com/cms-gem-daq-project/xhal/issues/75
Types of issue
Expected Behavior
An
IndexError
should not be created.Current Behavior
Consider following block:
https://github.com/cms-gem-daq-project/reg_utils/blob/5cd2e893db30db1a5f7535515ed79c3356a8f1ab/python/reg_interface/common/sca_utils.py#L57-L60
if there are two OH's and the mask
0x1
is usedohList
will be[ 0 ]
andadcX
container (forX
=1
,2
or3
) will havelen == 1
starting at0
. If0x3
is used thenohList
will be[ 0, 1]
;adcX
will havelen == 2
and have indices0
and1
.However if mask
0x2
is usedohList
will be[ 1 ]
andadcX
container will havelen == 1
starting at index0
. So this will generate anIndexError
.Steps to Reproduce (for bugs)
OHv3
, thenOHv3
on link 1, thensca.py eagle63 0x2 sysmon
Possible Solution (for bugs)
Investigating.
Context (for feature requests)
Your Environment
xhal
but figured it should be reported here./bin/bash