Message: Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C) 

Forum: Multithreading
Date: 04 Feb, 2013
From: Cristian Acuņa <Cristian Acuņa>

Hello everybody!

I'm a newbie (in programming and Geant4 as well), and I'm having problems with a certain simulation using Geant4 with TOP-C. I'm simulating a very simple geometry of a LYSO scintillator crystal with two sensors. I'm shooting gammas to it, and saving the Energy deposited on the sensors on an TNtuple and storing the data on a root file.

The problem is that when I use the multi threaded version of the code, I have several errors with the storing of the data, because every slave process writes the data on the same file (the exact error is "Error in <TROOT::WriteTObject>: The current directory (root) is not associated with a file. The object (Tuple) has not been written.")

If somebody knows a way to store data using ROOT (or g4tools) in an efficient way, I would appreciate the help very much.

I think the solution may be to create a file for every slave and then store the data generated by every slave on this files and merge them, but I currently don't know how to do this.

Thanks in advance.

P.D: Sorry for the bad English.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C)   (Andrea Dotti - 04 Feb, 2013)
(_ Feedback: Re: Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C)   (Cristian Acuņa - 04 Feb, 2013)
(_ Ok: Re: Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C)   (Cristian Acuņa - 07 Feb, 2013)
 Add Message Add Message
to: "Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C)"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews