#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 |
|
void | call (void(&fn)()) |
|
template<typename T > |
T | call (T(&fn)()) |
|
template<typename A > |
void | call (void(&fn)(A), A a) |
|
template<typename T , typename A > |
T | call (T(&fn)(A), A a) |
|
template<typename A1 , typename A2 > |
void | call (void(&fn)(A1, A2), A1 a1, A2 a2) |
|
template<typename T , typename A1 , typename A2 > |
T | call (T(&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 |
( |
| ) |
|
Definition at line 84 of file Herwig6Instance.cc.
CLHEP::HepRandomEngine * randomEngine
std::unique_ptr< TimeoutHolder > timeoutPrivate
Herwig6Instance::~Herwig6Instance |
( |
| ) |
|
|
override |
static void gen::Herwig6Instance::_timeout_sighandler |
( |
int |
signr | ) |
|
|
staticprivate |
bool gen::Herwig6Instance::callWithTimeout |
( |
unsigned int |
secs, |
|
|
void(*)() |
fn |
|
) |
| |
|
inline |
bool Herwig6Instance::give |
( |
const std::string & |
line | ) |
|
Definition at line 195 of file Herwig6Instance.cc.
References mps_fire::i, dataset::name, PFRecoTauDiscriminationByIsolation_cfi::offset, gen::p, lumiQueryAPI::q, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.
Referenced by Herwig6Hadronizer::initialize(), gen::PomwigHadronizer::readSettings(), Herwig6Hadronizer::readSettings(), Herwig6Hadronizer::upEvnt(), and Herwig6Hadronizer::upInit().
197 typedef std::istringstream::traits_type traits;
199 const char *
p =
line.c_str(), *
q;
200 p += std::strspn(p,
" \t\r\n");
202 for(
q = p; std::isalnum(*
q);
q++);
205 const ConfigParam *param;
206 for(param = configParams; param->name; param++)
207 if (
name == param->name)
212 p =
q + std::strspn(
q,
" \t\r\n");
215 std::size_t mult = 1;
216 for(
unsigned int i = 0;
i < 3;
i++) {
217 if (!param->dim[
i].size)
220 if (*p++ != (
i ?
',' :
'('))
223 p += std::strspn(p,
" \t\r\n");
225 for(
q = p; std::isdigit(*
q);
q++);
229 if (ss.bad() || ss.peek() != traits::eof())
232 if (index < param->dim[
i].
offset)
234 index -= param->dim[
i].offset;
235 if (index >= param->dim[
i].size)
238 p =
q + std::strspn(
q,
" \t\r\n");
241 mult *= param->dim[
i].size;
244 if (param->dim[0].size) {
247 p += std::strspn(p,
" \t\r\n");
252 p += std::strspn(p,
" \t\r\n");
254 for(
q = p; *
q && (std::isalnum(*
q) || std::strchr(
".-+", *
q));
q++);
257 p =
q + std::strspn(
q,
" \t\r\n");
261 switch(param->type) {
265 if (ss.bad() || ss.peek() != traits::eof())
268 ((
int*)param->ptr)[pos] =
value;
274 if (ss.bad() || ss.peek() != traits::eof())
277 ((
double*)param->ptr)[pos] =
value;
283 if (ss.bad() || ss.peek() != traits::eof())
286 for(std::string::iterator iter = value_.begin();
287 iter != value_.end(); ++iter)
288 *iter = std::tolower(*iter);
290 if (value_ ==
"yes" || value_ ==
"true" || value_ ==
"1")
292 else if (value_ ==
"no" || value_ ==
"false" || value_ ==
"0")
297 ((
int*)param->ptr)[pos] =
value;
bool Herwig6Instance::hwwarn |
( |
const std::string & |
fn, |
|
|
int |
code |
|
) |
| |
|
protectedvirtual |
void Herwig6Instance::openParticleSpecFile |
( |
const std::string |
fileName | ) |
|
void gen::Herwig6Instance::setHerwigRandomEngine |
( |
CLHEP::HepRandomEngine * |
v | ) |
|
|
inline |
bool Herwig6Instance::timeout |
( |
unsigned int |
secs, |
|
|
void(*)() |
fn |
|
) |
| |
|
private |
CLHEP::HepRandomEngine* gen::Herwig6Instance::randomEngine |
|
private |
std::unique_ptr<TimeoutHolder> gen::Herwig6Instance::timeoutPrivate |
|
private |