Hi Jayoung,
With the current version of Root, you cannot do that directly.
Our development version includes a new class (TExec). TExec is a small
class that can execute any CINT command (macro) when a pad event occurs.
For example, we have an example macro automatically called when the
mouse
points to a pad containing a TH2F histogram. The macro displays the
projection X correcponding to the bin along Y corresponding to teh
current mouse position.
This new facility is extremely powerful and should simplify the writing
of interactive applications using the mouse via calls to interpreted
code.
I will demonstrate some examples at the coming Root workshop.
Rene Brun
Jayoung Wu wrote:
>
> Hi,
>
> I have a 1D histogram plot:
> TH1F *scnlayer = new TH1F("scnlayer","energy deposit profile",43,0,43);
> for (Int_t i=0; i<43; i++)
> scnlayer->Fill(i,escn1x[i]);
> scnlayer->Draw("");
>
> Now I want to add one feature:
> When I click the histogram(of energy deposit) it shows the other related
> values for that bin. For example, when I click the 3rd bin it shows the
> adc-count for that bin.
> ^^^^^^^^^^^^^^^^^^^^^^
> adcscn1x[2]
>
> How can I add those features? Is there any similar and simple example?
>
> ---
> Thanks,
> Jayoung
>
>
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:16 MET