Re: how to close a file opend by TChain?

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 21 Jun 2006 08:35:50 +0200


Why do you want to do this? The current file is automatically deleted when the chain destructor
is closed. Anyhow, you can do something like:

  TFile *file = chain.GetCurrentFile();
  chain.SetDirectory(0);
  delete file;

Rene Brun

Xianguo (Hsien-Kuo) LU wrote:
>
> hi rooters,
>
> Can somebody tell me how to close a file opend by TChain?
>
> Thanks in advance!
>
> Cheers!
> Xianguo LU
>
>
>
> --
> Take flight into the sky, beyond the moon, beyond my mind.
>
> Xianguo LU
> Physics Department, Peking University
> Beijing, China
> Tel: 0086-10-62753888(o)
Received on Wed Jun 21 2006 - 08:35:56 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET