HerwigUIProvider is an implementation of the HerwigUI interface getting its input from CMSSW configs.
Definition at line 18 of file HerwigUIProvider.h.
Herwig::HerwigUIProvider::HerwigUIProvider |
( |
const edm::ParameterSet & |
pset, |
|
|
std::string |
inputFileName, |
|
|
RunMode::Mode |
runMode |
|
) |
| |
Constructor from the arguments provided by CMSSW.
Definition at line 31 of file HerwigUIProvider.cc.
47 edm::LogError(
"Herwig7Interface") <<
"Invalid run mode: RunMode::ERROR was passed to Herwig.\n";
70 if (
pset.getUntrackedParameter<
int>(
"numberEvents", -1) != -1)
71 nEvents_ =
pset.getUntrackedParameter<
int>(
"numberEvents", 1);
78 if (
pset.getUntrackedParameter<
unsigned int>(
"debugOutput", 0))
79 ThePEG::Debug::setDebug(
pset.getUntrackedParameter<
unsigned int>(
"debugOutput", 0));
82 if (
pset.getUntrackedParameter<
bool>(
"debugFPE",
false))
83 ThePEG::Debug::unmaskFpuErrors();
86 if (
pset.getUntrackedParameter<
bool>(
"exitOnError",
false))
87 ThePEG::Repository::exitOnError() = 1;
90 if (
pset.getUntrackedParameter<
bool>(
"hideTics",
false))
94 if (
pset.getUntrackedParameter<
int>(
"seed", 0) != 0)
95 seed_ =
pset.getUntrackedParameter<
int>(
"seed", 0);
102 if (
pset.getUntrackedParameter<
int>(
"jobs", 1) != 1)
103 jobs_ =
pset.getUntrackedParameter<
int>(
"jobs", 1);
106 std::vector<std::string> aReadDirectories =
107 pset.getUntrackedParameter<std::vector<std::string> >(
"appendReadDirectories", std::vector<std::string>());
108 std::vector<std::string> pReadDirectories =
109 pset.getUntrackedParameter<std::vector<std::string> >(
"prependReadDirectories", std::vector<std::string>());
114 std::vector<std::string> aPath =
115 pset.getUntrackedParameter<std::vector<std::string> >(
"appendPath", std::vector<std::string>());
116 std::vector<std::string> pPath =
117 pset.getUntrackedParameter<std::vector<std::string> >(
"prependPath", std::vector<std::string>());
118 for (
size_t i = 0;
i < aPath.size(); ++
i)
119 ThePEG::DynamicLoader::appendPath(aPath[
i]);
120 for (
size_t i = 0;
i < pPath.size(); ++
i)
121 ThePEG::DynamicLoader::prependPath(pPath[
i]);
124 if (!
pset.getUntrackedParameter<
std::string>(
"integrationList",
"").empty()) {
129 if (
pset.getUntrackedParameter<
unsigned int>(
"jobSize", 0) != 0) {
131 jobsize_ =
pset.getUntrackedParameter<
unsigned int>(
"jobSize", 1);
132 ThePEG::SamplerBase::setIntegratePerJob(
jobsize_);
137 if (
pset.getUntrackedParameter<
unsigned int>(
"maxJobs", 0) != 0) {
139 maxjobs_ =
pset.getUntrackedParameter<
unsigned int>(
"maxJobs", 1);
140 ThePEG::SamplerBase::setIntegrationJobs(
maxjobs_);
145 if (
pset.getUntrackedParameter<
bool>(
"resume",
false))
References appendReadDirectories_, dqm::qstatus::ERROR, mps_fire::i, integrationList_, jobs_, jobsize_, maxjobs_, nEvents_, prependReadDirectories_, muonDTDigis_cfi::pset, repository_, gen::ParameterCollector::resolve(), resume_, runMode_, seed_, setupfile_, AlCaHLTBitMon_QueryRunRegistry::string, tag_, and tics_.
void Herwig::HerwigUIProvider::setRunMode |
( |
RunMode::Mode |
runMode, |
|
|
const edm::ParameterSet & |
pset, |
|
|
std::string |
inputFile = "" |
|
) |
| |
Change run mode of Herwig Additionally pass the name of the new input file
Function sets jobsize_ and maxjobs_ accordingly to the run modes.
Definition at line 149 of file HerwigUIProvider.cc.
157 if (
pset.getUntrackedParameter<
unsigned int>(
"jobSize", 0) != 0) {
158 jobsize_ =
pset.getUntrackedParameter<
unsigned int>(
"jobSize", 1);
159 ThePEG::SamplerBase::setIntegratePerJob(
jobsize_);
162 if (
pset.getUntrackedParameter<
unsigned int>(
"maxJobs", 0) != 0) {
163 maxjobs_ =
pset.getUntrackedParameter<
unsigned int>(
"maxJobs", 1);
164 ThePEG::SamplerBase::setIntegrationJobs(
maxjobs_);
168 ThePEG::SamplerBase::setIntegratePerJob(
jobsize_);
170 ThePEG::SamplerBase::setIntegrationJobs(
maxjobs_);
References dtResolutionTest_cfi::inputFile, inputfile_, jobsize_, maxjobs_, muonDTDigis_cfi::pset, runMode(), and runMode_.