module which checks if the roy payload from HLT can be created and depacked correctly
Definition at line 23 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 46 of file pxd_roi_payload.py.
47 """ load the PXD Digits of the simulation and the packed/unpacked ones
52 b2.B2FATAL(
"ROIs not in file")
56 if not unpackedroisuns:
57 b2.B2FATAL(
"PXDROIsPayHLT not in file")
65 orgrois = self.sortROIs(orgroisuns)
66 unpackedrois = self.sortROIs(unpackedroisuns)
76 print(
"Comparing %i ROIs " % len(orgrois))
99 for i
in range(len(orgrois)):
101 if i != 0
and f(org) == f(orgrois[i - 1]):
102 b2.B2WARNING(
"Found the same ROI a second time (Double ROI)!")
104 "Check $%X %3d %3d %3d %3d" %
105 (org.getSensorID().
getID(),
110 if i == 0
or f(org) != f(orgrois[i - 1]):
111 if j == len(unpackedrois):
112 b2.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 b2.B2INFO(
"Full size ROI")
132 if org.getSensorID().
getID() != unp.getSensorID().
getID():
133 b2.B2INFO(
"DHHID changed")
134 if j == len(unpackedrois):
135 b2.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()
a (simplified) python wrapper for StoreArray.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
◆ sortROIs()
def sortROIs |
( |
|
self, |
|
|
|
unsortedPyStoreArray |
|
) |
| |
sort ROI list
Returns a python-list containing the ROIs
Definition at line 29 of file pxd_roi_payload.py.
The documentation for this class was generated from the following file: