File indexing completed on 2025-02-21 10:03:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __GSL_NTUPLE_H__
0024 #define __GSL_NTUPLE_H__
0025
0026 #include <stdlib.h>
0027 #include <stdio.h>
0028 #include <gsl/gsl_errno.h>
0029 #include <gsl/gsl_histogram.h>
0030
0031 #undef __BEGIN_DECLS
0032 #undef __END_DECLS
0033 #ifdef __cplusplus
0034 # define __BEGIN_DECLS extern "C" {
0035 # define __END_DECLS }
0036 #else
0037 # define __BEGIN_DECLS
0038 # define __END_DECLS
0039 #endif
0040
0041 __BEGIN_DECLS
0042
0043 typedef struct {
0044 FILE * file;
0045 void * ntuple_data;
0046 size_t size;
0047 } gsl_ntuple;
0048
0049 typedef struct {
0050 int (* function) (void * ntuple_data, void * params);
0051 void * params;
0052 } gsl_ntuple_select_fn;
0053
0054 typedef struct {
0055 double (* function) (void * ntuple_data, void * params);
0056 void * params;
0057 } gsl_ntuple_value_fn;
0058
0059 gsl_ntuple *
0060 gsl_ntuple_open (char * filename, void * ntuple_data, size_t size);
0061
0062 gsl_ntuple *
0063 gsl_ntuple_create (char * filename, void * ntuple_data, size_t size);
0064
0065 int gsl_ntuple_write (gsl_ntuple * ntuple);
0066 int gsl_ntuple_read (gsl_ntuple * ntuple);
0067
0068 int gsl_ntuple_bookdata (gsl_ntuple * ntuple);
0069
0070 int gsl_ntuple_project (gsl_histogram * h, gsl_ntuple * ntuple,
0071 gsl_ntuple_value_fn *value_func,
0072 gsl_ntuple_select_fn *select_func);
0073
0074 int gsl_ntuple_close (gsl_ntuple * ntuple);
0075
0076 __END_DECLS
0077
0078 #endif
0079
0080
0081
0082