Hello - Now, I thought i knew how to make trees with variable length branches: Int_t nPhot; Float_t E[500]; Float_t Px[500]; Float_t Py[500]; Float_t Pz[500]; Float_t Arm[500]; Float_t PhotProb[500]; TTree* nEmcPhotons = new TTree("nEmcPhotons","EMC Photons"); nEmcPhotons->Branch("nPhot",&nPhot,"nPhot/I"); nEmcPhotons->Branch("E",E,"E[nPhot]/F"); nEmcPhotons->Branch("Px",Px,"Px[nPhot]/F"); nEmcPhotons->Branch("Py",Py,"Py[nPhot]/F"); nEmcPhotons->Branch("Pz",Pz,"Pz[nPhot]/F"); nEmcPhotons->Branch("Arm", Arm,"Arm[nPhot]/F"); nEmcPhotons->Branch("PhotProb", PhotProb,"PhotProb[nPhot]/F"); now when i Fill() this tree and save it to a file and then try and read it back and Draw() any of the variable-length fields, i get: root [0] TFile f("nEmcPhotons.root") root [1] nEmcPhotons->Draw("Pz") Warning in <MakeDefCanvas>: creating a default canvas with name c1 Warning in <TBranch::GetBasket>: Estimated keylen too small=15697 Fatal in <operator new>: storage exhausted aborting making bufsize=128000 in the Branch() calls does not help... - Peter
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:31 MET