Displaying the .root filename


I am trying to loop inside root files by using the keys and doing like

TFile *nextsource = (TFile *) sourcelist->After (first_source);
while (nextsource) {


However, how would it possible to get the “nextsource” actual filename and not looping in case a certain string is found in it ? I see that not TFile->GetName() or something similar exists…



Please ignore- found that TFile->GetName() works