Hi Chris and Rene,
Chris is right . Indeed, we should transpose matrices in the streamer
coming from root versions < 4 . Currently, I have not good access to
the internet ,
but I will try to upload a small patch tomorrow .
Eddy
- Chris Crawford <chris2_at_lns.mit.edu> wrote:
> Hi Rene,
> Here is an example:
> --thanks, Chris
>
> // root-v3.10/02
> {
> TFile f("a.root","recreate");
> TMatrix m(2,3);
> m(0,0)=1; m(0,1)=3; m(0,2)=5;
> m(1,0)=2; m(1,1)=4; m(1,2)=6;
> m.Print();
> m.Write("m");
> m.GetElements();
> f.Close();
> }
>
> Matrix 2x3 is as follows
>
> | 0 | 1 | 2 |
> ------------------------------------------------------------------
> 0 | 1 3 5
> 1 | 2 4 6
>
> elements: [ 1 2 3 4 5 6 ]
>
> //root-v4.01/02 or v4.03/02
> {
> TFile f("a.root");
> m->Print();
> m->GetMatrixArray();
> }
>
> 2x3 matrix is as follows
>
> | 0 | 1 | 2 |
> ------------------------------------------------------------------
> 0 | 1 2 3
> 1 | 4 5 6
>
> elements: [ 1 2 3 4 5 6 ]
>
> Rene Brun wrote:
>
> >Hi Chris,
> >
> >ROOT version 4 is already doing this. You should be able to read
> >old style matrices with the new version.
> >Could you send a very short file with an example that does not work?
> >
> >Rene Brun
> >
> >On
> >Fri, 25
> >Mar 2005, Chris Crawford wrote:
> >
> >
> >
> >>Hello,
> >> When I try and read TMatrices from v3 root files in root-v4, it
> >>switches between row-major and column major, jumbling up the
> entries.
> >>Is there some way that the class Schema can fix this? I notices
> the
> >>class version jumped from 2 to 3.
> >>--thanks, Chris
> >>
> >>
> >>
>
>
Received on Sun Mar 27 2005 - 21:58:31 MEST