Hi,
I have a script that:
Now the problem! How to change the OptStat options only for the first histo?
I've searched for it on the web site but this solution doesn't fix the problem in my script:
fMCVerticesCanvas = new TCanvas("MCVerticesCanvas", "MC Vertices", 0, 0, 1100, 1100);
fMCVerticesCanvas->Divide(2, 2);
fMCVerticesCanvas->cd(1);
fMCVerticesCanvas->cd(1)->SetLogy();
fVerticesClass->Draw();
((TPaveStats
*)fVerticesClass->GetListOfFunctions()->FindObject("stats"))->SetOptStat(1111);
The tricky point is that if I try this interactively it works!!!
Running from the script I get:
Error: illegal pointer to class object
(TPaveStats*)fVerticesClass->GetListOfFunctions()->FindObject("stats") 0x0 638
C:\root\ManuC\THeavyFlavoursAllPlots.C(198)
I'm running 5.17.02 on WinXP!
Bye. Received on Sat Apr 19 2008 - 19:23:37 CEST
This archive was generated by hypermail 2.2.0 : Sat Apr 19 2008 - 23:50:01 CEST