#include <Herwig6Instance.h>
|
bool | callWithTimeout (unsigned int secs, void(*fn)()) |
|
bool | give (const std::string &line) |
|
| Herwig6Instance () |
|
void | openParticleSpecFile (const std::string fileName) |
|
void | setHerwigRandomEngine (CLHEP::HepRandomEngine *v) |
|
| ~Herwig6Instance () override |
|
template<typename T > |
T | call (T(&fn)()) |
|
template<typename T , typename A > |
T | call (T(&fn)(A), A a) |
|
template<typename T , typename A1 , typename A2 > |
T | call (T(&fn)(A1, A2), A1 a1, A2 a2) |
|
void | call (void(&fn)()) |
|
template<typename A > |
void | call (void(&fn)(A), A a) |
|
template<typename A1 , typename A2 > |
void | call (void(&fn)(A1, A2), A1 a1, A2 a2) |
|
virtual void | enter () |
|
| FortranInstance () |
|
virtual void | leave () |
|
virtual void | upEvnt () |
|
virtual void | upInit () |
|
virtual bool | upVeto () |
|
virtual | ~FortranInstance () noexcept(false) |
|
|
virtual bool | hwwarn (const std::string &fn, int code) |
|
|
bool | timeout (unsigned int secs, void(*fn)()) |
|
Definition at line 22 of file Herwig6Instance.h.
◆ Herwig6Instance()
Herwig6Instance::Herwig6Instance |
( |
| ) |
|
◆ ~Herwig6Instance()
Herwig6Instance::~Herwig6Instance |
( |
| ) |
|
|
override |
◆ _timeout_sighandler()
static void gen::Herwig6Instance::_timeout_sighandler |
( |
int |
signr | ) |
|
|
staticprivate |
◆ callWithTimeout()
bool gen::Herwig6Instance::callWithTimeout |
( |
unsigned int |
secs, |
|
|
void(*)() |
fn |
|
) |
| |
|
inline |
◆ give()
bool Herwig6Instance::give |
( |
const std::string & |
line | ) |
|
Definition at line 173 of file Herwig6Instance.cc.
174 typedef std::istringstream::traits_type traits;
176 const char *
p =
line.c_str(), *
q;
177 p += std::strspn(
p,
" \t\r\n");
179 for (
q =
p; std::isalnum(*
q);
q++)
183 const ConfigParam *param;
184 for (param = configParams; param->name; param++)
185 if (
name == param->name)
190 p =
q + std::strspn(
q,
" \t\r\n");
193 std::size_t
mult = 1;
194 for (
unsigned int i = 0;
i < 3;
i++) {
195 if (!param->dim[
i].size)
198 if (*
p++ != (
i ?
',' :
'('))
201 p += std::strspn(
p,
" \t\r\n");
203 for (
q =
p; std::isdigit(*
q);
q++)
208 if (
ss.bad() ||
ss.peek() != traits::eof())
211 if (index < param->dim[
i].
offset)
213 index -= param->dim[
i].offset;
214 if (
index >= param->dim[
i].size)
217 p =
q + std::strspn(
q,
" \t\r\n");
220 mult *= param->dim[
i].size;
223 if (param->dim[0].size) {
226 p += std::strspn(
p,
" \t\r\n");
231 p += std::strspn(
p,
" \t\r\n");
233 for (
q =
p; *
q && (std::isalnum(*
q) || std::strchr(
".-+", *
q));
q++)
237 p =
q + std::strspn(
q,
" \t\r\n");
241 switch (param->type) {
245 if (
ss.bad() ||
ss.peek() != traits::eof())
254 if (
ss.bad() ||
ss.peek() != traits::eof())
257 ((
double *)param->ptr)[
pos] =
value;
263 if (
ss.bad() ||
ss.peek() != traits::eof())
266 for (std::string::iterator iter = value_.begin(); iter != value_.end(); ++iter)
267 *iter = std::tolower(*iter);
269 if (value_ ==
"yes" || value_ ==
"true" || value_ ==
"1")
271 else if (value_ ==
"no" || value_ ==
"false" || value_ ==
"0")
References mps_fire::i, mps_splice::line, VarParsing::mult, Skims_PA_cff::name, hltrates_dqm_sourceclient-live_cfg::offset, gen::p, data-class-funcs::q, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.
Referenced by Herwig6Hadronizer::initialize(), gen::PomwigHadronizer::readSettings(), Herwig6Hadronizer::readSettings(), Herwig6Hadronizer::upEvnt(), and Herwig6Hadronizer::upInit().
◆ hwwarn()
bool Herwig6Instance::hwwarn |
( |
const std::string & |
fn, |
|
|
int |
code |
|
) |
| |
|
protectedvirtual |
◆ openParticleSpecFile()
void Herwig6Instance::openParticleSpecFile |
( |
const std::string |
fileName | ) |
|
◆ setHerwigRandomEngine()
void gen::Herwig6Instance::setHerwigRandomEngine |
( |
CLHEP::HepRandomEngine * |
v | ) |
|
|
inline |
◆ timeout()
bool Herwig6Instance::timeout |
( |
unsigned int |
secs, |
|
|
void(*)() |
fn |
|
) |
| |
|
private |
◆ gen::cms_hwwarn_
◆ gen::hwrgen_
◆ randomEngine
CLHEP::HepRandomEngine* gen::Herwig6Instance::randomEngine |
|
private |
◆ timeoutPrivate
std::unique_ptr<TimeoutHolder> gen::Herwig6Instance::timeoutPrivate |
|
private |