Message: Re: 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

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

Forum: Multithreading
Re: None Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C) (Cristian Acuņa)
Re: Idea Re: Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C) (Andrea Dotti)
Re: Feedback Re: Saving data on .root File using ParGeant4 (Geant4 4.9.6p01 + TOP-C) (Cristian Acuņa)
Date: 07 Feb, 2013
From: Cristian Acuņa <Cristian Acuņa>

Hi again.

I just tried the solution proposed by Mr. Dotti, and It worked just great. But anyway, there are some things that I would like to mention:

As I said before, I'm not working with the Geant4 Multi-thread version, but with Geant4 Version 9.5.1 (the standard one) with a local installation of marshalgen and top-c. So I copied the files for the G4MTGetTid class (in fact it just contains a the function gettid() that return the pid of the running process) for implementing the given solution.

The other interesting thing is that with this set-up you have no problem using non thread-safe methods of ROOT at all; I just used methods of TNtuple and TFile that are non thread-safe and they worked properly on multi-thread, so I recommend the people using multi-thread to give a try of this solution (explained in detail on the ParN02 and ParN03 examples of geant4, and in this link as well http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Examples/parallel.html)

At last, for the merging of the different files generated (in my case 12, as the number of slaves processes that I implemented on my simulation) I used a program on the bin directory of ROOT (hadd).

Best wishes,

Cristian

 Add Message Add Message
to: "Re: 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