A problem about opening a file

I use ‘’‘TFile *f = new TFile(“3pietap_Sig_ppg_mcs_nophotoncut_pipipietap.root”);’’’ in my macros and then I take this file to the folder where I install root ,but when I excute this macros,root shows that this file is not existed,so could you tell me where the problem is?

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.18.04
Platform: windows10
Compiler: Not Provided

You should put this file in the folder where you are running ROOT when in the folder where you installed ROOT.

Do you mean I should put the file in root_v6.18.04/bin?

If you do:

TFile *f = new TFile(“3pietap_Sig_ppg_mcs_nophotoncut_pipipietap.root”);’

The file should be in the directory where you start ROOT from.

You can also put the file elsewhere and specify the full path in the command above.

I start ROOT from rootv6.18.04/bin by x86 native tool command prompt,but I put the file in root/bin,ROOT also shows it not exists,but the second way works,thank you a lot.

root/bin means rootv6.18.04/bin