13 : fFunc(fun), fID(fgNextID--)
31 std::vector<double> returnVec;
33 const std::vector<double> vaVec =
fA(sr);
34 const std::vector<double> vbVec =
fB(sr);
36 if(vaVec.size() != vbVec.size())
38 std::cout <<
"MultiVars need to be same size, these two are size "
39 << vaVec.size() <<
" " << vbVec.size() <<
"respectively." << std::endl;
43 for(
unsigned n = 0;
n < vaVec.size(); ++
n){
44 const double va = vaVec.at(
n);
45 const double vb = vbVec.at(
n);
56 returnVec.push_back(i+.5);
80 template class _MultiVar<caf::SRSpillProxy>;
81 template class _MultiVar<caf::SRSliceProxy>;
85 template<
class T>
int _MultiVar<T>::fgNextID = -1;
_MultiVar(const std::function< VarFunc_t > &fun)
std::function can wrap a real function, function object, or lambda
Represent the binning of a Spectrum's x-axis.
process_name opflashCryoW ana
std::vector< double > operator()(const T *sr) const
_MultiVar< caf::SRSpillProxy > SpillMultiVar
int FindBin(float x) const
_MultiVar< caf::SRSliceProxy > MultiVar
_MultiVar< T > MultiVar2D(const _MultiVar< T > &a, const Binning &binsa, const _MultiVar< T > &b, const Binning &binsb)
MultiVar2DFunc(const _MultiVar< T > &a, const Binning binsa, const _MultiVar< T > &b, const Binning binsb)
BEGIN_PROLOG could also be cout