Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
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")
Пример #4
0
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")
Пример #5
0
def test_nested_boxes():
    geom = nested_boxes()
    print(geom.store)
Пример #6
0
def test_nested_boxes():
    geom = nested_boxes()
    print geom.store