Re: TGraphErrors and TVector

From: Rene BRUN <rene.brun_at_cern.ch>
Date: Thu, 20 Jan 2005 16:32:25 +0100


Alexis,

You should call
TGraphErrors *gr1 = new TGraphErrors(*xval,*yval,*erxval,*eryval);

However, I realize now that the constructor with TVector has a problem in your case. I have fixed it in the CVS version.

Rene Brun

Alexis Cothenet wrote:
> Hi everybody,
>
> I have a problem using Tvector with TGraphErrors, this is
> what i do:
>
> TVector *xval = new TVector(mytree->GetEntries();
> TVector *erxval = new TVector(mytree->GetEntries();
> TVector *yval = new TVector(mytree->GetEntries();
> TVector *eryval = new TVector(mytree->GetEntries();
>
> for(int i=0;i<mytree->GetEntries();i++){
> mytree->getEntry(i);
> xval(i) = Energie;
> yval(i)= Flux;
> erxval(i)=0;
> eryval(i)=0;
> }
>
> and i have a problem of call when i do:
> TGraphErrors *gr1 = new TGraphErrors(xval,yval,erxval,eryval);
>
> I tried to put some * or & and some combinations ;-)
> but still doesn't work...
> Does anyone would know how i could solve it ?
>
> Thanks very much in advance!
>
> Cheers,
> Alexis
>
Received on Thu Jan 20 2005 - 16:32:30 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET