NACO Pipeline Reference Manual  4.4.0
naco_recipe.h
1 /* $Id: naco_recipe.h,v 1.20 2012-01-11 09:42:21 llundin Exp $
2  *
3  * This file is part of the NACO Pipeline
4  * Copyright (C) 2002,2003 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 02111-1307 USA
19  */
20 
21 /*
22  * $Author: llundin $
23  * $Date: 2012-01-11 09:42:21 $
24  * $Revision: 1.20 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 
29 
30 /* include file for NACO recipes */
31 /* cpp macros that must be defined before inclusion:
32 
33  RECIPE_NAME: e.g. naco_img_combine
34  RECIPE_STRING: e.g. "naco_img_combine"
35  RECIPE_SYNOPSIS: String with the recipe synopsis
36  RECIPE_DESCRIPTION: String with the recipe descrption
37  Optionally:
38  RECIPE_PARAMS: Binary or of NACO parameter enums
39 
40 */
41 
42 
43 #ifndef NACO_RECIPE_H
44 #define NACO_RECIPE_H
45 
46 /*-----------------------------------------------------------------------------
47  Includes
48  -----------------------------------------------------------------------------*/
49 
50 #include <cpl.h>
51 
52 /* TEMPORARY SUPPORT OF CPL 5.x */
53 #ifndef CPL_SIZE_FORMAT
54 #define CPL_SIZE_FORMAT "d"
55 #define cpl_size int
56 #endif
57 
58 #include "naco_utils.h"
59 #include "naco_pfits.h"
60 #include "naco_dfs.h"
61 
62 #include "irplib_plugin.h"
63 #include "irplib_framelist.h"
64 
65 #include "naco_parameter.h"
66 
67 #include <math.h>
68 #include <assert.h>
69 #include <float.h>
70 
71 /*-----------------------------------------------------------------------------
72  Defines
73  -----------------------------------------------------------------------------*/
74 
75 #define naco_pipe_id PACKAGE "/" PACKAGE_VERSION
76 
77 #define NACO_RECIPE_DEFINE(RECIPE_NAME, RECIPE_PARAMS, SYNOPSIS, DESCRIPTION) \
78  cpl_recipe_define(RECIPE_NAME, NACO_BINARY_VERSION, \
79  "Lars Lundin", PACKAGE_BUGREPORT, \
80  "2002, 2003, 2005, 2008", \
81  SYNOPSIS, DESCRIPTION); \
82  \
83  static cpl_error_code CPL_CONCAT2X(RECIPE_NAME,fill_parameterlist) \
84  (cpl_parameterlist * self) { \
85  return naco_parameter_set(self, #RECIPE_NAME, RECIPE_PARAMS) \
86  ? cpl_error_set_where(cpl_func) : CPL_ERROR_NONE; \
87  } \
88  extern int CPL_CONCAT2X(RECIPE_NAME,plugin_end)
89 
90 
91 /* FIXME: Copied from visir_error_reset() */
92 #define naco_error_reset(...) \
93  irplib_error_recover(cleanstate, __VA_ARGS__)
94 
95 #endif