NAME
get_target_fluorescent_database - Gets target fluorescent_database for "building block" routines
SYNOPSIS
#include "s2/s2_fluorescence.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int get_target_fluorescent_database
(
Fluorescent_database **out_fl_db_ptr_ptr,
int num_fluorescent_surfaces
);
DESCRIPTION
This routine implements the creation/over-writing semantics used in the KJB
library. If *target_fl_db_ptr_ptr is NULL, then this routine creates the
fluorescent_database. If it is not null, and it is the right size, then this
routine does nothing. If it is the wrong size, then it is resized.
If an actual resize is needed, then a new fluorescent_database of the
required size is first created. If the creation is successful, then the old
fluorescent_database is free'd. The reason is that if the new allocation
fails, a calling application should have use of the old fluorescent_database.
The alternate is to free the old fluorescent_database first. This is more
memory efficient. A more sophisticated alternative is to free the old
fluorescent_database if it can be deterimined that the subsequent allocation
will succeed. Although such approaches have merit, it is expected that
resizing will occur infrequently enought that it is not worth implementing
them. Thus the simplest method with good semantics under most conditions has
been used.
RETURNS
On success, NO_ERROR is returned. On failure, ERROR is returned, with an
error message being set.
RELATED
Fluorescent_database
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
create_fluorescent_database
,
free_fluorescent_database
,
read_fl_db_from_config_file
,
read_fluorescent_database
,
write_fluorescent_database