aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValerio Mariani <valerio.mariani@desy.de>2016-01-04 18:07:33 +0100
committerThomas White <taw@physics.org>2016-01-06 16:07:08 +0100
commit048c93c9d1d482e975e08e82653f62985cc1e949 (patch)
tree431f3c617d1a90964f3b965f05624534f0a3b8a5
parentcdee3ca726dbe1fa43dc17c8ab2c85976fe45dbf (diff)
Print filename and event string in the partialator.params output file
-rw-r--r--src/partialator.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 0c892a88..c98f40fe 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -1073,13 +1073,19 @@ int main(int argc, char *argv[])
if ( fh == NULL ) {
ERROR("Couldn't open partialator.params!\n");
} else {
- fprintf(fh, " cr OSF relB div flag\n");
+ fprintf(fh, "filename event cr OSF relB div flag\n");
for ( i=0; i<n_crystals; i++ ) {
- fprintf(fh, "%4i %10.5f %10.2f %8.5e %s\n", i,
+ struct image *img;
+ char *evt_str;
+ img = crystal_get_image(crystals[i]);
+ evt_str = get_event_string(img->event);
+ fprintf(fh, "%s %s %4i %10.5f %10.2f %8.5e %s\n",
+ img->filename, evt_str, i,
crystal_get_osf(crystals[i]),
crystal_get_Bfac(crystals[i])*1e20,
crystal_get_image(crystals[i])->div,
str_prflag(crystal_get_user_flag(crystals[i])));
+ free(evt_str);
}
fclose(fh);
}