GIRAFFE Pipeline Reference Manual

giqclog.c

00001 /* $Id: giqclog.c,v 1.6 2011/12/23 13:41:08 rpalsa Exp $
00002  *
00003  * This file is part of the GIRAFFE Pipeline
00004  * Copyright (C) 2002-2006 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 /*
00022  * $Author: rpalsa $
00023  * $Date: 2011/12/23 13:41:08 $
00024  * $Revision: 1.6 $
00025  * $Name: giraffe-2_9 $
00026  */
00027 
00028 #ifdef HAVE_CONFIG_H
00029 #  include <config.h>
00030 #endif
00031 
00032 #include <cxstring.h>
00033 
00034 #include "giqclog.h"
00035 
00036 
00045 GiPaf *
00046 giraffe_qclog_open(cxsize id)
00047 {
00048 
00049     cx_string *name = cx_string_new();
00050 
00051     cpl_propertylist *properties = NULL;
00052 
00053     GiPaf *self = NULL;
00054 
00055 
00056     cx_string_sprintf(name, "qc%04" CX_PRINTF_FORMAT_SIZE_TYPE ".paf", id);
00057 
00058     self = giraffe_paf_new(cx_string_get(name), "QC1 parameters", NULL, NULL);
00059 
00060     cx_string_delete(name);
00061     name = NULL;
00062 
00063     properties = giraffe_paf_get_properties(self);
00064     cpl_propertylist_append_string(properties, "QC.DID", QC_DID);
00065     cpl_propertylist_set_comment(properties,"QC.DID", "QC1 dictionary");
00066 
00067     return self;
00068 
00069 }
00070 
00071 
00072 cxint
00073 giraffe_qclog_close(GiPaf *qclog)
00074 {
00075 
00076     if (qclog != NULL) {
00077 
00078         cxint status = 0;
00079 
00080         status = giraffe_paf_write(qclog);
00081         giraffe_paf_delete(qclog);
00082 
00083         if (status != 0) {
00084             return 1;
00085         }
00086 
00087     }
00088 
00089     return 0;
00090 
00091 }

This file is part of the GIRAFFE Pipeline Reference Manual 2.9.0.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Jan 26 14:20:28 2012 by doxygen 1.6.3 written by Dimitri van Heesch, © 1997-2004