Root file does not exist error

Dear Experts,

I am trying to draw comparision plot between MC and data. But in acessing files,it is showing file does not exist. Actually I am acessing around 30 files at a time. When I am acessing one file at a time it is giving no error. But it is giving error by acessing 30 files. The command is given below.

TFile file1 = new TFile("cut1/sel_BsToPhiMuMu_JpsiPhi_cut1_.root");

The error is Error in TFile::TFile: file cut1/sel_BsToPhiMuMu_JpsiPhi_cut1_*.root does not exist.

All the files are present in the cut1 directory.

Please help me out in solving this issue.


A TFile can only be used with a single file, if you need to open trees from multiple files, you need to use a TChain :

Dear Amandio,

Many thanks.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.