Is it possible to read a TTree while it is being written?

Dear experts,

Is it possible to read a previous entry of a TTree while it is being written? If so, is there an example of how to do it?

Best,
Alvaro

Yes but it is a delicate (by default it will the values/variables used for input:

int varname;
t->Branch(branchname, &varname);
varname = 3;
t->Fill();
varname = 4;
t->Fill();
t->GetEntry(0);
assert( varname == 3);
1 Like

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