Install (with pip):
$ python -m pip install g4edge-testdata
Instantiating a G4EdgeTestData
object:
from g4edgetestdata import G4EdgeTestData
g4data = G4EdgeTestData()
Clones g4edge/testdata in a temporary
location (not preserved across system reboots), unless the environment variable
G4EDGE_TESTDATA
is set and points to the location of an existing
g4edge/testdata clone.
Alternatively, the path to an existing g4edge/testdata clone can be provided to the class constructor:
from g4edgetestdata import G4EdgeTestData
g4data = G4EdgeTestData("path/to/g4edge/testdata")
Access to data files is provided through the square brackets operator:
>>> g4data["gdml/001_box.gdml"]
PosixPath('/tmp/g4edge-testdata-gipert/data/gdml/001_box.gdml')