Hi!
In my RunAction BeginOfRunAction, I am feeding in a value defined in a user-defined messenger (which is initialized in the constructor). I have it set to print for now to check what value is being read - I am expecting 0.1, but the worker threads are reading 0. However, 0.1 is being printed, though not by the worker threads.
I assumed the 0.1 must therefore be read by the master thread, but when adding if (G4Threading::G4GetThreadId() == G4Threading::IsMasterThread())
condition to the G4cout, it also prints 0. So which thread is reading the correct value that is printing here? How do I ensure my messenger is being read is a way that is thread-safe?