Are you saying that the http://root.cern.ch/root/html/TChain.html#TChain:GetFile doesn’t work and you have to use http://root.cern.ch/root/html/TTree.html#TTree:GetCurrentFile (note that this method may easily return 0, I believe)?
Maybe you could try: const char *current_file_name = ((TChain*)(Myselector::fChain))->GetFile()->GetName(); where the “(TChain*)fChain” casting may be needed because the automatically generated skeleton source code often defines a “TTree *fChain;” instead of a “TChain *fChain;”.