[ROOT] "context" action on a drawn histogram

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Thu Jul 05 2001 - 11:56:18 MEST


Hi,
I know this is a FAQ, but I have forgotten the answer, sorry.
I have a set of histograms (in compiled code) looking like :
	TH1D *h1 = new TH1D("h1", "h1", ...);
	TH1D *h2 = new TH1D("h2", "h2", ...);
Then these histograms are filled, and then I start the browser and when I
click on the histogram it gets drawn (in a separate "default" canvas).
What I would like to have is that when I now "click" on the "drawn
histogram" a specific function gets called. The function should get the
"x" value of the "point" (or maybe the value of the x-axis ?) :
	for "h1" the function should look like :
		{ gWireInfo->SayInfo(53, x); }
	for "h2" the function should look like :
		{ gWireInfo->SayInfo(97, x); }
How can I "glue" such simple functions to histograms while creating them ?
Thanks in advance,
Jacek.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:51 MET