Finding filename in a TChain

Is there any way to find out which file from which an entry to a TChain came from? In particular I am using a “selector” function from MakeSelector with a TTree and would like to be able to find out the file from which a particular entry came from in my Process() method. I did find the suggestively named TChain method GetFileNumber() but this always returns 0.

Thank you


Rene

Rene

Thanks for the quick response. I notice that this code seems to work also:

fChain->GetCurrentFile();

That is, you do not seem to need the GetTree() part.