Thank a lot for the prompt reply, it worked!
However, the problem persisted with std::vector<std::vector>, so I guessed it might come from the TBranch declaration.
I tried several declarations:
- 1st attempt with:
fTree2 -> Branch ("vCl_Cr_KU_En", &vCl_Cr_KU_En[0][0], Form("vCl_Cr_KU_En[%i][4]/D", nb_ClKU));
The spectra were still mixed.
- 2nd attempt with:
fTree2 -> Branch ("vCl_Cr_KU_En", &vCl_Cr_KU_En, "vCl_Cr_KU_En/D");
The spectra are empty in this case, most likely it does not find what to fill.
- 3rd attempt with:
fTree2 -> Branch ("vCl_Cr_KU_En", &vCl_Cr_KU_En);
It is working like charm (but not 4th time).
However, is it correct that there is no need to generate dictionaries?
I tried with and without the following line in my EventAction.cc constructor (from post Vector in Branch):
gROOT->ProcessLine("#include <vector>");
And there was no difference.
Is it because it is a std::vector? and not a user defined type or class?
Thank you again!!!