# How to renew my data during Geant4 simulation

**URL:** <https://root-forum.cern.ch/t/how-to-renew-my-data-during-geant4-simulation/38590>\
**Category:** Newbie\
**Created:** [March 27, 2020, 5:02am UTC](https://root-forum.cern.ch/t/how-to-renew-my-data-during-geant4-simulation/38590 "2020-03-27T05:02:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/lan/32/21362_2.png) [@Lan](https://root-forum.cern.ch/u/Lan)\
**Post date:** [March 27, 2020, 5:02am UTC](https://root-forum.cern.ch/t/how-to-renew-my-data-during-geant4-simulation/38590/1 "2020-03-27T05:02:13Z")

</div>

Hi, everyone!  
I’m a beginner of root and geant4, trying to use root to analysis my simulation results. I was using _TBrowser b_ command to read the .root file created by Geant4 code. But every time I got a new result I have to re-open the browser window to read my newest result. Dose anyone know a more convenient way to do this?

_ROOT Version:_ 6.20  
_Platform:_ Mac 10.15.4

I appreciate for any advice! Thanks in advance.

Lan

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 27, 2020, 7:11am UTC](https://root-forum.cern.ch/t/how-to-renew-my-data-during-geant4-simulation/38590/2 "2020-03-27T07:11:18Z")

</div>

What do you mean by “new result” ? is it a new version of the same ROOT file or a new ROOT file ?

---

<div class="post-metadata">

**Author:** ![Lan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/lan/32/21362_2.png) [@Lan](https://root-forum.cern.ch/u/Lan)\
**Post date:** [March 27, 2020, 7:37am UTC](https://root-forum.cern.ch/t/how-to-renew-my-data-during-geant4-simulation/38590/3 "2020-03-27T07:37:16Z")

</div>

Hi, couet!  
It’s a new version of the same root file.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [March 28, 2020, 11:51am UTC](https://root-forum.cern.ch/t/how-to-renew-my-data-during-geant4-simulation/38590/5 "2020-03-28T11:51:23Z")

</div>

@couet Unfortunately, ROOT does not offer any “reopen” file option.

You need to “Close” your file and then “Open” is again (this can be done with the “right mouse button” in the [TBrowser](https://root.cern/doc/master/classTBrowser.html) when clicking on the file name).

You can also easily do it “manually” there. In the “Command (local):” field execute:  
`{const char *s = "/your/file.root";delete gROOT->GetFile(s);TFile::Open(s);}`  
Then you will need to double-click the “ROOT Files” item there TWO times in order to “refresh” its contents (the first time it will “close” and then it will again “open” the doubly linked list of opened files).

---

<div class="post-metadata">

**Author:** ![Lan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/lan/32/21362_2.png) [@Lan](https://root-forum.cern.ch/u/Lan)\
**Post date:** [March 29, 2020, 9:56am UTC](https://root-forum.cern.ch/t/how-to-renew-my-data-during-geant4-simulation/38590/6 "2020-03-29T09:56:25Z")

</div>

Dear Wile\_E\_Coyote,

Thank you very much!  
Okay, I thought there is a “shortcut”. But it looks like I have to do it this way.
