From 79bda19687e425818888ce17cc6e2239744ee640 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 26 Apr 2024 14:08:26 +0200 Subject: crystfel_geometry(5): Mention that group definitions must come after panels Also mention this when complaining about the geometry file. Fixes: https://github.com/taw10/crystfel/issues/10 --- doc/man/crystfel_geometry.5.md | 3 +++ libcrystfel/src/datatemplate.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/man/crystfel_geometry.5.md b/doc/man/crystfel_geometry.5.md index ecaf60bf..affe7ba8 100644 --- a/doc/man/crystfel_geometry.5.md +++ b/doc/man/crystfel_geometry.5.md @@ -534,6 +534,9 @@ above. The highest-level group should always be called **all**. +The group definitions must come **after** the panel definitions. A good way +to go is to put all the group definitions at the very end of the geometry file. + If the detector consists of only one panel, CrystFEL will automatically create the **all** group containing it. diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c index df0ad343..643da2ea 100644 --- a/libcrystfel/src/datatemplate.c +++ b/libcrystfel/src/datatemplate.c @@ -132,6 +132,8 @@ static int parse_group(const char *name, DataTemplate *dt, const char *val) gt->children[i] = find_group(dt, members[i]); if ( gt->children[i] == NULL ) { ERROR("Unknown panel group '%s'\n", members[i]); + ERROR("Make sure the hierarchy groups definitions are AFTER the " + "panel definitions in the geometry file.\n"); fail = 1; } } -- cgit v1.2.3