Example of using signal/slot in TCanvas/TPad to get feedback about processed events.
Note that slots can be either functions or class methods. Compare this with tutorials $ROOTSYS/tutorials/hist/exec1.C and $ROOTSYS/tutorials/hist/exec2.C.
void exec3()
{
gROOT->GetListOfGlobalFunctions()->Delete();
h->FillRandom(
"gaus",1000);
c1->Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)", 0, 0,
"exec3event(Int_t,Int_t,Int_t,TObject*)");
}
{
printf(
"Canvas %s: event=%d, x=%d, y=%d, selected=%s\n",
c->GetName(),
}
R__EXTERN void * gTQSender
1-D histogram with a float per channel (see TH1 documentation)}
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
- Author
- Ilka Antcheva
Definition in file exec3.C.