Message: Re: Question on accessing G4 from different threads Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Question on accessing G4 from different threads 

Forum: Multithreading
Re: Question Question on accessing G4 from different threads (Simon Spannagel)
Re: None Re: Question on accessing G4 from different threads (Makoto Asai)
Re: None Re: Question on accessing G4 from different threads (Simon Spannagel)
Date: 01 Aug, 2018
From: Jonathan Madsen <Jonathan Madsen>

In addition to Makoto's recommendation for the event generation, it sounds like you could do the external processing in the overload to G4Run::RecordEvent(const G4Event*).

The G4THitsMap instance(s) from the sensitive detectors here (obtained from G4HCofThisEvent) will be thread-local and independent of any other events. You are free here to call your external routines and it will execute on the current thread -- effectively executing your external work in parallel -- you just need to make sure that your external processing code is thread-safe.

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

1 None: Re: Question on accessing G4 from different threads   (Simon Spannagel - 01 Aug, 2018)
(_ None: Re: Question on accessing G4 from different threads   (Makoto Asai - 02 Aug, 2018)
 Add Message Add Message
to: "Re: Question on accessing G4 from different threads"

 Subscribe Subscribe

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