TChain not finding trees in input file

ROOT 6.18/04
running on linux
gcc 8.3.0

I’m trying to use TChain to chain in a bunch of data files together. These files each have two trees: rawdata and pulses.

I have code that many posters on ROOTTalk / the ROOT manual say will work but does not. Can anyone help?


 TChain *chain_rawdata = new TChain("rawdata");
  chain_rawdata -> Add("/PDSout_run000110-00049*_physics.root");
// the TChain declaration should have gotten the tree named rawdata

issue when trying to run:

Error in <TChain::LoadTree>: Cannot find tree with name rawdata in file PDSout_run000110-000490_10-17-2354_physics.root

(note I get this Error message for all 7 files I’m trying to chain in - numbers 490 - 496)

I opened this file in ROOT and it clearly does have rawdata and pulses trees in it.


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Does the file PDSout_run000110-000490_10-17-2354_physics.root exist?
Does it contain the TTree rawdata in the top level ‘directory’ or in a subdirectory?
Does it work when you add just one file?

1 Like

ugh, it does, but it is rawData, not rawdata.

my TChain code is now working, and a wildcard * does work in TChain for me.

Is there a way to print the list of files included in a chain, as a debug check?



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