Commit 9fa39d4
Safeguard for Opticks binary tree size (#141)
Stop Opticks geometry read-in if binary tree size blows up. Warn user
and suggest solution.
Solves #77
Test:
./build/src/simg4ox -g
dune_forward_geometry_2025_april_replaced_elliptical_tubes.gdml -m
esi-g4ox/run.mac
Exits with error as expected:
```Too many nodes in binary tree (more than a 100 000) built by Opticks. Likely a nested subtraction/union solid that Opticks turns into a full binary tree. Check your geometry as described in: BNLNPPS/esi-g4ox#127
simg4ox: /esi/eic-opticks/CSG/CSGImport.cc:312: CSGPrim* CSGImport::importPrim(int, const snode&): Assertion `bn < 100000' failed.
```
Fixed DUNE geometry works fine, no exit:
./build/src/simg4ox -g duneforwarddetector3.gdml -m esi-g4ox/run.mac
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dmitri Smirnov <dmixsmi@gmail.com>1 parent 34f563c commit 9fa39d4
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
313 | 317 | | |
314 | | - | |
315 | | - | |
316 | | - | |
| 318 | + | |
317 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
| |||
0 commit comments