What do you mean by
"running it, I don't see the "cl" ntuple drawn." ?
running these statements in a compiled program?
If this is the case, you should add the following statements in your script
Instead of;
TFile file("file.root");
do
TFile *f = new TFile("file.root");
TH1 *hfcl = (TH1*)f->Get("hfcl");
TTree *cl = (TTree*)f->Get("cl");
also you should remove "gROOT->Reset()"
Rene Brun
Stephane Plaszczynski wrote:
>
> --On Thursday, September 18, 2003 10:07:50 AM +0200 Rene Brun
> <Rene.Brun@cern.ch> wrote:
>
> Hi Rene,
>
> thanks for the answers, I hadn't found them in the user guide...
>
> >
> > I need to see your code, in particular your main program.
> > Do you create a TApplication? Please mimic the root main program.
> >
> I d'ont create at all any TApplication in my code but I can see
> interactively my ntuple inside root:
> here is my script which is simple:
>
> {
> gROOT->Reset();
>
> c1 = new TCanvas("c1","plots",600,600);
> gPad->SetBottomMargin(0.15);
> gPad->SetLeftMargin(0.16);
>
> TFile file("file.root");
>
> hfcl->SetStats(kFALSE);
>
> //titre
> hfcl->SetTitleSize(0.05, "x");
> hfcl->SetTitleOffset(1., "x");
> hfcl->SetTitleSize(0.05, "y");
> hfcl->SetTitleOffset(1.5, "y");
> hfcl->GetXaxis()->SetTitle("l");
> hfcl->GetYaxis()->SetTitle("l(l+1)C_{l}/2#pi (#muK^{2})");
>
> hfcl->SetLineStyle(1);
> hfcl->SetLineWidth(1);
> hfcl->SetLineColor(13);
> hfcl->SetFillColor(13);
>
> hfcl->Draw();
> hcl->SetLineColor(16);
>
> cl->Draw("y:x","","same");
> ////////////////////
>
> c1->Update();
> }
>
> running it, I don't see the "cl" ntuple drawn.
> Interactively I type the
>
> cl->Draw("y:x","","same");
>
> command, and the points appear on my canvas
>
> Stephane
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET