cms-sw/cmssw — pull request #4370 by makortel (2014-06-24 12:55:27+00:00)
Title: First steps for using Geant4 MT

This PR takes first steps towards using Geant4MT in CMSSW. Most modifications are in OscarMTProducer and in new MT-specific classes in order to not interfere with the current OscarProducer. DDDWorld was, however, slightly modified, but the changes should be fine for OscarProducer.

What is implemented:
- std::thread launched from OscarMTProducer::globalBeginRun() for the Geant4 "master thread"
- Encapsulated in OscarMTMasterThread (edm::RunCache of OscarMTProducer)
- synchronization with the CMSSW thread and the master thread with mutex+condition variable
- Geant4 initialization in the master thread (RunManagerMT)
- Sharing geometry and physics list to RunManagerMTWorker, run in the CMSSW threads

Changes have been tested such that when splitting the step1 of wf 1.0 to GEN and SIM parts, the SIM job does not crash with OscarMTProducer.

Should not affect regular OscarProducer.

FYI @civanch, @davidlange6, @Dr15Jones