diff options
author | Thomas White <taw@physics.org> | 2023-05-15 17:16:21 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-07-28 13:22:04 +0200 |
commit | e6cee18a78236c5bb763c024e586c7154c82535c (patch) | |
tree | 371519b356a4b5465e87e92f2a9100db89aed756 /libcrystfel/src/detgeom.h | |
parent | 451ebfa705126e95c0186aac285f0c32bc01b83e (diff) |
Transfer detector hierarchy to detgeom
Diffstat (limited to 'libcrystfel/src/detgeom.h')
-rw-r--r-- | libcrystfel/src/detgeom.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libcrystfel/src/detgeom.h b/libcrystfel/src/detgeom.h index 7f291a7a..b06ccb8f 100644 --- a/libcrystfel/src/detgeom.h +++ b/libcrystfel/src/detgeom.h @@ -86,12 +86,28 @@ struct detgeom_panel }; +struct detgeom_panel_group +{ + char *name; + int n_children; + + /* If n_children > 0, here are the child groups */ + const struct detgeom_panel_group **children; + + /* If n_children == 0, this is a leaf node, so: */ + struct detgeom_panel *panel; +}; + + struct detgeom { struct detgeom_panel *panels; - int n_panels; + int n_panels; + + struct detgeom_panel_group *top_group; }; + extern void detgeom_transform_coords(struct detgeom_panel *p, double fs, double ss, double wavelength, @@ -107,6 +123,8 @@ extern void show_panel(struct detgeom_panel *p); extern double detgeom_mean_camera_length(struct detgeom *dg); +extern struct detgeom_panel *detgeom_find_panel(struct detgeom *dg, const char *name); + #ifdef __cplusplus } #endif |