Hello,
I found out, that a part of PyROOT code I was using for TTrees does not work properly for TChain. Here is an example:
import ROOT
c = ROOT.TChain("teventefield")
c.Add("/data/GRAND/data_challenge1_pm_lwp/data/Coarse1.root")
v = ROOT.vector("vector<float>")()
c.SetBranchAddress("fft_mag_y", v)
Executing this I get an error message:
Error in <TChain::SetBranchAddress>: The class requested (vector<vector<float> >) for the branch "fft_mag_y" is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (vector<vector<float> >) to avoid to write corrupted data.
However, it seems to work for TTrees:
import ROOT
f = ROOT.TFile("/data/GRAND/data_challenge1_pm_lwp/data/Coarse1.root")
t = f.Get("teventefield")
t.SetBranchAddress("fft_mag_y", v)
(no error, I can use the v normally)
Am I don’t something unexpected for TChain, or is there a part implemented in PyROOT for TTree but not for TChain?
I attach a tree that I’ve been using.
Coarse1.root (950.5 KB)
Please read tips for efficient and successful posting and posting code
ROOT Version: 6.26.11
Platform: Not Provided
Compiler: Not Provided