Newer
Older
#==========================================================================
#--------------------------------------------------------------------------
# Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
# All rights reserved.
#
# For the licensing terms see $DD4hepINSTALL/LICENSE.
# For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
#
#==========================================================================
from __future__ import absolute_import, unicode_literals
Marko Petric
committed
logging.basicConfig(format='%(levelname)s: %(message)s')
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
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())
core.rec = module.rec
return module.rec
# We are nearly there ....
name_space = __import__(__name__)
def import_namespace_item(ns, nam):
scope = getattr(name_space, ns)
attr = getattr(scope, nam)
setattr(name_space, nam, attr)
#---------------------------------------------------------------------------
#
try:
logger.error('+--%-100s--+', 100 * '-')
logger.error('| %-100s |', 'Failed to load DDRec library:')
logger.error('| %-100s |', str(X))
logger.error('+--%-100s--+', 100 * '-')
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import_namespace_item('rec', 'CellIDPositionConverter')
import_namespace_item('rec', 'FixedPadSizeTPCStruct')
import_namespace_item('rec', 'ZPlanarStruct')
import_namespace_item('rec', 'ZPlanarStruct::LayerLayout')
import_namespace_item('rec', 'ZDiskPetalsStruct')
import_namespace_item('rec', 'ZDiskPetalsStruct::LayerLayout')
import_namespace_item('rec', 'ConicalSupportStruct')
import_namespace_item('rec', 'LayeredCalorimeterStruct')
import_namespace_item('rec', 'LayeredCalorimeterStruct::Layer')
import_namespace_item('rec', 'NeighbourSurfacesStruct')
import_namespace_item('rec', 'DetectorSurfaces')
import_namespace_item('rec', 'IMaterial')
import_namespace_item('rec', 'ISurface')
import_namespace_item('rec', 'ICylinder')
import_namespace_item('rec', 'ICone')
import_namespace_item('rec', 'SurfaceType')
import_namespace_item('rec', 'MaterialData')
import_namespace_item('rec', 'MaterialManager')
import_namespace_item('rec', 'VolSurfaceBase')
import_namespace_item('rec', 'VolSurface')
import_namespace_item('rec', 'VolSurfaceList')
import_namespace_item('rec', 'VolPlaneImpl')
import_namespace_item('rec', 'VolCylinderImpl')
import_namespace_item('rec', 'VolConeImpl')
import_namespace_item('rec', 'Surface')
import_namespace_item('rec', 'CylinderSurface')
import_namespace_item('rec', 'ConeSurface')
import_namespace_item('rec', 'SurfaceList')
import_namespace_item('rec', 'Vector2D')
import_namespace_item('rec', 'Vector3D')
import_namespace_item('rec', 'SurfaceManager')
import_namespace_item('rec', 'FixedPadSizeTPCData')
import_namespace_item('rec', 'ZPlanarData')
import_namespace_item('rec', 'ZDiskPetalsData')
import_namespace_item('rec', 'ConicalSupportData')
import_namespace_item('rec', 'LayeredCalorimeterData')
import_namespace_item('rec', 'NeighbourSurfacesData')
# Now instantiate the entire thing
import_rec()
std_list_VolSurface = core.std_list('VolSurface')