def loadDDG4(): import ROOT from ROOT import gSystem # Try to load libglapi to avoid issues with TLS Static # Turn off all errors from ROOT about the library missing if ('libglapi' not in gSystem.GetLibraries()): orgLevel = ROOT.gErrorIgnoreLevel ROOT.gErrorIgnoreLevel = 6000 gSystem.Load("libglapi") ROOT.gErrorIgnoreLevel = orgLevel import platform import os if platform.system() == "Darwin": gSystem.SetDynamicPath(os.environ['DD4HEP_LIBRARY_PATH']) os.environ['DYLD_LIBRARY_PATH'] = os.pathsep.join([ os.environ['DD4HEP_LIBRARY_PATH'], os.environ.get('DYLD_LIBRARY_PATH', '') ]).strip(os.pathsep) result = gSystem.Load("libDDG4Plugins") if result < 0: raise Exception( 'DDG4.py: Failed to load the DDG4 library libDDG4Plugins: ' + gSystem.GetErrorStr()) from ROOT import dd4hep as module return module
def loadDDRec(): from ROOT import gSystem result = gSystem.Load("libDDRec") if result < 0: raise Exception('DDG4.py: Failed to load the DDG4 library libDDRec: ' + gSystem.GetErrorStr()) from ROOT import dd4hep as module core.rec = module.rec return module.rec
def loadDD4hep(): import os, sys # Add ROOT to the python path in case it is not yet there.... sys.path.append(os.environ['ROOTSYS']+os.sep+'lib') import ROOT from ROOT import gSystem result = gSystem.Load("libDDCore") if 0 != result: raise Exception('DDG4.py: Failed to load the Geant4 library libDDCore: '+gSystem.GetErrorStr()) from ROOT import DD4hep as module return module
def loadDD4hep(): import os, sys # Add ROOT to the python path in case it is not yet there.... sys.path.append(os.environ['ROOTSYS']+os.sep+'lib') import ROOT from ROOT import gSystem import platform if platform.system()=="Darwin": gSystem.SetDynamicPath(os.environ['DD4HEP_LIBRARY_PATH']) result = gSystem.Load("libDDCore") if result < 0: raise Exception('DD4hep.py: Failed to load the DD4hep library libDDCore: '+gSystem.GetErrorStr()) from ROOT import DD4hep as module return module
def loaddd4hep(): import os import sys # Add ROOT to the python path in case it is not yet there.... sys.path.append(os.environ['ROOTSYS'] + os.sep + 'lib') from ROOT import gSystem import platform if platform.system() == "Darwin": gSystem.SetDynamicPath(os.environ['DD4HEP_LIBRARY_PATH']) os.environ['DYLD_LIBRARY_PATH'] = os.pathsep.join([os.environ['DD4HEP_LIBRARY_PATH'], os.environ.get('DYLD_LIBRARY_PATH', '')]).strip(os.pathsep) result = gSystem.Load("libDDCore") if result < 0: raise Exception('dd4hep.py: Failed to load the dd4hep library libDDCore: ' + gSystem.GetErrorStr()) from ROOT import dd4hep as module return module
def loadDDG4(): ## import ROOT ## done in import * above from ROOT import gSystem ## Try to load libglapi to avoid issues with TLS Static ## Turn off all errors from ROOT about the library missing orgLevel = ROOT.gErrorIgnoreLevel ROOT.gErrorIgnoreLevel = 6000 gSystem.Load("libglapi") ROOT.gErrorIgnoreLevel = orgLevel result = gSystem.Load("libDDG4Plugins") if 0 != result: raise Exception( 'DDG4.py: Failed to load the Geant4 library libDDG4: ' + gSystem.GetErrorStr()) from ROOT import DD4hep as module return module
def loadDDG4(): ## import ROOT ## done in import * above from ROOT import gSystem ## Try to load libglapi to avoid issues with TLS Static ## Turn off all errors from ROOT about the library missing orgLevel = ROOT.gErrorIgnoreLevel ROOT.gErrorIgnoreLevel=6000 gSystem.Load("libglapi") ROOT.gErrorIgnoreLevel=orgLevel import platform import os if platform.system()=="Darwin": gSystem.SetDynamicPath(os.environ['DD4HEP_LIBRARY_PATH']) result = gSystem.Load("libDDG4Plugins") if result < 0: raise Exception('DDG4.py: Failed to load the DDG4 library libDDG4Plugins: '+gSystem.GetErrorStr()) from ROOT import dd4hep as module return module