Hello Pasha, Thank you for your reply. I placed wrong also the initialisation of indexes. It should be On Sun, 22 Mar 1998, Pasha Murat wrote > > I modified your macro so it works properly now : > ---------------------------------------------- > { > gROOT->Reset(); > Float_t adc[16]; Int_t i,j; > TFile *file=new TFile("adc.root","RECREATE"); > TTree *tree=new TTree("tree","Testing still"); > tree->Branch("adc",&adc,"adc[16]/F"); > for(j=0;j<100;j++) { > for(i=0;i<16;i++) adc[i]=i; > tree->Fill(); > } > tree->Write(); > tree->Print(); > file->Close(); > } > --------------------------------------------- > Note that tree->Draw("adc") is equivalent to tree->Draw("adc[0]") Now filling of array is OK, but it's still something what I don't understand. I this case tree->Draw("adc") is the same as tree->Draw("adc[0]), but in the case of the array converted from hbooks (I meam row wise ntuples) when I type tree-Draw("adc") I see whole array, not only adc[0]. What is a reason of this descrepancy? Best wishes, Tadeusz Tadeusz Pytlos pytlos@fizwe5.fic.uni.lodz.pl Lodz, Poland
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:31 MET