module which checks if the roy payload from HLT can be created and depacked correctly
Definition at line 18 of file pxd_roi_payload.py.
◆ event()
load the PXD Digits of the simulation and the packed/unpacked ones
and compare them
Definition at line 41 of file pxd_roi_payload.py.
42 """ load the PXD Digits of the simulation and the packed/unpacked ones
47 B2FATAL(
"ROIs not in file")
51 if not unpackedroisuns:
52 B2FATAL(
"PXDROIsPayHLT not in file")
60 orgrois = self.sortROIs(orgroisuns)
61 unpackedrois = self.sortROIs(unpackedroisuns)
71 print(
"Comparing %i ROIs " % len(orgrois))
94 for i
in range(len(orgrois)):
96 if i != 0
and f(org) == f(orgrois[i - 1]):
97 B2WARNING(
"Found the same ROI a second time (Double ROI)!")
99 "Check Org $%X %3d %3d %3d %3d Unp $%X %3d %3d %3d %3d" %
100 (org.getSensorID().
getID(),
105 unp.getSensorID().
getID(),
110 if i == 0
or f(org) != f(orgrois[i - 1]):
111 if j == len(unpackedrois):
112 B2FATAL(
"Unpacked ROIs comparison exceeds array limit!")
115 unp = unpackedrois[j]
118 "Check Org $%X %3d %3d %3d %3d Unp $%X %3d %3d %3d %3d" %
119 (org.getSensorID().
getID(),
124 unp.getSensorID().
getID(),
130 if unp.getMinUid() == 0
and unp.getMinVid() == 0
and unp.getMaxUid() == 250 - 1
and unp.getMaxVid() == 768 - 1:
131 B2INFO(
"Full size ROI")
132 if org.getSensorID().
getID() != unp.getSensorID().
getID():
133 B2INFO(
"DHHID changed")
134 if j == len(unpackedrois):
135 B2FATAL(
"Unpacked ROIs comparison exceeds array limit!")
138 unp = unpackedrois[j]
140 if not(unp.getMinUid() == 0
and unp.getMinVid() == 0
and unp.getMaxUid() == 250 - 1
and unp.getMaxVid() == 768 - 1):
141 assert org.getSensorID().
getID() == unp.getSensorID().
getID()
142 assert org.getMinUid() == unp.getMinUid()
143 assert org.getMaxUid() == unp.getMaxUid()
144 assert org.getMinVid() == unp.getMinVid()
145 assert org.getMaxVid() == unp.getMaxVid()
◆ sortROIs()
def sortROIs |
( |
|
self, |
|
|
|
unsortedPyStoreArray |
|
) |
| |
sort ROI list
Returns a python-list containing the ROIs
Definition at line 24 of file pxd_roi_payload.py.
The documentation for this class was generated from the following file: