Hi to everyone,
as always, I’m a beginner in ROOT. And it is still a bit complicated to understand how it works for me, since it’s also a quite huge framework. However, as the title of my topic expresses, I have a root file (not made by myself but got it from other simulations in my collaboration), where there are TTrees with several branches. I need to retrieve the values of a particular branch, that I understood reading some posts in this forum, definition of classes etc (and making mistakes), that is an array. The branch is the following one:
…
*Br 42 :Event.fMCEvent.fRecParticles.fAzimuth :
| Double_t fAzimuth[Event.fMCEvent.fRecParticles_] *
*Entries : 1418 : Total Size= 6526 bytes File Size = 174 *
*Baskets : 1 : Basket Size= 16000 bytes Compression= 33.26 *
…
and I want to retrieve the fAzimuth values (or, however considering the complete extended name of the branch).
I tried to follow the first code in the TTreeReader ClassReference page on the ROOT website and it gives me this error:
Error in TTreeReaderValueBase::GetBranchDataType(): Must use TTreeReaderArray to access a member of an object that is stored in a collection.
Error in TTreeReaderValueBase::CreateProxy(): The branch Event.fMCEvent.fParticles.fAzimuth contains data of type {UNDETERMINED TYPE}, which does not have a dictionary.
(this suggested me that it is an Array ) ). However, I tried to understand the TTreeReaderArray part (the second code on the same page) but I didn’t get much since, I know, I’m sure I’m missing basic things. I have no code to show since I tried to reproduce the things that I learned from these pages and trying to adapt to my case but I didn’t succeed.
Sorry if I didn’t put the reference of the cited pages but sieems that, as a beginner, I cannot do it.
I also look at the RDataFrame tutorial on the ROOT page and tried to get what I want from the RDataFrame, but I didn’t secceed also in this way.
I thanks in advance anyone that wants to help me.
_ROOT Version: 6.24/00
_Platform: Linux Mint 20.3, Cinnamon 64-bit
_Compiler: linuxx8664gcc