How to find name of current file being accessed by tchain?

Hello,

I have a TChain to which I add 50 TTrees (each one is in a separate file). I find some interesting events and know the event number and would like to know which file an event is in. I wonder if there is a way to retrieve this information from the TChain? I see there is a current file retrieval function, but I dont see that TFile has the ability to tell me the name of the actual file. Does someone know a way to do this?

Thanks,

Mark

Hi Mark,
root.cern.ch/root/htmldoc/TChain … in:GetFile
root.cern.ch/root/htmldoc/TTree. … urrentFile

Jan

[quote=“musinsky”]Hi Mark,
root.cern.ch/root/htmldoc/TChain … in:GetFile
root.cern.ch/root/htmldoc/TTree. … urrentFile

Jan[/quote]

Thanks! It was the get Name bit I needed (I guess I should have looked at the classes TFile inherits from!).

Cheers,

Mark