#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 18 of file Herwig6Instance.h.
Herwig6Instance::Herwig6Instance |
( |
| ) |
|
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 193 of file Herwig6Instance.cc.
References mps_fire::i, diffTreeTool::index, 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().
195 typedef std::istringstream::traits_type traits;
197 const char *
p =
line.c_str(), *
q;
198 p += std::strspn(p,
" \t\r\n");
200 for(
q = p; std::isalnum(*
q);
q++);
203 const ConfigParam *param;
204 for(param = configParams; param->name; param++)
205 if (
name == param->name)
210 p =
q + std::strspn(
q,
" \t\r\n");
213 std::size_t mult = 1;
214 for(
unsigned int i = 0;
i < 3;
i++) {
215 if (!param->dim[
i].size)
218 if (*p++ != (
i ?
',' :
'('))
221 p += std::strspn(p,
" \t\r\n");
223 for(
q = p; std::isdigit(*
q);
q++);
227 if (ss.bad() || ss.peek() != traits::eof())
230 if (index < param->dim[
i].
offset)
232 index -= param->dim[
i].offset;
233 if (index >= param->dim[
i].size)
236 p =
q + std::strspn(
q,
" \t\r\n");
239 mult *= param->dim[
i].size;
242 if (param->dim[0].size) {
245 p += std::strspn(p,
" \t\r\n");
250 p += std::strspn(p,
" \t\r\n");
252 for(
q = p; *
q && (std::isalnum(*
q) || std::strchr(
".-+", *
q));
q++);
255 p =
q + std::strspn(
q,
" \t\r\n");
259 switch(param->type) {
263 if (ss.bad() || ss.peek() != traits::eof())
266 ((
int*)param->ptr)[pos] =
value;
272 if (ss.bad() || ss.peek() != traits::eof())
275 ((
double*)param->ptr)[pos] =
value;
281 if (ss.bad() || ss.peek() != traits::eof())
284 for(std::string::iterator iter = value_.begin();
285 iter != value_.end(); ++iter)
286 *iter = std::tolower(*iter);
288 if (value_ ==
"yes" || value_ ==
"true" || value_ ==
"1")
290 else if (value_ ==
"no" || value_ ==
"false" || value_ ==
"0")
295 ((
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 |
void* gen::Herwig6Instance::timeoutPrivate |
|
private |