LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
hit::details::CompiledGausFitCacheBaseStruct::InitializeFuncSumVector< NFunc, Func > Struct Template Reference

A helper class initializing the function vector. More...

#include "GausFitCache.h"

Static Public Member Functions

static void fill (CompiledGausFitCacheBaseStruct &cache)
 

Detailed Description

template<unsigned int NFunc, template< unsigned int > class Func>
struct hit::details::CompiledGausFitCacheBaseStruct::InitializeFuncSumVector< NFunc, Func >

A helper class initializing the function vector.

Template Parameters
NFuncthe maximum number of base functions in a function
Functhe function encapsulating object
Othersother template parameters of the function object

This helper class provides a static function fill() that fills the function vector of the specified CompiledGausFitCacheBaseStruct with a sequence on NFunc+1 functions, of types Func<0, Others...>, Func<1, Others...>, ... up to Func<NFunc, Others...> included. Each function is actually wrapped by a ROOT's TF1. Func type is a class, and the actual function must be found in the member Func::eval. Also the Func class is required to have a NParams static constexpr member whose value is the number of parameters that theeval()` function takes.

The template FuncSum is implementing all these requirements.

Definition at line 228 of file GausFitCache.h.

Member Function Documentation

template<unsigned int NFunc, template< unsigned int > class Func>
void hit::details::CompiledGausFitCacheBaseStruct::InitializeFuncSumVector< NFunc, Func >::fill ( CompiledGausFitCacheBaseStruct cache)
static

Definition at line 383 of file GausFitCache.h.

References trkf::fill(), hit::GausFitCache::funcs, and hit::GausFitCache::FunctionName().

385  {
386  // first fill the lower functions
388  // then add one
389  cache.funcs.push_back(new TF1(
390  cache.FunctionName(NFunc).c_str(), Func<NFunc>::eval, 0., 1., Func<NFunc>::NParams));
391  } // InitializeFuncSumVector<NFunc, Func>::fill()
static void fill(CompiledGausFitCacheBaseStruct &cache)
Definition: GausFitCache.h:383

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