106 def event(self):
107 """
108 event function
109 """
110
111
113
115
116 if not len(eclDigitsFromSimulation_unsorted) == len(eclDigitsPackedUnpacked_unsorted):
117 b2.B2FATAL("Different number of ECLDigits from simulation and after packing+unpacking")
118
119 eclDigitsPackedUnpacked = self.sortECLDigits(eclDigitsPackedUnpacked_unsorted)
120 eclDigitsFromSimulation = self.sortECLDigits(eclDigitsFromSimulation_unsorted)
121
122 tc = TestCase('__init__')
123
124
125 for idx in range(len(eclDigitsPackedUnpacked)):
126 digit = eclDigitsFromSimulation[idx]
127 digitPackedUnpacked = eclDigitsPackedUnpacked[idx]
128
129 b2.B2DEBUG(5, 'MC digit: cellid = ' +
130 str(digit.getCellId()) +
131 ', amp = ' +
132 str(digit.getAmp()) +
133 ', time = ' +
134 str(digit.getTimeFit()) +
135 ', quality = ' +
136 str(digit.getQuality()) +
137 ', chi = ' +
138 str(digit.getChi()) +
139 '\nUnpackedDigit: cellid = ' +
140 str(digitPackedUnpacked.getCellId()) +
141 ', amp = ' +
142 str(digitPackedUnpacked.getAmp()) +
143 ', time = ' +
144 str(digitPackedUnpacked.getTimeFit()) +
145 ', quality = ' +
146 str(digitPackedUnpacked.getQuality()) +
147 ', chi = ' +
148 str(digitPackedUnpacked.getChi()))
149
150 tc.assertEqual(digit.getCellId(), digitPackedUnpacked.getCellId())
151 tc.assertEqual(digit.getAmp(), digitPackedUnpacked.getAmp())
152 tc.assertEqual(digit.getTimeFit(), digitPackedUnpacked.getTimeFit())
153 tc.assertEqual(digit.getQuality(), digitPackedUnpacked.getQuality())
154 tc.assertEqual(digit.getChi(), digitPackedUnpacked.getChi())
155
156
A (simplified) python wrapper for StoreArray.