How can I open the root file

I am a new root user,
I wrote a macro but I don’t know how can I open the root file ( only one) in the macro to take the some data.
I tried this command
TFile f(“filename.root”);
but it doesn’t work
any help please
thank you

the command TFile f(“filename.root”); should work. What do you mean when you say that it does not work. If you type for example (after the opening of your ROOT file)

you should a list of the objects in your ROOT file.