Re: [ROOT] Finding the name of a file in a chain

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Jun 02 2003 - 15:28:12 MEST


Hi Peter,

do:

mychain->GetFile()->GetName();

Rene Brun

On Mon, 2 Jun 2003, Peter H Fisher wrote:

> Hi Rooters,
> 
> I have using TChain to loop through tens of files.  I am having a problem
> when one file closes and the nxt opens and I would like to know the name
> of the file for each event (I am using GetEntry(i) to read each event
> sequentially).  I can use
> 
> mychain->GetFile()-Print();
> 
> to print the whole TTree, which also prints the file name, but Iwould liek
> to find a way to print *JUST* the filename.  Any ideas?
> 
> Best Regards,
> 
> Peter Fisher
> MIT
> 
> 
> Peter Fisher                                   Office 617-253-8561
> Professor of Physics                           Fax    617-253-4100
> 44-118 MIT	                               email  fisherp@mit.edu
> Cambridge, MA, 02139
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET