Read leaf with ExRootTreeReader

Hi expert,
I have a root file generated by Delphes as following. How can I read the leaf inside the root file through ExRootTreeReader in macro? I want to read leaf " Events_size " and “Jet_size”?

gSystem->Load(“libDelphes”);
TChain chain(“Delphes”);
chain.Add(inputFile);
ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
Int_t numberOfEntries = treeReader->GetEntries();

thank you.
Best regards.

for(Int_t entry = 0; entry < numberOfEntries; entry++)
{
treeReader->ReadEntry(entry);
chain.GetEntry(entry);

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.