LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 245 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 429 of file GausFitCache.h.

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

430  {
431  // first fill the lower functions
433  // then add one
434  cache.funcs.push_back(new TF1(
435  cache.FunctionName(NFunc).c_str(), Func<NFunc>::eval,
436  0., 1., Func<NFunc>::NParams
437  ));
438  } // InitializeFuncSumVector<NFunc, Func>::fill()
static void fill(CompiledGausFitCacheBaseStruct &cache)
Definition: GausFitCache.h:429

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