All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ana::_MultiVar< T > Class Template Reference

#include <MultiVar.h>

Public Member Functions

typedef std::vector (VarFunc_t)(const T *sr)
 The type of the function part of a var. More...
 
 _MultiVar (const std::function< VarFunc_t > &fun)
 std::function can wrap a real function, function object, or lambda More...
 
std::vector< double > operator() (const T *sr) const
 Allows a variable to be called with double value = myVar(sr) syntax. More...
 
int ID () const
 Vars with the same definition will have the same ID. More...
 

Static Public Member Functions

static int MaxID ()
 

Protected Member Functions

 _MultiVar (const std::function< VarFunc_t > &fun, int id)
 

Protected Attributes

std::function< VarFunc_t > fFunc
 
int fID
 

Static Protected Attributes

static int fgNextID = -1
 The next ID that hasn't yet been assigned. More...
 

Detailed Description

template<class T>
class ana::_MultiVar< T >

A Var that returns multiple results for each slice. eg the properties of multiple prongs. All results will be filled into the Spectrum.

Definition at line 16 of file MultiVar.h.

Constructor & Destructor Documentation

template<class T >
ana::_MultiVar< T >::_MultiVar ( const std::function< VarFunc_t > &  fun)

std::function can wrap a real function, function object, or lambda

Definition at line 12 of file MultiVar.cxx.

13  : fFunc(fun), fID(fgNextID--)
14  {
15  }
std::function< VarFunc_t > fFunc
Definition: MultiVar.h:41
static int fgNextID
The next ID that hasn&#39;t yet been assigned.
Definition: MultiVar.h:45
template<class T>
ana::_MultiVar< T >::_MultiVar ( const std::function< VarFunc_t > &  fun,
int  id 
)
inlineprotected

Definition at line 36 of file MultiVar.h.

37  : fFunc(fun), fID(id)
38  {
39  }
std::function< VarFunc_t > fFunc
Definition: MultiVar.h:41

Member Function Documentation

template<class T>
int ana::_MultiVar< T >::ID ( ) const
inline

Vars with the same definition will have the same ID.

Definition at line 32 of file MultiVar.h.

32 {return fID;}
template<class T>
static int ana::_MultiVar< T >::MaxID ( )
inlinestatic

Definition at line 34 of file MultiVar.h.

34 {return fgNextID-1;}
static int fgNextID
The next ID that hasn&#39;t yet been assigned.
Definition: MultiVar.h:45
template<class T>
std::vector<double> ana::_MultiVar< T >::operator() ( const T *  sr) const
inline

Allows a variable to be called with double value = myVar(sr) syntax.

Definition at line 26 of file MultiVar.h.

27  {
28  return fFunc(sr);
29  }
std::function< VarFunc_t > fFunc
Definition: MultiVar.h:41
template<class T>
typedef ana::_MultiVar< T >::std::vector ( VarFunc_t  ) const

The type of the function part of a var.

Member Data Documentation

template<class T>
std::function<VarFunc_t> ana::_MultiVar< T >::fFunc
protected

Definition at line 41 of file MultiVar.h.

template<class T>
int ana::_MultiVar< T >::fgNextID = -1
staticprotected

The next ID that hasn't yet been assigned.

Definition at line 45 of file MultiVar.h.

template<class T>
int ana::_MultiVar< T >::fID
protected

Definition at line 43 of file MultiVar.h.


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