SysError in <TFile::ReadBuffer>: error reading from file

Dear rooters!
I am processing a list of root files using a C++ compiled code,
but I get the following warning:

SysError in TFile::ReadBuffer: error reading from file user.alhroob.data16_13TeV.AllYear.physics_Main.SGTOP1.grp16_v01_p3388.ll.v21.1_out.root (Is a directory)
Error in TFile::Init: user.alhroob.data16_13TeV.AllYear.physics_Main.SGTOP1.grp16_v01_p3388.ll.v21.1_out.root failed to read the file type data

I find it very strange because the error mentions the directory not the file.

To be sure, I downloaded the files again and I used TChain functionality

root -l

auto t=new TChain(“nominal”)

and I received the same error.

Any explanation why this is happing?


This is a bug in ROOT 5 and 6.
Rename your subdirectory so that its name does not end with “.root” (e.g. into something like “....1_out_root”) or use t->Add("user.....1_out.root/*.root"); (note: it must be “*.root”, it cannot be “*.root*” nor “*root” nor “*root*”).

It works! thanks a lot

And we have for that!