11 #include "G4GeometryManager.hh"
12 #include "G4PhysicalVolumeStore.hh"
13 #include "G4LogicalVolumeStore.hh"
14 #include "G4SolidStore.hh"
26 extern "C" void *(*dlsym(
void *handle,
const char *symbol))();
48 static const std::string routineName(
"GGSGeoPluginManager::LoadGeoPlugin");
51 G4GeometryManager::GetInstance()->OpenGeometry();
52 G4PhysicalVolumeStore::GetInstance()->Clean();
53 G4LogicalVolumeStore::GetInstance()->Clean();
54 G4SolidStore::GetInstance()->Clean();
57 _ggsLibrary = dlopen(libName.c_str(), RTLD_LAZY);
60 COUT(ERROR) <<
"Cannot load library; " << dlerror() <<
ENDL;
71 const char* dlsym_error = dlerror();
73 COUT(ERROR) <<
"Cannot load symbol create; " << dlsym_error <<
ENDL;
81 _geoConstruction = create_GGSGeometryConstruction();
Abstract class needed to load GGS geometry.
~GGSGeoPluginManager()
Destructor.
static GGSGeoPluginManager & GetInstance()
Get the singleton instance.
Manager for geometry plugin.
#define COUT(level)
Smart log macro. It writes on stdout only if the specified verbosity level is lesser than the maximum...
bool LoadGeoPlugin(const std::string &libName)
Loads the geometry plugin library.