Commit 4261b60a authored by Michal Mazurek's avatar Michal Mazurek Committed by Rosen Matev
Browse files

Prepare Gauss-on-Gaussino for the changes in the location of XML files

parent d196f719
Pipeline #2724099 passed with stage
in 15 seconds
......@@ -158,9 +158,14 @@ class LHCbGeo(LHCbConfigurableUser):
gaussgeo.GeoItemsNames.append(el)
else:
from Gauss.Geometry import xml_writer
from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc
LHCb__Det__LbDD4hep__DD4hepSvc().DescriptionLocation = \
from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc as DD4hepSvc
from Configurables import DDDBConf
desc_loc, desc_file = \
xml_writer.create_xml(self._listOfXMLIncludes_)
dddbconf = DDDBConf()
DD4hepSvc().DescriptionLocation = desc_loc
dddbconf.GeometryMain = desc_file
dddbconf.GeometryVersion = ''
self.MakeItTalkToGaussino()
......
......@@ -20,7 +20,7 @@ import os
# file
def create_xml(includesfiles):
unique_includes = list(OrderedDict.fromkeys(includesfiles))
detectorroot = os.path.join(os.environ['DETECTOR_PROJECT_ROOT'], 'compact/')
detectorroot = os.path.join(os.environ['DETECTOR_PROJECT_ROOT'], 'compact/trunk/')
def addroot(p):
if p[0] != '.' and p[0] != '/':
......@@ -78,4 +78,4 @@ def create_xml(includesfiles):
with open(tmpfile, "w") as f:
f.write(xmlstr)
log.info('Wrote xml file to {}'.format(tmpfile))
return tmpfile
return tempfile.tempdir, tmpfile.replace(tempfile.tempdir + '/', '')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment