I specified the solution as using the Snapshot method to add a branch to a tree in the root file. However I had one other tree in my root file which was lost. So I wanted to ask is there a way to avoid this? Thanks
Thanks for the reply. Yeah that’s what I thought about first, having a different file name. But I wanted to look for a way to keep my original file and make changes to that.
I see. Then a good start is to use a RSnapshotOptions instance passing it to the Snapshot method of RDataFrame (in particular have a look to RSnapshotOptions::fMode).
So something weird happened. The update method ran fine but when I ran my code a second time after some modifications all the data was gone. I think between the Define method and the Snapshot method I am doing something wrong. I have attached my code below