I am having trouble with a class I derived from TCanvas. The idea was to add a function which would Connect to its own ProcessedEvent(…) signal, on “mouseDown” it would mark a region using the TCutG and on “mouseRelease” would write into TLegend a number of counts in the marked area. However, it appears that the ProcessedEvent(…) is not emitting signals. I believe I am missing something to initiate the signal emission, but I don’t see what. I am attaching relevant bits of code.
TSpyCanvas.cc (3.0 KB)
That’s a weird use case. I’ll try to investigate. The first thing I see is that the
RQ_OBJECT("TSpyCanvas") is most probably not needed.
BTW, having a running example would be better (that would save a bit of our time)
I know that it might look weird, but I though this will be the path of minimal effort… Anyway, I put together (non)working example.
tspycanvas.tar (20 KB)
…you can try to use it with right-click - “DoIntegral”
As I said, remove the
RQ_OBJECT("TSpyCanvas") and try again
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.