Hi Peter, TFile inherits from TNamed, so a GetName() should do the trick Eddy > X-Authentication-Warning: listbox4.cern.ch: majordom set sender to owner-roottalk@listbox.cern.ch using -f > X-External: Man_on_the_moon > Date: Mon, 2 Jun 2003 08:59:48 -0400 (EDT) > From: Peter H Fisher <fisherp@mit.edu> > To: <roottalk@cern.ch> > Subject: [ROOT] Finding the name of a file in a chain > MIME-Version: 1.0 > > 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