Monitoring progress in CopyTree

Dear Experts,

is there a way to “monitor” the status of the new tree when applying the method CopyTree (with some cuts) to some starting tree?

If you fill a tree manually, then you have control over the tree entry; is there an analogous way to do that when CopyTree is called?

A related question: how can I call AutoSave() “periodically” when CopyTree is running?
When you fill a tree manually, according to the documentation it is recommended to call AutoSave() from time to time inside the loop, in order to recover data in case of crashes.
Unfortunately, I have no loops when I call CopyTree, so I don’t know how to do the same in this case (if possible and if it makes sense…)

If this makes sense, this could be a “feature request” for the CopyTree method (now the “option” argument is not used at all, as far I can see in the documentation)


P.S I use PyRoot, if this makes any difference.

I do not think there is a monitor or entry-wise control for the CopyTree method. Maybe you can just write your own version of the CopyTree function, see here: … tml#l00181

Regarding autosaving, did you try to set the autosave parameter in the original tree and then calling copy tree? As the resulting is a clone, I guess that it should mantain the autosave number of bytes of the parent.

In any case, writing (in C++) your own version of CopyTree seems the most easy way to go while the developers discuss adding this feature.

1 Like