cms-sw/cmssw — pull request #5470 by makortel (2014-09-22 10:51:39+00:00)
Title: Fixmonopole

Two fixes for G4Monopole in multithreaded sim:
* monopole-specific G4ChordFinder that is thread-local in ChordFinderSetter is now set in the worker threads instead of the master thread
* In CMSMonopolePhysics, do not associate G4ProcessManager to G4Monopole instance but use the association done in G4VUserPhysicsList::InitializeProcessManager() (that is MT-aware)

In addition, redirect G4cout to LogVerbatim (in CustomUIsession) and trim the trailing newline. This way the verbose output from OscarProducer does not get garbled by the message context information. I decided to keep G4cerr to be redirected to LogWarning, because for by-default-visible messages it is probably better to keep the context information.

Tested in CMSSW_7_2_GEANT10_X_2014-09-16-1400 with 100 events of
```
git clone git@github.com:cms-sw/GenProductions Configuration/GenProductions

cmsDriver.py Configuration/GenProductions/python/EightTeV/monopoles_cff.py -s GEN,SIM --conditions auto:mc --datatier GEN-SIM --eventcontent=FEVTDEBUGHLT --customise Configuration/GenProductions/monopoles_customise.monopoles_customise --fileout file:mp.root --mc -n 10 --no_exec
```
Results from serial OscarProducer are the identical before and after this PR, and after this PR the results from serial and 1-thread OscarMTProducer are identical.