Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ana::_MultiVar< T > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/cafanacore/v01.11/src/CAFAna/Core/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 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 25 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 21 of file MultiVar.cxx.

22  : fFunc(fun), fID(fgNextID--)
23  {
24  }
std::function< VarFunc_t > fFunc
Definition: MultiVar.h:45
static int fgNextID
The next ID that hasn&#39;t yet been assigned.
Definition: MultiVar.h:49

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 41 of file MultiVar.h.

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

Definition at line 43 of file MultiVar.h.

43 {return fgNextID-1;}
static int fgNextID
The next ID that hasn&#39;t yet been assigned.
Definition: MultiVar.h:49
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 35 of file MultiVar.h.

36  {
37  return fFunc(sr);
38  }
std::function< VarFunc_t > fFunc
Definition: MultiVar.h:45
caf::StandardRecord * sr
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 45 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 49 of file MultiVar.h.

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

Definition at line 47 of file MultiVar.h.


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