getting mouse events on ROOTHi Stelios,
please, check $ROOTSYS/tutorials/exec1.C exec2.C exec3.C
HTH. Regards. Valeriy
----- Original Message -----
From: Stilianos Kesisoglou
To: roottalk@pcroot.cern.ch
Sent: Thursday, June 10, 2004 11:45 PM
Subject: [ROOT] getting mouse events on ROOT
Hi,
I want to make a small macro that gets the x,y coordinates
for a set of points on my pad when I click on them sequentially.
I've tried something like:
Float_t ptsX[3], ptsY[3];
TMarker *mark[3];
for (Int_t iM=0;iM<3;iM++)
{
mark[iM] = (TMarker*)gPad->WaitPrimitive("TMarker","Marker");
ptsX[iM] = mark[iM]->GetX();
ptsY[iM] = mark[iM]->GetY();
}
but doesn't work. It gets the first point correctly but then proceeds and
sets all the other points like the first one (a printout shows that).
Any suggestions?
Thanks!
Stelios.
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET