LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
hit::details::FuncSum< NFunc, Func, NFuncParams > Struct Template Reference

A sum of NFunc base functions Func. More...

#include "GausFitCache.h"

Static Public Member Functions

static Double_t eval (Double_t const *, Double_t const *)
 

Static Public Attributes

static constexpr unsigned int NParams = NFunc * NFuncParams
 

Detailed Description

template<unsigned int NFunc, Double_t Func, unsigned int NFuncParams>
struct hit::details::FuncSum< NFunc, Func, NFuncParams >

A sum of NFunc base functions Func.

Template Parameters
NFuncthe number of base functions in the sum
Functhe base function in the sum
NFuncParamsthe number of parameters required by Func

This class provides in its eval member a compiled function suitable to be wrapped into a ROOT's TF1 object. The function is the sum of NFunc base functions. Each base function is expected to use NFuncParams parameters. The first function will use the first set of NFuncParams parameters, the second one the next set of NFuncParams parameters, and so on. If NFunc is 0, the value 0 is always returned.

Definition at line 135 of file GausFitCache.h.

Member Function Documentation

template<unsigned int NFunc, Double_t Func, unsigned int NFuncParams>
Double_t hit::details::FuncSum< NFunc, Func, NFuncParams >::eval ( Double_t const *  x,
Double_t const *  params 
)
static

Definition at line 366 of file GausFitCache.h.

367  {
368  return Func(x, params + NFuncParams*(NFunc-1)) // use the last parameters
370  } // CompiledGausFitCacheBaseStruct::FuncSum<NFunc, Func>::eval()
Float_t x
Definition: compare.C:6
static Double_t eval(Double_t const *, Double_t const *)
Definition: GausFitCache.h:366

Member Data Documentation

template<unsigned int NFunc, Double_t Func, unsigned int NFuncParams>
constexpr unsigned int hit::details::FuncSum< NFunc, Func, NFuncParams >::NParams = NFunc * NFuncParams
static

Definition at line 137 of file GausFitCache.h.


The documentation for this struct was generated from the following file: