Cannot retrieve tf1 from a root file


I have a root file with several TF1 entries but I can only access via:

TF1 *f=(TF1*)_file0->GetObect("name");

I cannot find the TF1 I can only find it with GetObjectAny("name"). But only the first TF1 and the others not. I wonder why is that


I am not sure this method exists in ROOT … At least I could not find it neither in the reference guide nor in the source code.

Can you provide a small example (a small root file and the commands you are using to relieve the TF1) ?

TDirectoryFile::FindObjectAny() maybe?

TF1 *f; _file0->GetObject("name", f);