Message: Re: FieldManager handling Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: FieldManager handling 

Forum: Multithreading
Re: None FieldManager handling (Andrea Di Simone)
Date: 06 Nov, 2012
From: Andrea Dotti <Andrea Dotti>

Hi Andrea, I am not sure I completely get your message. I will try to give my interpretation.

In the example the Field manager and field pointers are a class data member. To reduce memory usage the A01DetectorDescription instance is shared among threads the per-thread data members have to be created using a thread-local-storage method. This is implemented via the use of "static __thread".

In the snippet of the code you have send there are no data members for the instances of field manager and field objects. Thus I think that your code should work without modifications as long as the snippet of the code is in the G4VUserDetectorConstruction::ConstructSlave() method (and provided that the classes you call do not use static objects or rely on shared resources that could give problems in a MT environment).

Hope this helps, Andrea

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

1 None: Re: FieldManager handling   (Andrea Di Simone - 06 Nov, 2012)
(_ Warning: Re: FieldManager handling   (Andrea Dotti - 06 Nov, 2012)
(_ None: Re: FieldManager handling   (Andrea Di Simone - 06 Nov, 2012)
(_ Feedback: Re: FieldManager handling   (Andrea Dotti - 06 Nov, 2012)
(_ None: Re: FieldManager handling   (Andrea Di Simone - 07 Nov, 2012)
 Add Message Add Message
to: "Re: FieldManager handling"

 Subscribe Subscribe

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