Hi, all
I want my code to open a root file to update it. i open in “UPDATE” mode, get the pointer of the histogram in the file, and fill the histogram. After each filling i call hpos->Write("",TObject::kOverwrite);. And when i finish filling with many points i close the file.
i was expecting that the “hpos->Write(”",TObject::kOverwrite);" will update the object “hpos” in disk every time i call it. And is doing it if i close the TFile, but when i send a Ctrl+c to the program without closing the Tfile, the “hpos” object do not update on disk. This doesn’t happen if i opened the TFile in “RECREATE” mode, meaning i could send a Ctrl+c and the file gets updated. This behavior only happen when use “kOverwrite”, but i don’t want copies of my objects.
Is it the normal working? because i want that even when a Ctrl+c is send, my data was written (on disk) every time i called “hpos->Write(”",TObject::kOverwrite);".
I hope is clear enough. Thank you in advance for your time.
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided