File size not returned since 6.30 update

I have an application writing incoming data to a rootfile’s tree, i.e. I am filling a tree in a loop and at the end writing the tree to the file. I have a checkpoint where I check if the file’s size is exceeding a certain threshold. I keep checking the file size in my loop with


Everything was working great in Root 6.24 but since I upgraded to 6.30 this call always return 0 although in the end I get a correctly written file. I don’t understand.

I do not see this problem with ROOT master:

% root -n
  | Welcome to ROOT 6.33/01               |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosx64 on Apr 09 2024, 12:57:06                      |
  | From heads/master@v6-31-01-1633-g74c9a26179                      |
  | With Apple clang version 15.0.0 (clang-1500.3.9.4)               |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |

root [0] auto f = new TFile("hsimple.root");
root [1] f->GetSize()
(long long) 420700
root [2] 

Sorry, you can close or delete this post it was just a stupid mistake of mine I failed to see. Everything is working as expected now.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.