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/hist057_TExec_th1.C and $ROOTSYS/tutorials/hist/hist058_TExec_th2.C.
{
gROOT->GetListOfGlobalFunctions()->Delete();
h->FillRandom(
"gaus", 1000);
c1->Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
nullptr,
nullptr,
"exec3event(Int_t,Int_t,Int_t,TObject*)");
}
{
printf(
"Canvas %s: event=%d, x=%d, y=%d, selected=%s\n",
c->GetName(), event,
x,
y,
selected->IsA()->GetName());
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN void * gTQSender
1-D histogram with a float per channel (see TH1 documentation)
Mother of all ROOT objects.
- Author
- Ilka Antcheva
Definition in file exec3.C.