Example of a circular Tree
Circular Trees are interesting in online real time environments to store the results of the last maxEntries events. for more info, see TTree::SetCircular. Circular trees must be memory resident.
void circular() {
auto T =
new TTree(
"T",
"test circular buffers");
T->Branch(
"px",&px,
"px/F");
T->Branch(
"py",&py,
"px/F");
T->Branch(
"pz",&pz,
"px/F");
T->Branch(
"random",&randomNum,
"random/D");
for (i = 0; i < 65000; i++) {
pz = px*px + py*py;
}
}
This is the base class for the ROOT Random number generators.
A TTree represents a columnar dataset.
- Author
- Rene Brun
Definition in file circular.C.