StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
StDetectorDbInterpolator< T > Class Template Reference

#include <StDetectorDbInterpolator.h>

Public Member Functions

 StDetectorDbInterpolator (unsigned int numEntries, unsigned int *times, T *array)
 Constructor for time interpolator.
interpolate (unsigned int time)
 Interpolates value based on timestamp.
getLowerValue (unsigned int time)

Detailed Description

template<class T>
class StDetectorDbInterpolator< T >

This acts as the interpolator using two arrays. The first array is an sorted unsigned int array of times and the second is a templated array that holds the values corresponding to the times array.

The time array must be sorted in ascending order.

The interpolater either does a straight line interpolation or it can return the value at the first known tme before the user queryed time.

This should never be used by the user and is internal the other memebers in this librbary

Jon Gans

Definition at line 19 of file StDetectorDbInterpolator.h.

Member Function Documentation

template<class T >
T StDetectorDbInterpolator< T >::getLowerValue ( unsigned int  time)

Gets the lower value of the passed in timestamp So, if there is a value at 1 and 10 and the user enters time 6, the function returns the value at 1

Definition at line 66 of file StDetectorDbInterpolator.h.

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