Re: Canvas is not shown.

Jayoung Wu (jayoung@glue.umd.edu)
Wed, 4 Mar 1998 12:10:16 -0500 (EST)


Hi,
I do not understand why compiled version with ROOT lib does not show
any Canvas while Cint version shows Canvas???
The follwing was my trials:

1. "inside" of ROOT's cint interface:

================= my code "jayoung.C" is ============================
{
gROOT->Reset();

TCanvas c1 = new TCanvas("c1","Tracking of Incident Particle",
200,10,700,500);
c1->Modified();
c1->Update();
}
=======================================================================
root [0] .x jayoung.C shows a Canvas. But it gives the following error
^^^^^^^^^^^^^^^^^^^^^ message:
Warning in <TCanvas::Copy>: copy not implemented yet

*** Break *** segmentation violation

2. "inside" of ROOT's cint interface:

================= my code "jayoung.C" is ============================
{
gROOT->Reset();

TCanvas c1 = new TCanvas("c1","Tracking of Incident Particle",
200,10,700,500);
// c1->Modified();
// c1->Update();
}
=======================================================================
root [0] .x jayoung.C shows a Canvas. But it gives the following warning
^^^^^^^^^^^^^^^^^^^^^ message:
Warning in <TCanvas::Copy>: copy not implemented yet

3. "outside" of ROOT's cint interface: execute compiled program with ROOT
lib. My version is "root_v0.9.OSF1.v3.2".

================= my code "jayoung.C" is ============================
#include <stdio.h>
#include <math.h>

#include "TROOT.h"
#include "TFile.h"
#include "TTree.h"
#include "TBranch.h"
#include "TObject.h"
#include "TH1.h"
#include "TCanvas.h"

void main()
{
TROOT ytrack("plot2","plot test");

TCanvas *c1 = new TCanvas("c1","Tracking of Incident Particle",
200,10,700,500);

// c1->Modified();
// c1->Update();
}
====================================================================
It is successfully comlied with ROOT lib (root_v0.9.OSF1.v3.2).
But it does not show any canvas when it is executed.
Also it does not complain anything at all.

---
Thanks a lot!
Jayoung