RE: [ROOT] see a graph in a canvas with a comnpiled application

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue Apr 13 2004 - 21:30:32 MEST


Hi,

You probably missing the creation of a TApplication object (see
$ROOTSYS/test/stress.cxx for an example).

You are also probably missing a way to stop the program after 
the drawing and before the end of the main.

Cheers,
Philippe.


-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Belen Salvachua
Ferrando
Sent: Tuesday, April 13, 2004 11:58 AM
To: roottalk@cern.ch
Subject: [ROOT] see a graph in a canvas with a comnpiled application


Hello,

  I'm building a program in which I want to plot a graph and fit it, and 
I would like to see the fit in a canvas for example, but I tried
to create the canvas and then to draw the graph but nothing happens, the 
program ends. I think it could be because of the libraries I link
or the includes I need, but I don't know.

 I link with:

-lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript 
-lMatrix -lPhysics -lpthread

and I include:

#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TGraph.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
#include <TF1.h>

Many thanks

    Belen.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET