irplib_dfs-test.c

00001 /*                                                                              *
00002  *   This file is part of the ESO IRPLIB package                                *
00003  *   Copyright (C) 2004,2005 European Southern Observatory                      *
00004  *                                                                              *
00005  *   This library is free software; you can redistribute it and/or modify       *
00006  *   it under the terms of the GNU General Public License as published by       *
00007  *   the Free Software Foundation; either version 2 of the License, or          *
00008  *   (at your option) any later version.                                        *
00009  *                                                                              *
00010  *   This program is distributed in the hope that it will be useful,            *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of             *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
00013  *   GNU General Public License for more details.                               *
00014  *                                                                              *
00015  *   You should have received a copy of the GNU General Public License          *
00016  *   along with this program; if not, write to the Free Software                *
00017  *   Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA       *
00018  *                                                                              */
00019  
00020 #ifdef HAVE_CONFIG_H
00021 #  include <config.h>
00022 #endif
00023 
00024 /*-----------------------------------------------------------------------------
00025                                 Includes
00026  -----------------------------------------------------------------------------*/
00027 #include <irplib_dfs.h>
00028 #include <irplib_utils.h>
00029 #include <irplib_test.h>
00030 
00031 /*-----------------------------------------------------------------------------
00032                                 Defines
00033  -----------------------------------------------------------------------------*/
00034 
00035 /*----------------------------------------------------------------------------*/
00039 /*----------------------------------------------------------------------------*/
00040 
00041 /*----------------------------------------------------------------------------*/
00045 /*----------------------------------------------------------------------------*/
00046 
00047 int main(void)
00048 {
00049 
00050     /* Initialize CPL + IRPLIB */
00051     IRPLIB_TEST_INIT;
00052 
00053     /* Create PAF file */
00054     {
00055     const char * const iiinstrument = "FLIMOS";
00056     const char * const rrrecipe = "flimos_bias";
00057     char * filename = irplib_sprintf("%s%s", rrrecipe, IRPLIB_DFS_PAF);
00058     cpl_propertylist *qc;
00059     
00060     irplib_test( irplib_paf_save(iiinstrument, rrrecipe,
00061                      NULL,
00062                      filename)
00063              == CPL_ERROR_NULL_INPUT );
00064         cpl_error_reset();
00065 
00066     qc = cpl_propertylist_new();
00067     cpl_propertylist_append_int (qc, "ESO QC INTVAL", -32);
00068     cpl_propertylist_set_comment(qc, "ESO QC INTVAL", "An integer value");
00069 
00070     cpl_propertylist_append_int(qc, "ESO QC INTZERO", 0);
00071 
00072     cpl_propertylist_append_double(qc, "ESO QC FLOATONE", 1.0);
00073 
00074     cpl_propertylist_append_double(qc, "ESO QC FLOATZERO", 0);
00075     cpl_propertylist_set_comment  (qc, "ESO QC FLOATZERO", "A floating point value");
00076 
00077     irplib_test( irplib_paf_save(iiinstrument, rrrecipe,
00078                      qc,
00079                      filename)
00080              == CPL_ERROR_NONE );
00081 
00082     cpl_propertylist_delete(qc);
00083     cpl_free(filename);
00084 
00085     }
00086     
00087     IRPLIB_TEST_END;
00088 }

Generated on Tue Jun 19 14:39:14 2007 for UVES Pipeline Reference Manual by  doxygen 1.4.6