[ROOT] exec1.C Example

From: Norbert Danneberg (norbert.danneberg@psi.ch)
Date: Wed Apr 12 2000 - 09:36:23 MEST


Hi 

the exec1.C example, provided with version 2.23/11
worked in my case only after a modification in 
line 16.

I used 

      Float_t xx = gPad->AbsPixeltoX(px);
      Float_t x = gPad->PadtoX(xx);

instead of 

      Float_t x = gPad->PadtoX(gPad->AbsPixeltoX(px));

The second statement produced the follwing error:

root [0] TFile f("hsimple.root")
root [1] hpx.Draw()
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2] c1.AddExec("ex1",".x exec1.C")
root [3] Error: No symbol gPad in current scope 
FILE:/home/muptdev/Offline/Macros/exec1.C LINE:16
Error: Failed to evaluate gPad->AbsPixeltoX(px)
FILE:/home/muptdev/Offline/Macros/exec1.C LINE:16
Possible candidates are...
filename       line:size busy function type and name
*** Interpreter error recovered ***
 

Norbert



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:23 MET