52 def event(self):
53 '''
54 Event processor: reset and fill the histograms, display them,
55 wait for user respond.
56 '''
57
58 for i in range(16):
59 self.hist[i].Reset()
60 self.hist[i].SetFillColor(0)
61 self.hist[i].SetLineColor(1)
62
64 for likelihood in likelihoods:
65 if likelihood.getFlag() == 1:
66 exthit = likelihood.getRelated('ExtHits')
67 try:
68 moduleID = exthit.getCopyID()
69 self.hist[moduleID - 1].SetFillColor(2)
70 self.hist[moduleID - 1].SetLineColor(2)
71 except BaseException:
72 b2.B2ERROR('No relation to ExtHit')
73
75 for digit in digits:
76 moduleID = digit.getModuleID()
77 tdc = digit.getRawTime()
78 self.hist[moduleID - 1].Fill(tdc)
79
80 for i in range(16):
81 self.c1.cd(i + 1)
82 self.hist[i].Draw()
83
84 self.c1.Update()
85
86
87 user_input = input("Press Enter to continue or Q to quit ").lower().strip()
88 if user_input == "q":
90 evtMetaData.obj().setEndOfData()
91
92
93
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.