Once an ntuple has been created its contents can be histogrammed in
various ways using the function gsl_ntuple_project
. Two
user-defined functions must be provided, a function to select events and
a function to compute scalar values. The selection function and the
value function both accept the ntuple row as a first argument and other
parameters as a second argument.
The selection function determines which ntuple rows are selected for histogramming. It is defined by the following struct,
typedef struct { int (* function) (void * ntuple_data, void * params); void * params; } gsl_ntuple_select_fn;
The struct component function should return a non-zero value for each ntuple row that is to be included in the histogram.
The value function computes scalar values for those ntuple rows selected by the selection function,
typedef struct { double (* function) (void * ntuple_data, void * params); void * params; } gsl_ntuple_value_fn;
In this case the struct component function should return the value to be added to the histogram for the ntuple row.