GIRAFFE Pipeline Reference Manual

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

This file is part of the GIRAFFE Pipeline Reference Manual 2.18.2.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Mar 27 2025 12:23:44 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2004