filling TBranch

Stanislav Terechtchenko (Stanislav.Terechtchenko@cern.ch)
Mon, 27 Jul 1998 15:39:54 +0200 (METDST)


Dear Rooters.
Simple question. I have a global data buffer which is filled by some
external function. How can I fill the TBranch with this data. I don't
like to create local copy of this data wrapped by some class to avoid
copy overhead.

Something like this:

Int_t data[100];
TFile *f = new TFile("f.root","RECREATE");
TTree *tr = new TTree("tr","Tree");
tr->Branch("data",data,"some leaf list - i dont know the form",1024);

//loop
fillDataArray(data);
tr->Fill();
//end loop

Thanks.
Stas.