forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Threaded Random Number Interface for OscarProducer
Modify OscarProducer to use the new interface for the random number service that requires a StreamID argument to the getEngine function. Modify the module to be a "One" type module with shared resources declared for GEANT and the CLHEPRandomEngine. It is also "watching" runs. Note that with this change it will now seg fault if any random numbers were generated in the constructor or beginRun. SimProducer is fixed to deal with the changed module type. We are presuming the static code checking would reveal any other threading problems related to making this a "One" type module. This is for GEANT 4.9.X. We will need to revisit this when we move to 4.10.X, which will be the multithreaded GEANT. The only changes in Validation are the addition of a missing forward declaration revealed by the other changes.
- Loading branch information
Showing
10 changed files
with
88 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef FWCore_Concurrency_SharedResourceNames_h | ||
#define FWCore_Concurrency_SharedResourceNames_h | ||
// | ||
// Package: Concurrency | ||
// Class : ShareResourceNames | ||
// | ||
/**\class edm::SharedResourceNames | ||
Description: Contains the names of external shared resources. | ||
*/ | ||
// | ||
// Original Author: W. David Dagenhart | ||
// Created: 19 November 2013 | ||
// | ||
|
||
#include <string> | ||
|
||
namespace edm { | ||
class SharedResourceNames { | ||
public: | ||
// GEANT 4.9.X needs to be declared a shared resource | ||
// In the future, 4.10.X and later might not need to be | ||
static const std::string kGEANT; | ||
static const std::string kCLHEPRandomEngine; | ||
}; | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "FWCore/Concurrency/interface/SharedResourceNames.h" | ||
|
||
const std::string edm::SharedResourceNames::kGEANT = "GEANT"; | ||
const std::string edm::SharedResourceNames::kCLHEPRandomEngine = "CLHEPRandomEngine"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters