Make a TChain on the heap:
TChain *chain = new TChain("T");
chain->Add("dst1.root")
delete chain;
Btw: in the latest version of ROOT Delete() is protected against
deleting stack based objects.
Cheers, Fons.
Alexander Cherlin wrote:
>
> Hello all,
> I define a chain like
>
> TChain chain("T");
> chain.Add("dst1.root");
> chain.Add("dst2.root");
>
> Does someboby know how to delete the files of the chain and to replace
> them by something else? I tried chain.Delete() , but it returns the
> following error:
>
> Fatal in <operator delete>: storage area overwritten
> aborting
>
> Regards,
> Alexander.
>
> ************************************************************************
> * Alexander Cherlin | Home: *
> * Department of Particle Physics | Pinsker str., 50/15 *
> * Weizmann Institute of Science | Rishon le-Zion 75910 *
> * Rehovot 76100 ISRAEL | ISRAEL *
> * PHONE : 972 8 9343372 | PHONE: 972 3 9560344 *
> * FAX : 972 8 9466253 | CELLULAR *
> * | PHONE: 972 54 629228 *
> * | FAX: 972 15154 629228 *
> *----------------------------------------------------------------------*
> * E-mail: cherlin@wicc.weizmann.ac.il *
> * Alexander.Cherlin@cern.ch *
> * URL : http://www.weizmann.ac.il/home/cherlin *
> ************************************************************************
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:37 MET