14#include "TVirtualMC.h"
15#include <fairlogger/Logger.h>
29 auto libHandle = dlopen(
filename.c_str(), RTLD_NOW);
31 const char*
error = dlerror();
34 throw fair::FatalException(
"Cannot load " +
filename);
39 const char*
error = dlerror();
40 LOG(fatal) <<
"Cannot find " << funcname <<
" in " <<
filename <<
": " << (
error ?
error :
"the symbol is null");
41 throw fair::FatalException(
"Cannot find " + std::string(funcname) +
" in " +
filename);
48 LOG(info) <<
"Setting up transport engine from library " << libname;
54 if (strcmp(engine,
"TGeant3") == 0) {
56 }
else if (strcmp(engine,
"TGeant4") == 0) {
58 }
else if (strcmp(engine,
"TFluka") == 0) {
60 }
else if (strcmp(engine,
"MCReplay") == 0) {
62 }
else if (strcmp(engine,
"O2TrivialMCEngine") == 0) {
63 execSetupFromPlugin(
"libO2O2TrivialMCEngineSetup",
"_ZN2o223o2trivialmcengineconfig23O2TrivialMCEngineConfigEv");
65 LOG(fatal) <<
"Unsupported engine " << engine;
74 auto vmc = TVirtualMC::GetMC();
75 if (strcmp(vmc->GetName(),
"TGeant4") == 0) {
#define DLLOADER_MAC_LINUX(mac, linux)
char error[CURL_ERROR_SIZE]
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
void execFromPlugin(const char *libname, const char *funcname)
void execSetupFromPlugin(const char *libname, const char *funcname)
static void setup(const char *engine)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"