Problem with input name of TChain->Add()

Hi,
I am trying to use TChain to loop the a tree.
However, I found that if my root file with the name “XXX.root/XXX.root.2”, the TChain can not correctly read the file.
the code is like this.

TChain *chain = new TChain(“tree_name”);
chain->Add(“XXX.root/XXX.root.2”,0);

Then, I got an error message.
SysError in TFile::ReadBuffer: error reading from file XXX.root (Is a directory)
Error in TFile::Init: XXX.root failed to read the file type data.

I think the name was not correctly parsed in the Add().

Since I would like to keep the name,
Is there any option I can use to directly put the name in the Add()?

Thanks,


_ROOT Version: 6.12/06
Platform: Not Provided
Compiler: Not Provided


I see. Thanks. It can be solved by just changing the newer version.

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