Fixes replicated backup entries appearing on output file #349
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should solve issue #338
I believe the trick was to add
fOutputFile->Write(0, TObject::kOverwrite)
, this fixes additional entries appearing when using.ls
.However, I believe that when opening the file using
restRoot
, since we create a new instance, two versions of the object will appear. One it is the instance of the object, the other is the key stored in file.In reality this is not a 100% fix. The point is that when we open the file using
restRoot file.root
and then use theTBrowser
the browser shows a replicated object because one is thekey
and the other is thepointer
.If we just do open it using
TFile
then replicated entries will not appear.