36 def testcell (self, elt, elist):
37 ctx = self.getContext()
38 for (e, gain) in elist:
39 if isinstance(e,
type(())):
40 cell = ROOT.TileCell(elt, e[0])
41 cell.setEnergy (e[0], e[1], 0, 0)
42 else:
43 cell = ROOT.CaloCell (elt, e, 0, 0, 0)
44 g = i32(self.tool.estimatedGain (ctx, elt, e, 0))
45 assert g == gain, (e, g, gain)
46 g = i32(self.tool.estimatedGain (ctx, elt, e, 1))
47 assert g == gain, (e, g, gain)
48
49 g = i32(self.tool.estimatedGain (ctx, cell, 0))
50 assert g == gain, (e, g, gain)
51 g = i32(self.tool.estimatedGain (ctx, cell, elt, 0))
52 assert g == gain, (e, g, gain)
53 g = i32(self.tool.estimatedGain (ctx, cell, 1))
54 assert g == gain, (e, g, gain)
55 g = i32(self.tool.estimatedGain (ctx, cell, elt, 1))
56 assert g == gain, (e, g, gain)
57 return
58