_ROOT Version:_7 Platform: linux Compiler: Not Provided
@Wile_E_Coyote I am getting errors. I want to extend the ntpl003_lhcbOpenData.C in such manner so that it prints the entry range (first entry, last entry) for each of the clusters of the processed RNTuple data set.
Hi and welcome to the ROOT forum!
I assume this question is related to the GSoC warm-up task? I appreciate that you are engaging in the forum! For this particular problem, however, the idea would be for you to figure it out yourself. If you have any specific questions, please contact me.
Hi sir, as the application period has over. Now, can I get the answer of this particular question? Or can you give me idea that how to tackle this problem? Thank you!
Sure! You’d ask the RNTupleDescriptor for the information like so
auto N = ntuple->GetDescriptor().GetNClusters();
for (unsigned int i = 0; i < N; ++i) {
const auto &clusterDesc = ntuple->GetDescriptor().GetClusterDescriptor(i);
auto firstEntry = clusterDesc.GetFirstEntryIndex();
auto nEntries = clusterDesc.GetNEntries();
std::cout << "#" << i << ": [" << firstEntry << "," << firstEntry + nEntries - 1 << "]" << std::endl;
}
To be very precise, you cannot necessarily assume that cluster identifiers are issued from 0 to N-1 so you can use something like this to iterate through the clusters.