Well in c/c++ an array is just a pointer with a certain amount of space
reseved beyond it. So GetParErrors give you a pointer (i.e. the array held
by your TF1 object (fParErrors)).
If you want a copy that will not go away when your TF1 goes away (to be safe) then I think you just have to copy it element by element, or use it to construct a TMatrix or TVector or something.
If your a fortran old-foggie like me this can be very confusing!
-Art
A.E. Snyder, Group EC \!c*p?/ SLAC Mail Stop #95 ((. .)) Box 4349 | Stanford, Ca, USA, 94309 '\|/` e-mail:snyder_at_slac.stanford.edu o phone:650-926-2701 _ http://www.slac.stanford.edu/~snyder BaBar FAX:650-926-2657 Collaboration
On Mon, 5 Feb 2007, Roger Mason wrote:
> Hello Arthur,
>
> "Arthur E. Snyder" <snyder_at_slac.stanford.edu> writes:
>
> > It would be nice if root Print commands could take ostream as an argument
> > so one could print to a file, but that doesn't work. I use cut&paste
> > sometimes, but it I want to print a lot of 'em to files I have to use
> > GetParError or GetParErrors (returns an array [a]).
> >
> >
> >
> > [a] a pointer to the array fParErrors.
> > virtual Double_t *GetParErrors() const {return fParErrors;}
> >
>
> I don't understand what syntax one would use to fill an array from
> GetParErrors, but I can easily loop over GetParError.
>
> Thanks,
> Roger
>
>
Received on Tue Feb 06 2007 - 01:02:47 CET
This archive was generated by hypermail 2.2.0 : Tue Feb 06 2007 - 17:50:01 CET