naco_recipe.h

00001 /* $Id: naco_recipe.h,v 1.20 2012-01-11 09:42:21 llundin Exp $
00002  *
00003  * This file is part of the NACO Pipeline
00004  * Copyright (C) 2002,2003 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  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: llundin $
00023  * $Date: 2012-01-11 09:42:21 $
00024  * $Revision: 1.20 $
00025  * $Name: not supported by cvs2svn $
00026  */
00027 
00028 
00029 
00030 /* include file for NACO recipes */
00031 /* cpp macros that must be defined before inclusion:
00032 
00033    RECIPE_NAME:         e.g. naco_img_combine
00034    RECIPE_STRING:       e.g. "naco_img_combine"
00035    RECIPE_SYNOPSIS:     String with the recipe synopsis
00036    RECIPE_DESCRIPTION:  String with the recipe descrption
00037    Optionally:
00038    RECIPE_PARAMS:       Binary or of NACO parameter enums
00039 
00040 */
00041 
00042 
00043 #ifndef NACO_RECIPE_H
00044 #define NACO_RECIPE_H
00045 
00046 /*-----------------------------------------------------------------------------
00047                                 Includes
00048  -----------------------------------------------------------------------------*/
00049 
00050 #include <cpl.h>
00051 
00052 /* TEMPORARY SUPPORT OF CPL 5.x */
00053 #ifndef CPL_SIZE_FORMAT
00054 #define CPL_SIZE_FORMAT "d"
00055 #define cpl_size int
00056 #endif
00057 
00058 #include "naco_utils.h"
00059 #include "naco_pfits.h"
00060 #include "naco_dfs.h"
00061 
00062 #include "irplib_plugin.h"
00063 #include "irplib_framelist.h"
00064 
00065 #include "naco_parameter.h"
00066 
00067 #include <math.h>
00068 #include <assert.h>
00069 #include <float.h>
00070 
00071 /*-----------------------------------------------------------------------------
00072                                 Defines
00073  -----------------------------------------------------------------------------*/
00074 
00075 #define naco_pipe_id PACKAGE "/" PACKAGE_VERSION
00076 
00077 #define NACO_RECIPE_DEFINE(RECIPE_NAME, RECIPE_PARAMS, SYNOPSIS, DESCRIPTION) \
00078     cpl_recipe_define(RECIPE_NAME, NACO_BINARY_VERSION,                 \
00079                       "Lars Lundin", PACKAGE_BUGREPORT,                 \
00080                       "2002, 2003, 2005, 2008",                         \
00081                       SYNOPSIS, DESCRIPTION);                           \
00082                                                                         \
00083     static cpl_error_code CPL_CONCAT2X(RECIPE_NAME,fill_parameterlist)  \
00084         (cpl_parameterlist * self) {                                    \
00085         return naco_parameter_set(self, #RECIPE_NAME, RECIPE_PARAMS)    \
00086             ? cpl_error_set_where(cpl_func) : CPL_ERROR_NONE;           \
00087     }                                                                   \
00088     extern int CPL_CONCAT2X(RECIPE_NAME,plugin_end)
00089    
00090 
00091 /* FIXME: Copied from visir_error_reset() */
00092 #define naco_error_reset(...)                                                  \
00093  irplib_error_recover(cleanstate, __VA_ARGS__)
00094 
00095 #endif
Generated on Mon Feb 17 15:01:44 2014 for NACO Pipeline Reference Manual by  doxygen 1.6.3