cms-sw/cmssw — pull request #6264 by makortel (2014-11-07 10:43:11+00:00)
Title: Disable SimWatchers for MT sim in presence of more than one thread + additional fixes

Most of SimWatchers are thread-unsafe, so for now support for them is explicitly disabled if running OscarMTProducer with more than one thread. Same is done for the connection to external SimActivityRegistry (connection to visualization?). It is assumed now that one thread would be sufficient for both of these activities.

Introduce two optional CustomUIsession classes for MT (no effect for serial OscarProducer nor the default behaviour of OscarMTProducer) for making it easier to interpret debug output from Geant4 in the presence of multiple threads:
* CustomUIsessionThreadPrefix: use MessageLogger, but add a thread-specific prefix for each line
* CustomUIsessionToFile: forward the output to thread-specific files

The first class is for small to moderate size output, and the latter for large outputs (e.g. when the synchronization in MessageLogger makes the MT job essentially serial thus hiding possible MT-specific issues).