GIRAFFE Pipeline Reference Manual

giqclog.c
1 /* $Id$
2  *
3  * This file is part of the GIRAFFE Pipeline
4  * Copyright (C) 2002-2006 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author$
23  * $Date$
24  * $Revision$
25  * $Name$
26  */
27 
28 #ifdef HAVE_CONFIG_H
29 # include <config.h>
30 #endif
31 
32 #include <cxstring.h>
33 
34 #include "giqclog.h"
35 
36 
45 GiPaf *
46 giraffe_qclog_open(cxsize id)
47 {
48 
49  cx_string *name = cx_string_new();
50 
51  cpl_propertylist *properties = NULL;
52 
53  GiPaf *self = NULL;
54 
55 
56  cx_string_sprintf(name, "qc%04" CX_PRINTF_FORMAT_SIZE_TYPE ".paf", id);
57 
58  self = giraffe_paf_new(cx_string_get(name), "QC1 parameters", NULL, NULL);
59 
60  cx_string_delete(name);
61  name = NULL;
62 
63  properties = giraffe_paf_get_properties(self);
64  cpl_propertylist_append_string(properties, "QC.DID", QC_DID);
65  cpl_propertylist_set_comment(properties,"QC.DID", "QC1 dictionary");
66 
67  return self;
68 
69 }
70 
71 
72 cxint
73 giraffe_qclog_close(GiPaf *qclog)
74 {
75 
76  if (qclog != NULL) {
77 
78  cxint status = 0;
79 
80  status = giraffe_paf_write(qclog);
81  giraffe_paf_delete(qclog);
82 
83  if (status != 0) {
84  return 1;
85  }
86 
87  }
88 
89  return 0;
90 
91 }

This file is part of the GIRAFFE Pipeline Reference Manual 2.14.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Wed Mar 11 2015 13:19:42 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2004