#include <Herwig6Instance.h>
|
bool | callWithTimeout (unsigned int secs, void(*fn)()) |
|
bool | give (const std::string &line) |
|
| Herwig6Instance (CLHEP::HepRandomEngine *randomEngine=0) |
|
| Herwig6Instance (int dummy) |
|
void | openParticleSpecFile (const std::string fileName) |
|
virtual | ~Herwig6Instance () |
|
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 () |
|
|
virtual bool | hwwarn (const std::string &fn, int code) |
|
|
bool | timeout (unsigned int secs, void(*fn)()) |
|
Definition at line 16 of file Herwig6Instance.h.
Herwig6Instance::Herwig6Instance |
( |
CLHEP::HepRandomEngine * |
randomEngine = 0 | ) |
|
Definition at line 82 of file Herwig6Instance.cc.
CLHEP::HepRandomEngine & getEngineReference()
CLHEP::HepRandomEngine * randomEngine
Herwig6Instance::Herwig6Instance |
( |
int |
dummy | ) |
|
Herwig6Instance::~Herwig6Instance |
( |
| ) |
|
|
virtual |
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 201 of file Herwig6Instance.cc.
References i, getHLTprescales::index, VarParsing::mult, mergeVDriftHistosByStation::name, evf::evtn::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().
203 typedef std::istringstream::traits_type traits;
205 const char *
p =
line.c_str(), *
q;
206 p += std::strspn(p,
" \t\r\n");
208 for(
q = p; std::isalnum(*
q);
q++);
211 const ConfigParam *param;
212 for(param = configParams; param->name; param++)
213 if (
name == param->name)
218 p =
q + std::strspn(
q,
" \t\r\n");
221 std::size_t
mult = 1;
222 for(
unsigned int i = 0;
i < 3;
i++) {
223 if (!param->dim[
i].size)
226 if (*p++ != (
i ?
',' :
'('))
229 p += std::strspn(p,
" \t\r\n");
231 for(
q = p; std::isdigit(*
q);
q++);
235 if (ss.bad() || ss.peek() != traits::eof())
238 if (index < param->dim[
i].
offset)
240 index -= param->dim[
i].offset;
241 if (index >= param->dim[
i].size)
244 p =
q + std::strspn(
q,
" \t\r\n");
247 mult *= param->dim[
i].size;
250 if (param->dim[0].size) {
253 p += std::strspn(p,
" \t\r\n");
258 p += std::strspn(p,
" \t\r\n");
260 for(
q = p; *
q && (std::isalnum(*
q) || std::strchr(
".-+", *
q));
q++);
263 p =
q + std::strspn(
q,
" \t\r\n");
267 switch(param->type) {
271 if (ss.bad() || ss.peek() != traits::eof())
274 ((
int*)param->ptr)[pos] =
value;
280 if (ss.bad() || ss.peek() != traits::eof())
283 ((
double*)param->ptr)[pos] =
value;
289 if (ss.bad() || ss.peek() != traits::eof())
292 for(std::string::iterator iter = value_.begin();
293 iter != value_.end(); ++iter)
294 *iter = std::tolower(*iter);
296 if (value_ ==
"yes" || value_ ==
"true" || value_ ==
"1")
298 else if (value_ ==
"no" || value_ ==
"false" || value_ ==
"0")
303 ((
int*)param->ptr)[pos] =
value;
unsigned int offset(bool)
bool Herwig6Instance::hwwarn |
( |
const std::string & |
fn, |
|
|
int |
code |
|
) |
| |
|
protectedvirtual |
void Herwig6Instance::openParticleSpecFile |
( |
const std::string |
fileName | ) |
|
bool Herwig6Instance::timeout |
( |
unsigned int |
secs, |
|
|
void(*)() |
fn |
|
) |
| |
|
private |
CLHEP::HepRandomEngine* gen::Herwig6Instance::randomEngine |
|
private |
void* gen::Herwig6Instance::timeoutPrivate |
|
private |