def test_gegede_gdml_boxes(): geom = nested_boxes() obj = gegede.export.gdml.convert(geom) s = gegede.export.gdml.dumps(obj) assert s print(s.decode()) gegede.export.gdml.validate(s)
def test_gegede_gdml(): geom = nested_boxes() obj = gegede.export.gdml.convert(geom) s = gegede.export.gdml.dumps(obj) assert s print s gegede.export.gdml.validate(s)
def test_read_gdml_in_root(): geom = nested_boxes() obj = gegede.export.gdml.convert(geom) s = gegede.export.gdml.dumps(obj) gegede.export.gdml.validate(s) geo = ROOT.TGeoManager() fd, fname = tempfile.mkstemp(suffix='.gdml') open(fname, 'w').write(s) print(fname) geo.Import(fname) if not geo: print("WARNING: ROOT still fails to parse GDML's own test file")
def test_read_gdml_in_root(): geom = nested_boxes() obj = gegede.export.gdml.convert(geom) s = gegede.export.gdml.dumps(obj) gegede.export.gdml.validate(s) geo = ROOT.TGeoManager() fd, fname = tempfile.mkstemp(suffix='.gdml') open(fname, 'w').write(s) print (fname) geo.Import(fname) if not geo: print ("WARNING: ROOT still fails to parse GDML's own test file")
def test_nested_boxes(): geom = nested_boxes() print(geom.store)
def test_nested_boxes(): geom = nested_boxes() print geom.store