Hi,
I am having a problem creating a tree with a branch of TMatrixD. Below is a
short test program showing the problem I have. It runs fine, but when I tree
to MakeClass() out of the tree and loop over it, I get a seg fault. I
apologize if this is some trivial mistake that I am overlooking. I am using
version 3.03/05 on RH 7.3.
Thanks in advance,
Dan
//----------------------------------------------------------------------------------
void TreeMat(){
TFile *fout=new TFile("TreeMat.root","RECREATE");
TTree *tree=new TTree("test_tree","test_tree");
TMatrixD matrix(2,2);
tree->Branch("matrix","TMatrixD",&matrix,64000,0);
matrix(0,0)=1.;
matrix(0,1)=2.;
matrix(1,0)=3.;
matrix(1,1)=4.;
tree->Fill();
fout->Write();
fout->Close();
}
//--------------------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET