Hi,
I have an existing ntuple which I want to read in. With the MakeClass() method I created some standard code for this.
The problem is that some of the branches seem to contain arrays of std::vectors which I am not able to access with the code from MakeClass. Other variables and plain arrays (which are also in the ntuple) work.
Here some lines from the MakeClass code to illustrate my problem:
class CollectionTree {
public :
…
const Int_t kMaxm_genVertices = 10000;
…
std::vector m_genVertices_m_particlesIn[kMaxm_genVertices];
…
TBranch *b_m_genVertices_m_particlesIn; //!
…
void CollectionTree::Init(TTree *tree)
{
…
fChain->SetBranchAddress(“m_genVertices.m_particlesIn”, m_genVertices_m_particlesIn, &b_m_genVertices_m_particlesIn);
…
}
…
}
In the analysis loop the following command always returns 0
m_genVertices_m_particlesIn[i].size()
despite that I see when inspecting with TBrowser that the array of vectors must have some contents. Is there anyone who can help me? I can provide more code and the ntuple if necessary.