3 * Copyright (C) 2000 Simone Piccardi
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 3 of the License, or (at
8 * your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 /* Jan/2001 Modified by Brian Gough. Minor changes for GSL */
23 #ifndef __GSL_NTUPLE_H__
24 #define __GSL_NTUPLE_H__
28 #include <gsl/gsl_errno.h>
29 #include <gsl/gsl_histogram.h>
34 # define __BEGIN_DECLS extern "C" {
35 # define __END_DECLS }
37 # define __BEGIN_DECLS /* empty */
38 # define __END_DECLS /* empty */
50 int (* function) (void * ntuple_data, void * params);
52 } gsl_ntuple_select_fn;
55 double (* function) (void * ntuple_data, void * params);
57 } gsl_ntuple_value_fn;
60 gsl_ntuple_open (char * filename, void * ntuple_data, size_t size);
63 gsl_ntuple_create (char * filename, void * ntuple_data, size_t size);
65 int gsl_ntuple_write (gsl_ntuple * ntuple);
66 int gsl_ntuple_read (gsl_ntuple * ntuple);
68 int gsl_ntuple_bookdata (gsl_ntuple * ntuple); /* synonym for write */
70 int gsl_ntuple_project (gsl_histogram * h, gsl_ntuple * ntuple,
71 gsl_ntuple_value_fn *value_func,
72 gsl_ntuple_select_fn *select_func);
74 int gsl_ntuple_close (gsl_ntuple * ntuple);
78 #endif /* __GSL_NTUPLE_H__ */